Skip to content

Commit

Permalink
Bug/53883 pupil spa use monotonic clock (#2301)
Browse files Browse the repository at this point in the history
* Bump deps (minor)

* Fix test

* Remove @angular-eslint

Incompatible with angular upgrade

* Remove lint target

* Upgrade angular to v12
Drop IE11 support

* Bump ngx-cookie-service ahead of upgrade

* Update lock file

* Upgrade angular to v13

* Upgrade angular to v14

* Bump deps

* Bump deps

* Remove ngx-logger

Not used

* Add eslint and lint target back

* Remove dep ts-node

Seemingly not needed

* Bump version

* Update pupil-spa prod build invocation for angular v14 in Dockerfile

* Fix connectivity check test

Initialise the config service mock

* Add monotonic clock and service

* Add test

* Add monotonic time service to handle DI

* Fix: use the eventTimestamp when provided

* Answers to use Monotonic Time

* fix: upgrade swagger-ui-express from 4.3.0 to 4.5.0

Snyk has created this PR to upgrade swagger-ui-express from 4.3.0 to 4.5.0.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mtc/project/56daaeb6-c73d-47a2-bd53-6b507ee08fdf?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade moment-timezone from 0.5.35 to 0.5.37

Snyk has created this PR to upgrade moment-timezone from 0.5.35 to 0.5.37.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mtc/project/86296478-3a5b-43ab-9fc6-4b4c5f4833ba?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade qrcode from 1.5.0 to 1.5.1

Snyk has created this PR to upgrade qrcode from 1.5.0 to 1.5.1.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mtc/project/86296478-3a5b-43ab-9fc6-4b4c5f4833ba?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade xregexp from 5.1.0 to 5.1.1

Snyk has created this PR to upgrade xregexp from 5.1.0 to 5.1.1.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mtc/project/86296478-3a5b-43ab-9fc6-4b4c5f4833ba?utm_source=github&utm_medium=referral&page=upgrade-pr

* Update load-test. NB the artillary upgrade requires node v16

* Fix constructor issue

* fix tests

* fix: upgrade sass from 1.52.1 to 1.54.8

Snyk has created this PR to upgrade sass from 1.52.1 to 1.54.8.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mtc/project/c7841ec1-118f-443b-9be4-7adb6042d775?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade core-js from 2.6.10 to 2.6.12

Snyk has created this PR to upgrade core-js from 2.6.10 to 2.6.12.

See this package in npm:


See this project in Snyk:
https://app.snyk.io/org/mtc/project/c7841ec1-118f-443b-9be4-7adb6042d775?utm_source=github&utm_medium=referral&page=upgrade-pr

* Refactor monotonic time / answers

* Update assets version

* Refator - Audits to use MontonicTime

* Rafactor QuestionRendered audit

* Refactor CheckStarted audit

* refactor QuestionAnswered

* refactor PauseRendered

* refactor CheckSubmissionPending

* refactor checkSubmissionAPI called

* refactor CheckSubmissionAPICallSuceeded

* refactor CheckSubmissionAPIFailed

* refactor CheckSubmissionFailed

* refactor SessionExpired

* refactor RefreshDetected and UtteranceStarted

* refactor UtteranceEnded

* refactor QuestionReadingStarted

* refactor QuestionReadingEnded

* Lint fix

* refactor QuestionTimerStarted

* refactor QuestionTimerEnded

* refactor QuestionTimerCancelled

* refactor AppError

* refactor AppVisible

* lint fix

* refactor AppHidden

* refactor RefreshOrTabDetected

* Update docker circleci config

* Lots of other docker versions found in the circleCI config. Urgh.

* refactor RegisterInput

* refactor: use Date() for generating the clientTimestamp
Answers, RegisteredInputs and Audits

* Add sub-sort for events happening < 1 ms

* Update assets version

* Bump Angular minor/patch version

* Bump vm2 from 3.9.9 to 3.9.11 in /load-test

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.9 to 3.9.11.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](patriksimek/vm2@3.9.9...3.9.11)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Use JS Date instead of monotonic time for Registered Inputs

* Fix test

* Update sort on validator(s)

* marking-service: answer sort to now include monotonic time sub-sort

* store monotonic time after marking in table storage

* data-sync - secondary sort on sequence number

* Update unsupported browser list in spa

* Add initial support for outdated browsers

Unsupported browsers are now redirected from nginx to the unsupported-browser.html page

Integration test needs more browsers adding in.

* Update browserslist, add integration tests

* Add style to unsupported browser page

* Directory layout change

* Wording change

* Trivial changes

* bugfix

* Update tests

* Update prod nginx rewrite destination for unsupported

* monotonic test updates

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: snyk-bot <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mohsen Qureshi <[email protected]>
Co-authored-by: Mohsen Qureshi <[email protected]>
  • Loading branch information
5 people authored Nov 29, 2022
1 parent fe31436 commit 9497fef
Show file tree
Hide file tree
Showing 102 changed files with 5,529 additions and 4,695 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 19.03.13
version: 20.10.17
- run: cd admin && BUILDKIT=1 docker build .
- run: docker images

Expand All @@ -112,7 +112,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 19.03.13
version: 20.10.17
- run: cd pupil-spa && BUILDKIT=1 docker build .
- run: docker images

Expand All @@ -125,7 +125,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 19.03.13
version: 20.10.17
- run: cd pupil-api && BUILDKIT=1 docker build .
- run: docker images

