Skip to content

Merge v2.4 into v2.x - #1975

Merged
mongodb-drivers-pr-bot[bot] merged 11 commits into
v2.xfrom
merge-v2.4-into-v2.x-1787855609760
Aug 27, 2026
Merged

Merge v2.4 into v2.x#1975
mongodb-drivers-pr-bot[bot] merged 11 commits into
v2.xfrom
merge-v2.4-into-v2.x-1787855609760

Conversation

@mongodb-drivers-pr-bot

Copy link
Copy Markdown
Contributor

Merge new changes from v2.4 into v2.x.

Commits

Resolving conflicts

To resolve any conflicts, check out the temporary branch and run the following command:
git merge v2.x -m "Resolve conflicts in v2.x"

Ignoring changes

To ignore from the remote branch, first reset the temporary branch to v2.x and manually merge using the `ours` merge strategy:
git reset --hard v2.x
git merge --strategy=ours v2.4 -m "Ignore changes from v2.4"

Then, push the temporary branch to update the pull request.

GromNaN and others added 11 commits August 27, 2026 16:27
Database and collection names were only checked for being non-empty. A "." in a database name, or a NUL byte in a database or collection name, shifts the namespace split performed by the server, so operations end up targeting a different database or collection than the caller intended.

Reject "." and NUL bytes in database names, and NUL bytes in collection names. Dots remain legal in collection names.

Add a create_namespace() helper that validates both names and returns the concatenated namespace, and use it in Collection, Database, and all Operation classes that build a namespace by concatenating database and collection names (BulkWrite, Delete, Find, InsertMany, InsertOne, RenameCollection, Update).

Move the shared invalid name data provider to the base TestCase, and add prose test 17 for database and collection name validation.
Database and collection names were only checked for being non-empty. A "." in a database name, or a NUL byte in a database or collection name, shifts the namespace split performed by the server, so operations end up targeting a different database or collection than the caller intended.

Reject "." and NUL bytes in database names, and NUL bytes in collection names. Dots remain legal in collection names.

Add a create_namespace() helper that validates both names and returns the concatenated namespace, and use it in Collection, Database, and all Operation classes that build a namespace by concatenating database and collection names (BulkWrite, Delete, Find, InsertMany, InsertOne, RenameCollection, Update).

