-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add tests against multiple MongoDB versions #7161
Conversation
* commit 'ccb045b68c5b4d983a90fa125513fc476e4e2387': fix: upgrade @graphql-tools/links from 6.2.4 to 6.2.5 (parse-community#7007) fix: upgrade pg-promise from 10.7.0 to 10.7.1 (parse-community#7009) fix: upgrade jwks-rsa from 1.10.1 to 1.11.0 (parse-community#7008) fix: upgrade graphql from 15.3.0 to 15.4.0 (parse-community#7011) update stale bot (parse-community#6998) fix(beforeSave/afterSave): Return value instead of Parse.Op for nested fields (parse-community#7005) fix(beforeSave): Skip Sanitizing Database results (parse-community#7003) Fix includeAll for querying a Pointer and Pointer array (parse-community#7002) Init (parse-community#6999)
Codecov Report
@@ Coverage Diff @@
## master #7161 +/- ##
==========================================
+ Coverage 93.90% 93.92% +0.02%
==========================================
Files 169 169
Lines 12547 12547
==========================================
+ Hits 11782 11785 +3
+ Misses 765 762 -3
Continue to review full report at Codecov.
|
We did run into an issue when we where trying to migrate to Github Actions. We use 4.0.4 of mongo since it was the only version that works with the tests. You can view the conversation (trial and error) here |
@dplewis All test pass now, they did not pass because:
In fact, Parse Server was not fully compatible since MongoDB 4.2 (2019). To make sure this doesn't happen again, I added a compatibility table to the README. We should keep an eye on the MongoDB support policy and update the MongoDB versions we test against. Maybe subscribe our official email to release announcements. @TomWFox Any idea how we can remind ourselves regularly? TODOs after merging this PR:
|
…Elastic Beanstalk)
If there is no objection, I will go ahead and merge this later today. |
…-localization * commit 'b59517fd68a56885c9ab73525526e42ff4003333': Add tests against multiple MongoDB versions (parse-community#7161) # Conflicts: # CHANGELOG.md # README.md # package-lock.json
* commit '7f47b0427ea56214d9b0199f0fcfa4af38794e02': Add page localization (parse-community#7128) Improve contribution guide (parse-community#7075) fix: upgrade pg-promise from 10.9.0 to 10.9.1 (parse-community#7170) Add tests against multiple MongoDB versions (parse-community#7161) fix: upgrade mime from 2.4.7 to 2.5.0 (parse-community#7166) fix: upgrade pg-promise from 10.8.7 to 10.9.0 (parse-community#7168) fix: upgrade apollo-server-express from 2.19.1 to 2.19.2 (parse-community#7165) Upgrade @node-rs/bcrypt to latest version (parse-community#7159) Run Prettier after Definitions (parse-community#7164)
I noticed that the Parse Server repo only has Snyk as required passing test. Shouldn't these MongoDB tests and the others (Postgres, Node 12) be required as well? @davimacedo @dplewis |
Where do you see that @mtrezza ? |
In the repo Settings > Branches > Branch Protection Rules > Edit > Require status checks to pass before merging. |
Yes. I've just seem it here. I believe we should include these checks. @dplewis thoughts? |
I agree, I never noticed out of habit. |
I've just activated. Let's see how it works. |
* added tests environment with mongodb 4.4.3 * added CI test for mongodb 4.4.3 * added CI tests for MongoDB versions 4.0, 4.2 * improved flaky test (seems to max out the limit of simultaneous connections) * added spec helpers to run tests only for specific MongoDB version * addedn npm scripts to run tests against relevant mongodb versions * added spec helper function to exclude specific mongodb version * added test for changed aggregate query planner results * fixed regex test with incorrect regex syntax * fixed test where query has select no keys (empty array) * added changelog entry and ordered list * fixed test that tried to simultaneously delete and build index on same collection * added MongoDB compatibility table to readme * updated default local tests to use MongoDB 4.4.3 * added MongoDB badges for new versions to README * fixed typo in readme * added new test helper filter to contribution guide * fixed incorrect storage engine for mongodb 4.4 * changed CI to test MongoDB 3.6. with mmapv1 storage engine and standalone * improved CI test description * added CI self check for new MongoDB versions * fixed CI * removed CI * added CI * added throwing error if any of the checks failed * added github action connector * improved error message * improved error messages * improved error message * updated CI environment to MongoDB 3.6.22 * improved error messages * update CI env name * updated CI env name * improved error message * removed patch versions from CI env description * improved status message * removed version range from core lib * added explicit mongodb version to redis test and node 12 test * bumped Node 12 test to 12.20.1 (version currently recommended by AWS Elastic Beanstalk)
🎉 This change has been released in version 5.0.0-beta.1 |
🎉 This change has been released in version 5.0.0 |
New Pull Request Checklist
Issue Description
Add tests for multiple MongoDB versions.
Related issue: closes #7160
Approach
it_only_mongodb_version(version)
that only executes a test if the specified semver version satisfies the MongoDB version; allows to write duplicates tests for MongoDB versions and easily discard them by their semver notation once testing for a specific MongoDB version is removed from the CI.npm run test:mongodb:4.4.3
; or simply run against any version the developer prefers withnpm run test:mongodb --dbversion=[VERSION]
.TODOs before merging