-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(deps): update mongoose to 6 #6832
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KenLSM
force-pushed
the
chore/mongoose-bump-6
branch
from
October 23, 2023 08:59
a3a4c4f
to
0f9be39
Compare
FRM-1294 Evaluate MongoDB Version Upgrade
Also relevant: MongoDB email MongoDB 4.4 End of Life on February 29, 2024; automatic Atlas cluster upgrades to 5.0 |
KenLSM
force-pushed
the
chore/mongoose-bump-6
branch
from
October 24, 2023 09:57
9ba398f
to
5b59002
Compare
KenLSM
force-pushed
the
chore/mongoose-bump-6
branch
4 times, most recently
from
October 31, 2023 07:07
1bab4cf
to
4c6f389
Compare
KenLSM
force-pushed
the
chore/mongoose-bump-6
branch
from
November 7, 2023 06:16
4c417f7
to
e5db025
Compare
KenLSM
changed the title
chore(deps): update mongoose to 6
feat(deps): update mongoose to 6
Jan 2, 2024
# Conflicts: # src/app/models/__tests__/encrypt-submission.server.model.spec.ts # src/app/models/form.server.model.ts # src/app/models/submission.server.model.ts # src/app/modules/submission/__tests__/submission.controller.spec.ts # src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.service.spec.ts # src/app/modules/submission/encrypt-submission/__tests__/encrypt-submission.utils.spec.ts # src/types/submission.ts
This reverts commit e5db025.
wanlingt
reviewed
Jan 4, 2024
useNewUrlParser: true, | ||
}) | ||
export const makeMongooseFixtures = (): Promise<mongoose.Connection> => { | ||
const dbUri = 'mongodb://127.0.0.1:3000/test' // TODO: hardcoding uri as the port and path are fixed and doesn't respect values in __tests__/e2e/setup/setupConfig.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
const dbUri = 'mongodb://127.0.0.1:3000/test' // TODO: hardcoding uri as the port and path are fixed and doesn't respect values in __tests__/e2e/setup/setupConfig.ts | |
const dbUri = 'mongodb://127.0.0.1:3000/test' |
KenLSM
commented
Jan 4, 2024
src/app/routes/api/v3/admin/forms/__tests__/admin-forms.submissions.routes.spec.ts
Outdated
Show resolved
Hide resolved
wanlingt
approved these changes
Jan 4, 2024
tshuli
pushed a commit
that referenced
this pull request
Jan 8, 2024
* chore: bump mongoose to 6.12 * fix: type mismatch on cursorquery, objectid * fix: required and validator shape in user and form model * fix: use try catch block for mongoose connect loader * fix: add missing goLinkSuffix property in IForm * fix: overwrite typing of IPaymentSchema for mongoose Id * fix: querycursor import in submission.ts * fix: removed undefined in AgencySchema causing schema methods to be never * fix: schema typings in form logic and sms types * fix: replace ConnectionOptions with ConnectOptions * fix: remove deprecated connect options * fix: objectid imports * chore: remove mongodb package, upgrade connect-mongo to 4.6.0 * chore: replace mongoerror import reference * fix: typescript errors * chore: change nModified to modifiedCount * fix: typeerror on form_statistics_total.server.model * fix: typeerror on bouncemodel * fix: form server model, only fixed affected methods * fix: mongoerror is now mongoservererror * fix: execPopulate no longer required to be called * fix: verification.model * fix: replace enforcedocument to hydrateddocument * fix: duplicateFormFieldByIdAndIndex * fix: util/logic.ts type inference errors * refactor: swap bson with bson-ext * chore: update test db configs * refactor: remove bson reference * refactor: gloal replacement of bson * chore: remove execPopulate * fix: void promise returns * fix: remove bson reference with mongoose * fix: replace more bson on admin-forms.form.routes.specs * fix: test failures on admin-forms.submissions.routes.spec * fix: test failures on src/app/models * fix: test failures on src/app/modules/payments * fix: test failures on src/app/modules/issues * fix: form model always defaulting to private mode on save * chore: remove bson in jest-db * fix: lint and type errors in loader * chore: remove unused typedef * chore: remove commented out BSON code * fix: playwright mongod init failure * refactor: rename constants * fix: mongoose loader * fix: removed form model business field to be required * fix: e2e email-submission tests * fix: make mongoose.connect to be async * fix: add specific db connection uri * fix: restore missing _id in table column * fix: workspace model support * chore: add verbose playwight reporting * chore: update bson-ext to bson for workspace-related code * fix: dburi should not be random * fix: drop form collection instead of the whole db * chore: update hosting port from 5000 to 5001 for playwright * fix: replace bson-ext with bson * Revert "chore: update hosting port from 5000 to 5001 for playwright" This reverts commit e5db025. * fix: workspace spec, exists returning null and doc instead of boolean * chore: remove commented code * chore: remove confusing statement * chore: remove unneeded comments * chore: remove duplicated typedef * Revert "chore: remove duplicated typedef" This reverts commit 66f638f. --------- Co-authored-by: foochifa <[email protected]>
kathleenkhy
pushed a commit
that referenced
this pull request
Jan 23, 2024
* chore: bump mongoose to 6.12 * fix: type mismatch on cursorquery, objectid * fix: required and validator shape in user and form model * fix: use try catch block for mongoose connect loader * fix: add missing goLinkSuffix property in IForm * fix: overwrite typing of IPaymentSchema for mongoose Id * fix: querycursor import in submission.ts * fix: removed undefined in AgencySchema causing schema methods to be never * fix: schema typings in form logic and sms types * fix: replace ConnectionOptions with ConnectOptions * fix: remove deprecated connect options * fix: objectid imports * chore: remove mongodb package, upgrade connect-mongo to 4.6.0 * chore: replace mongoerror import reference * fix: typescript errors * chore: change nModified to modifiedCount * fix: typeerror on form_statistics_total.server.model * fix: typeerror on bouncemodel * fix: form server model, only fixed affected methods * fix: mongoerror is now mongoservererror * fix: execPopulate no longer required to be called * fix: verification.model * fix: replace enforcedocument to hydrateddocument * fix: duplicateFormFieldByIdAndIndex * fix: util/logic.ts type inference errors * refactor: swap bson with bson-ext * chore: update test db configs * refactor: remove bson reference * refactor: gloal replacement of bson * chore: remove execPopulate * fix: void promise returns * fix: remove bson reference with mongoose * fix: replace more bson on admin-forms.form.routes.specs * fix: test failures on admin-forms.submissions.routes.spec * fix: test failures on src/app/models * fix: test failures on src/app/modules/payments * fix: test failures on src/app/modules/issues * fix: form model always defaulting to private mode on save * chore: remove bson in jest-db * fix: lint and type errors in loader * chore: remove unused typedef * chore: remove commented out BSON code * fix: playwright mongod init failure * refactor: rename constants * fix: mongoose loader * fix: removed form model business field to be required * fix: e2e email-submission tests * fix: make mongoose.connect to be async * fix: add specific db connection uri * fix: restore missing _id in table column * fix: workspace model support * chore: add verbose playwight reporting * chore: update bson-ext to bson for workspace-related code * fix: dburi should not be random * fix: drop form collection instead of the whole db * chore: update hosting port from 5000 to 5001 for playwright * fix: replace bson-ext with bson * Revert "chore: update hosting port from 5000 to 5001 for playwright" This reverts commit e5db025. * fix: workspace spec, exists returning null and doc instead of boolean * chore: remove commented code * chore: remove confusing statement * chore: remove unneeded comments * chore: remove duplicated typedef * Revert "chore: remove duplicated typedef" This reverts commit 66f638f. --------- Co-authored-by: foochifa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
| MongoDB 4.4 End of Life on February 29, 2024; automatic Atlas cluster upgrades to 5.0
Closes FRM-1294, Closes FRM-1471, Closes #6424
Solution
"mongoose": "^6.12.0",
"@types/mongodb": "^3.6.20",
bson-ext
withbson
. We can choose to migrate offbson
and replace it with eithermongoose.Types.ObjectId
/mongoose.Scheme.Types.ObjectId
accordingly."mongodb-memory-server-core": "^7.6.3",
Breaking Changes
Tests
Full regression test
Deploy Notes
Reminder for engs to rebuild your docker images on local with these flags
--build --rebuild-anon-volumes
as there are several package changes.