Move the shared invalid name data provider to the base TestCase, and add prose test 17 for database and collection name validation.
Bumps [mongodb-labs/drivers-github-tools](https://github.com/mongodb-labs/drivers-github-tools) from 2 to 3.
- [Release notes](https://github.com/mongodb-labs/drivers-github-tools/releases)
- [Commits](mongodb-labs/drivers-github-tools@v2...v3)

---
updated-dependencies:
- dependency-name: mongodb-labs/drivers-github-tools
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Support creating release branches when releasing new versions

* Use same logic as in laravel integration

* Update .github/workflows/release.yml

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>

---------

Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
@codecov-commenter

codecov-commenter commented Aug 27, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
6119 1 6118 1017
View the full list of 6 ❄️ flaky test(s)
MongoDB.Tests.Operation.WatchFunctionalTest::testResumeAfterOption with data set "Codec"

Flake rate in main: 4.82% (Passed 79 times, Failed 4 times)

Stack Traces | 2.13s run time
MongoDB\Tests\Operation\WatchFunctionalTest::testResumeAfterOption with data set "Codec"
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{ "_data" : "826A908D53000000012B042C0100296E5A100494EFF3801BA9423791F6EE652FA31739463C6F7065726174696F6E54797065003C696E736572740046646F63756D656E744B657900461E5F6964002B02000004" }'
+'{ "_data" : "826A908D53000000012B0429296E1404" }'

.../src/tests/TestCase.php:108
.../tests/Operation/WatchFunctionalTest.php:868
MongoDB.Tests.Operation.WatchFunctionalTest::testResumeAfterOption with data set "No codec"

Flake rate in main: 4.26% (Passed 45 times, Failed 2 times)

Stack Traces | 2.14s run time
MongoDB\Tests\Operation\WatchFunctionalTest::testResumeAfterOption with data set "No codec"
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{ "_data" : "826A908E20000000032B042C0100296E5A10045CFFDEAAE509476B8EEECDD144267192463C6F7065726174696F6E54797065003C696E736572740046646F63756D656E744B657900461E5F6964002B02000004" }'
+'{ "_data" : "826A908E20000000032B0429296E1404" }'

.../src/tests/TestCase.php:108
.../tests/Operation/WatchFunctionalTest.php:868
MongoDB.Tests.Operation.WatchFunctionalTest::testRewindExtractsResumeTokenAndNextResumes with data set "No codec"

Flake rate in main: 8.33% (Passed 11 times, Failed 1 times)

Stack Traces | 2.14s run time
MongoDB\Tests\Operation\WatchFunctionalTest::testRewindExtractsResumeTokenAndNextResumes with data set "No codec"
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{ "_data" : "826A908D49000000012B042C0100296E5A1004F75F470F01B44950A6BF730125A989F0463C6F7065726174696F6E54797065003C696E736572740046646F63756D656E744B657900461E5F6964002B02000004" }'
+'{ "_data" : "826A908D49000000012B0429296E1404" }'

.../src/tests/TestCase.php:108
.../tests/Operation/WatchFunctionalTest.php:814
MongoDB.Tests.Operation.WatchFunctionalTest::testStartAfterOption with data set "Codec"

Flake rate in main: 6.90% (Passed 27 times, Failed 2 times)

Stack Traces | 2.13s run time
MongoDB\Tests\Operation\WatchFunctionalTest::testStartAfterOption with data set "Codec"
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{ "_data" : "826A908EC6000000032B042C0100296E5A100418886B73546D4C71BDE31088F2FE23EF463C6F7065726174696F6E54797065003C696E736572740046646F63756D656E744B657900461E5F6964002B02000004" }'
+'{ "_data" : "826A908EC6000000032B0429296E1404" }'

.../src/tests/TestCase.php:110
.../tests/Operation/WatchFunctionalTest.php:916
MongoDB.Tests.Operation.WatchFunctionalTest::testStartAfterOption with data set "No codec"

Flake rate in main: 3.33% (Passed 29 times, Failed 1 times)

Stack Traces | 2.14s run time
MongoDB\Tests\Operation\WatchFunctionalTest::testStartAfterOption with data set "No codec"
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{ "_data" : "826A908EC8000000012B042C0100296E5A1004DE627FF647E843999B6DA084FBF49E48463C6F7065726174696F6E54797065003C696E736572740046646F63756D656E744B657900461E5F6964002B02000004" }'
+'{ "_data" : "826A908EC8000000012B0429296E1404" }'

.../src/tests/TestCase.php:110
.../tests/Operation/WatchFunctionalTest.php:916
MongoDB.Tests.UnifiedSpecTests.UnifiedSpecTest::testSessions with data set "sessions/implicit sessions default causal consistency: afterClusterTime is not sent on retried read in implicit session when readConcern level is snapshot"

Flake rate in main: 50.00% (Passed 1 times, Failed 1 times)

Stack Traces | 0.777s run time
MongoDB\Tests\UnifiedSpecTests\UnifiedSpecTest::testSessions with data set "sessions/implicit sessions default causal consistency: afterClusterTime is not sent on retried read in implicit session when readConcern level is snapshot"
Failed asserting that expected value matches actual value.
$actual count is 0, expected 1
--- Expected
+++ Actual
@@ @@
-MongoDB\Model\BSONArray Object #149365 (
-    0 => MongoDB\Model\BSONDocument Object #149257 (
-        '_id' => 1,
-        'x' => 'snapshot',
-    ),
-)
+MongoDB\Model\BSONArray Object #148747 ()

.../UnifiedSpecTests/Constraint/Matches.php:112
.../tests/UnifiedSpecTests/ExpectedResult.php:48
.../tests/UnifiedSpecTests/Operation.php:164
.../tests/UnifiedSpecTests/UnifiedTestRunner.php:214
.../tests/UnifiedSpecTests/UnifiedTestRunner.php:106
.../tests/UnifiedSpecTests/UnifiedSpecTest.php:299

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@mongodb-drivers-pr-bot
mongodb-drivers-pr-bot Bot merged commit a07dcc8 into v2.x Aug 27, 2026
61 of 64 checks passed
@mongodb-drivers-pr-bot
mongodb-drivers-pr-bot Bot deleted the merge-v2.4-into-v2.x-1787855609760 branch August 27, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants