Skip to content

RUBY-3806 Stabilize flaky CI tests and variants#3025

Merged
comandeo-mongo merged 1 commit intomongodb:masterfrom
comandeo-mongo:flaky-tests
Apr 21, 2026
Merged

RUBY-3806 Stabilize flaky CI tests and variants#3025
comandeo-mongo merged 1 commit intomongodb:masterfrom
comandeo-mongo:flaky-tests

Conversation

@comandeo-mongo
Copy link
Copy Markdown
Contributor

@comandeo-mongo comandeo-mongo commented Apr 21, 2026

Summary

Fix or skip the recurring flaky test failures that have been blocking patch builds.

  • RUBY-3806poc-transactions-convenient-api.yml unified tests flake on sharded clusters via MigrationConflictwithTransaction retry → extra commandStartedEvents violate strict expectEvents. Restrict the file-level runOnRequirements to replicaset.
  • RUBY-3808jruby-auth Evergreen matrix fails wholesale with TLS/EBADF socket errors on jruby-openssl (4411 failed tests of 24286). Matrix disabled with a comment pointing to the follow-up.
  • RUBY-3809 — CSOT deprecated-options.yml "maxTimeMS is ignored if timeoutMS is set" tests flake intermittently on loaded CI. Added to Unified::Test#retry? regex so retry_test wraps them with 3 attempts.
  • RUBY-3810 — Sharded poc-transactions-mongos-pin-auto.yml "remain pinned after non-transient" tests flake similarly; also added to retry?. Fixed a retry state leak in Test#cleanup: entity map and @entities_created now reset after each attempt, so retries rebuild fresh clients/sessions instead of reusing the closed ones (previously hit TRANSACTION_ALREADY_IN_PROGRESS).
  • CSOT encryption prose tests — bumped timeout_ms (20 → 50) and blockTimeMS (30 → 200) in encryption_prose_spec.rb; the previous values barely passed on Evergreen.
  • .evergreen/config/standard.yml.erbruby-dev / ubuntu2404 matrix now uses latest_stable_mdb (8.0 only) since MongoDB 7.0 enterprise archive is not published for ubuntu2404.

- 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.
Copilot AI review requested due to automatic review settings April 21, 2026 11:01
@comandeo-mongo comandeo-mongo requested a review from a team as a code owner April 21, 2026 11:01
@comandeo-mongo comandeo-mongo requested a review from jamis April 21, 2026 11:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.yml unified tests to replica sets (avoid sharded MigrationConflict retry 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-auth matrix).

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.

Comment thread .evergreen/config/standard.yml.erb
Comment thread .evergreen/config.yml
@comandeo-mongo comandeo-mongo merged commit 8c2daca into mongodb:master Apr 21, 2026
201 checks passed
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.

3 participants