Expand All @@ -138,7 +138,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 19.03.13
version: 20.10.17
- run: export NVM_DIR=${HOME}/.nvm && source ${NVM_DIR}/nvm.sh; cd ./admin; nvm use; cd ../admin-assets; ./copy-assets.sh
- run: cd admin-assets && BUILDKIT=1 docker build .
- run: docker images
Expand Down
8 changes: 4 additions & 4 deletions admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watch:integration": "yarn jest --watch --coverage=no --config ./tests-integration/jest.integration.config.js"
},
"mtc": {
"assets-version": "e3cf7309a51a6a6af117a4d5f04dedec"
"assets-version": "35403e1d6d0f5f675c028f29d5629ce0"
},
"engines": {
"node": ">= 14"
Expand Down Expand Up @@ -76,15 +76,15 @@
"marked": "^4.0.19",
"md5": "^2.2.1",
"merge-stream": "^2.0.0",
"moment-timezone": "^0.5.35",
"moment-timezone": "^0.5.37",
"morgan": "~1.10.0",
"mssql": "8.0.0",
"nocache": "^3.0.4",
"node-dir": "^0.1.17",
"openid-client": "^4.2.2",
"passport": "^0.6.0",
"passport-local": "^1.0.0",
"qrcode": "^1.5.0",
"qrcode": "^1.5.1",
"ramda": "^0.27.2",
"ramda-adjunct": "^2.21.0",
"random-number-csprng": "^1.0.2",
Expand All @@ -97,7 +97,7 @@
"winston": "^3.1.0",
"winston-azure-application-insights": "^3.0.0",
"xmlbuilder2": "^3.0.2",
"xregexp": "^5.1.0"
"xregexp": "^5.1.1"
},
"devDependencies": {
"@babel/core": "^7.10.5",
Expand Down
18 changes: 9 additions & 9 deletions admin/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
xml2js "^0.4.19"

"@azure/core-lro@^2.2.0":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.3.1.tgz#c8270b2785ea98c793af28ed106a470650859049"
integrity sha512-nQ+Xnm9g1EWcmbqgxJGmkNHfOHRUmrbYIlRT4KjluzhHQooaGO55m/h6wCX0ho3Jte2ZNBzZPJRmi6yBWeb3yA==
version "2.4.0"
resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.4.0.tgz#e3fdff797b045ee753aab25c3d2ecc0aa3e0a539"
integrity sha512-F65+rYkll1dpw3RGm8/SSiSj+/QkMeYDanzS/QKlM1dmuneVyXbO46C88V1MRHluLGdMP6qfD3vDRYALn0z0tQ==
dependencies:
"@azure/abort-controller" "^1.0.0"
"@azure/logger" "^1.0.0"
Expand Down Expand Up @@ -1628,9 +1628,9 @@
"@jridgewell/sourcemap-codec" "^1.4.10"

"@js-joda/core@^5.2.0":
version "5.4.0"
resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-5.4.0.tgz#f241281fa0de9729f04ea9517851feb19ada29d3"
integrity sha512-AeQQWcDiuUtI6BXX59VR9KkdF4sLOeaicwpQKnNu8iBKJ8O1+M9FLs7ZCbdAMWmDLMoeaG1HG8PMbkuyuMTVgw==
version "5.4.1"
resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-5.4.1.tgz#984922e386169c60a95cdb60bd6199338e9d6e4c"
integrity sha512-+uMco2Xm9VYJ81XYWwrvgsM9xEvqs9JvLNrN4/fOg7YJKk4yeqAg+O/cpoFPTGxvfL2Zy0mUcnKlIz9UV0Cadw==

"@lezer/common@^1.0.0":
version "1.0.1"
Expand Down Expand Up @@ -7609,7 +7609,7 @@ mkdirp@^1.0.4:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

moment-timezone@^0.5.35:
moment-timezone@^0.5.37:
version "0.5.37"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.37.tgz#adf97f719c4e458fdb12e2b4e87b8bec9f4eef1e"
integrity sha512-uEDzDNFhfaywRl+vwXxffjjq1q0Vzr+fcQpQ1bU0kbzorfS7zVtZnCnGc8mhWmF39d4g4YriF6kwA75mJKE/Zg==
Expand Down Expand Up @@ -8492,7 +8492,7 @@ qjobs@^1.2.0:
resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071"
integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==

qrcode@^1.5.0:
qrcode@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.1.tgz#0103f97317409f7bc91772ef30793a54cd59f0cb"
integrity sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==
Expand Down Expand Up @@ -10742,7 +10742,7 @@ xmlchars@^2.2.0:
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==

xregexp@^5.1.0:
xregexp@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-5.1.1.tgz#6d3fe18819e3143aaf52f9284d34f49a59583ebb"
integrity sha512-fKXeVorD+CzWvFs7VBuKTYIW63YD1e1osxwQ8caZ6o1jg6pDAbABDG54LCIq0j5cy7PjRvGIq6sef9DYPXpncg==
Expand Down
2 changes: 2 additions & 0 deletions bin/run-all-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ mybanner 'Testing SPA'
cd ../pupil-spa
nvm use
yarn test-single
mybanner 'SPA Unsupported browser tests'
yarn runUnsupportedBrowserTests

mybanner 'Testing API'
cd ../pupil-api
Expand Down
Loading

0 comments on commit 9497fef

Please sign in to comment.