Repository navigation
Test against the requested MongoDB version; skip releases that can't start on new kernels - #4404
Merged
Merged
Conversation
…start MongoExtension and withSharding built the image tag from the major version only, so every 8.x matrix entry (8.3.13, 8.2.12, 8.0.34) and the 8.0.0 default ran mongo:8. That tag moved to 8.3.13, which refuses to start on Linux 6.19 and newer (SERVER-121912), failing every test class. The image tag is now the requested version as given, and the default is 8.2, whose current release starts. The build matrix skips the 8.0 and 8.3 lines, whose current releases have the same startup check, until a fixed release ships.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes consistently implement the intended version selection and exclusions, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Corrects MongoDB version selection in Morphia’s test infrastructure and avoids release lines affected by newer-kernel startup failures.
Changes:
- Preserves requested MongoDB image tags for standard and sharded tests.
- Changes the default MongoDB version to
8.2. - Temporarily excludes MongoDB 8.0 and 8.3 from the CI matrix.
| File | Description |
|---|---|
| core/src/test/java/dev/morphia/test/TestBase.java | Uses shared version and image helpers for sharded tests. |
| core/src/test/java/dev/morphia/test/MongoExtension.java | Centralizes image selection and sets the new default. |
| .github/BuildMatrix.java | Filters affected release lines and documents removal conditions. |
Review effort: Balanced
Filter 8.0.34 and 8.3.13 by version instead of skipping the whole 8.0 and 8.3 lines, so fixed patch releases are picked up automatically.
This file contains hidden or 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
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.
Unblocks CI. Every PR's Build job, #4403 included, is failing in
MongoExtension.beforeAllwithContainer startup failed for image mongo:8 … Container exited with code 1.Cause
mongo:8moved to MongoDB 8.3.13 on 2026-10-17. That release refuses to start on Linux 6.19 and newer: "MongoDB cannot start: Linux kernel versions 6.19 and newer has a known incompatibility with this version of MongoDB" (SERVER-121912).MongoExtensionandTestBase.withShardingbuilt the image tag from the major version only. So the matrix's8.3.13,8.2.12and8.0.34entries, and the8.0.0local default, all ranmongo:8. The 8.x entries weren't testing the versions they're named for.Changes
MongoExtension.imageName(version)uses-Dmongodbas given:mongo:8.2.12for a full version, ormongo:8.2for that line's latest release.withShardinguses the same helper.8.0.0(which ranmongo:8) to8.2.BuildMatrixskips exactly 8.0.34 and 8.3.13, with a comment pointing at SERVER-121912, so the matrix is now['9.0.4', '8.2.12', '7.0.45']. A later 8.0 or 8.3 patch release is picked up automatically. If one of those is still broken, CI fails until it's added to the list.Verified
mongo:8.2) under-Dmorphia.mapper=critterand reflection: 1485 + 5 tests, 0 failures.TestSharding's sharded cluster starts onmongo:8.2.-Dmongodb=7.0.45runs exactlymongo:7.0.45, andTestQuerypasses on it.Decisions to review