Repository navigation
Conversation
|
I will reformat the title to use the proper commit message syntax. |
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe MongoDB Node.js driver is upgraded to 7.7.0. MongoDB-version-specific tests are updated. MongoDB 9.0.2 is added to the test command and CI matrix, and the README now lists MongoDB 9. ChangesMongoDB 9 support
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium
|
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title begins with the required feat: prefix and clearly describes the MongoDB 9 support changes. |
| Description check | ✅ Passed | The description includes the issue, approach, implementation details, testing results, and completed documentation and test tasks. It omits the template's standard Pull Request security and license se… |
| Linked Issues check | ✅ Passed | Issue #10750 requires MongoDB 9.0.2 CI coverage, README compatibility documentation, the mongodb driver upgrade to 7.7.0, and updates for MongoDB 9 behavior changes. The changes add MongoDB 9.0.2 wi… |
| Out of Scope Changes check | ✅ Passed | The changes stay within issue #10750. The CI, README, dependency, lockfile, specification, and source-comment changes support MongoDB 9 compatibility. No unrelated change is demonstrated. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3… |
| Security Check | ✅ Passed | No security vulnerability is introduced by the reviewed changes. Production MongoDB code changes only comments; the query and index logic is unchanged. The new CI and npm values are fixed version stri… |
| Engage In Review Feedback | ✅ Passed | No review feedback comments were present. The supplied review data reports zero actionable findings and no CodeRabbit review threads, so there was no feedback to ignore or resolve without engagement. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com>
MongoDB's client compatibility tables list Node.js driver 7.6+ as fully compatible with MongoDB 9.0; 7.1.0 is not tested against 9.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- maxTimeMS specs assert the error code instead of the message, which differs on MongoDB 9, and use a wider time margin to absorb the startup overhead of the WASM engine that runs server-side JavaScript on MongoDB 9. - The geoNear "no index" error includes the field name again on MongoDB 9; only MongoDB 8.3 to 8.x omits it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@mtrezza MongoDB 9 support is now consolidated in this PR, as you suggested: CI matrix + docs, driver upgrade to The PR is ready for review. Could you approve the CI workflows? They haven't run yet on this PR. |
Signed-off-by: Manuel <5673677+mtrezza@users.noreply.github.com>
Issue
Closes: #10750
Approach
Adds MongoDB 9 support in a single PR: CI coverage, a driver that MongoDB lists as compatible with 9.0, and the test adjustments needed for the suite to pass on MongoDB 9.
CI and docs
check-mongoCI matrix and atest:mongodb:9.0.2npm script.Driver
mongodbfrom7.1.0to7.7.0. MongoDB's client compatibility table lists Node.js driver 7.6+ as fully compatible with MongoDB 9.0, 7.3 to 7.5 as partially compatible, and 7.1 as not tested.bson7.3.1 → 7.3.3,@mongodb-js/saslprep1.4.12 → 1.6.0, and the nestedmongodb@7.5.0undermongodb-runneris deduplicated.Specs
A full local run on MongoDB 9.0.2 (replica set) had 3 failures. All three are in specs that hardcode server behavior that changed in MongoDB 9. None of them comes from the driver upgrade: the same failures occur with driver 7.1.0.
MongoStorageAdapter find … maxTimeMS(×2): MongoDB 9 runs server-side JavaScript ($where) in a WASM engine. It still returnsMaxTimeMSExpired(code 50), but with a different message, and its startup overhead of roughly 200 ms made asleep(125)exceed a 250 ms limit. The specs now assert the error code instead of the message and use a 1000 ms limit withsleep(250)/sleep(2000). They also useasync/expectAsync, becausedone.failis not a function in the current Jasmine version.MongoCollection lazy geo index creation: MongoDB 9 includesfield=<name>again in the geoNear "no index" error; only 8.3 to 8.x omits it. The version ranges of the two specs and the related source comments are updated. Runtime behavior is unchanged: the adapter already handles both message formats.Tests
MongoStorageAdapter.spec.jsandMongoCollection.spec.jspass on every MongoDB version in the CI matrix: 7.0.16, 8.0.4, 8.3.4 and 9.0.2.Tasks
Summary by CodeRabbit