Skip to content

Test against the requested MongoDB version; skip releases that can't start on new kernels - #4404

Merged
evanchooly merged 2 commits into
masterfrom
mongo-test-image
Oct 20, 2026
Merged

evanchooly merged 2 commits into
masterfrom
mongo-test-image

Conversation

@evanchooly

@evanchooly evanchooly commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Unblocks CI. Every PR's Build job, #4403 included, is failing in MongoExtension.beforeAll with Container startup failed for image mongo:8 … Container exited with code 1.

Cause

  • mongo:8 moved 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).
  • The current 8.0 release, 8.0.34, has the same check. 7.0.45, 8.2.12 and 9.0.4 start fine. I checked each image locally on a 7.0 kernel.
  • The version flag was being ignored. MongoExtension and TestBase.withSharding built the image tag from the major version only. So the matrix's 8.3.13, 8.2.12 and 8.0.34 entries, and the 8.0.0 local default, all ran mongo:8. The 8.x entries weren't testing the versions they're named for.

Changes

  • Exact image tags. MongoExtension.imageName(version) uses -Dmongodb as given: mongo:8.2.12 for a full version, or mongo:8.2 for that line's latest release. withSharding uses the same helper.
  • New default. The default changes from 8.0.0 (which ran mongo:8) to 8.2.
  • Matrix filter. BuildMatrix skips 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

  • The core and Kotlin suites pass with the new default (mongo:8.2) under -Dmorphia.mapper=critter and reflection: 1485 + 5 tests, 0 failures.
  • TestSharding's sharded cluster starts on mongo:8.2.
  • -Dmongodb=7.0.45 runs exactly mongo:7.0.45, and TestQuery passes on it.

Decisions to review

  1. The skip lists exact versions (8.0.34, 8.3.13), not whole release lines. This was changed in review. Fixed patch releases come back into the matrix on their own, at the cost of a failing build if a new patch release is still affected.

…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.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 03:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.
@evanchooly
evanchooly merged commit d963bf6 into master Oct 20, 2026
4 checks passed
@evanchooly
evanchooly deleted the mongo-test-image branch October 20, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants