RUBY-3806 Stabilize flaky CI tests and variants#3025
Merged
comandeo-mongo merged 1 commit intomongodb:masterfrom Apr 21, 2026
Merged
RUBY-3806 Stabilize flaky CI tests and variants#3025comandeo-mongo merged 1 commit intomongodb:masterfrom
comandeo-mongo merged 1 commit intomongodb:masterfrom
Conversation
- Restrict poc-transactions-convenient-api.yml unified tests to replica set topology; they flake on sharded clusters due to MigrationConflict forcing a withTransaction retry that violates strict expectEvents. - Disable the jruby-auth Evergreen matrix, which fails wholesale with TLS/EBADF socket errors on jruby-openssl (RUBY-3808). - Retry flaky CSOT deprecated-options "maxTimeMS is ignored if timeoutMS is set" tests (RUBY-3809) and mongos-pin-auto "remain pinned after non-transient" tests (RUBY-3810) by extending Unified::Test#retry?. Reset @entities/@entities_created in Test#cleanup so retry_test builds fresh clients/sessions instead of reusing the closed ones from the previous attempt (otherwise retries hit TRANSACTION_ALREADY_IN_PROGRESS). - Raise CSOT encryption prose test timeouts (timeout_ms 20 -> 50, blockTimeMS 30 -> 200) so the encrypt/createDataKey tests pass reliably on loaded CI hosts. - Switch the ruby-dev ubuntu2404 matrix to MongoDB 8.0 only; the 7.0 enterprise archive is not published for ubuntu2404.
Contributor
There was a problem hiding this comment.
Pull request overview
Stabilizes CI by reducing exposure to known flaky unified tests/variants and adding targeted retries + state reset so reruns are isolated.
Changes:
- Restrict
poc-transactions-convenient-api.ymlunified tests to replica sets (avoid shardedMigrationConflictretry side effects). - Expand unified-spec retry targeting and reset unified entity state during cleanup so retried attempts recreate clients/sessions.
- Adjust CSOT encryption prose spec timing to be more resilient under CI load; update Evergreen variants (ubuntu2404 MongoDB version and disable
jruby-authmatrix).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/spec_tests/data/unified/valid-pass/poc-transactions-convenient-api.yml | Limits topology to replica set to avoid sharded-only flake. |
| spec/runners/unified/test.rb | Adds broader retry patterns and resets entities after each attempt to avoid stale closed clients/sessions. |
| spec/integration/client_side_operations_timeout/encryption_prose_spec.rb | Increases timeouts/block times to reduce intermittent CI failures. |
| .evergreen/config/standard.yml.erb | Updates ruby-dev MongoDB version selection; disables jruby-auth matrix in source template. |
| .evergreen/config.yml | Mirrors Evergreen variant adjustments in the rendered config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jamis
approved these changes
Apr 21, 2026
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.
Summary
Fix or skip the recurring flaky test failures that have been blocking patch builds.
poc-transactions-convenient-api.ymlunified tests flake on sharded clusters viaMigrationConflict→withTransactionretry → extra commandStartedEvents violate strictexpectEvents. Restrict the file-levelrunOnRequirementsto replicaset.jruby-authEvergreen matrix fails wholesale withTLS/EBADFsocket errors on jruby-openssl (4411 failed tests of 24286). Matrix disabled with a comment pointing to the follow-up.deprecated-options.yml"maxTimeMS is ignored if timeoutMS is set" tests flake intermittently on loaded CI. Added toUnified::Test#retry?regex soretry_testwraps them with 3 attempts.poc-transactions-mongos-pin-auto.yml"remain pinned after non-transient" tests flake similarly; also added toretry?. Fixed a retry state leak inTest#cleanup: entity map and@entities_creatednow reset after each attempt, so retries rebuild fresh clients/sessions instead of reusing the closed ones (previously hitTRANSACTION_ALREADY_IN_PROGRESS).timeout_ms(20 → 50) andblockTimeMS(30 → 200) inencryption_prose_spec.rb; the previous values barely passed on Evergreen..evergreen/config/standard.yml.erb—ruby-dev/ubuntu2404matrix now useslatest_stable_mdb(8.0 only) since MongoDB 7.0 enterprise archive is not published for ubuntu2404.