Repository navigation
ci: remove repeated test runs from mongodb-rust and the integration shards - #911
Open
LeeroyHannigan wants to merge 3 commits into
Open
LeeroyHannigan wants to merge 3 commits into
LeeroyHannigan wants to merge 3 commits into
Conversation
mongodb-rust passed --rust to run-mongodb-tests, which runs the whole workspace's `cargo test` against the job's server. On main's push run for 76b9710 that took 11 minutes. Building the workspace's test binaries took 3 min 54 s, and running every crate's tests took 7 minutes. The Test workflow runs the same tests on stable and on 1.88. The job now passes only --rust-integration. The tests that need MongoDB still run against a replica set: - records_live and the five migration test files run in the storage-level sections of run-mongodb-tests. Their condition now names both Rust suites. - The data_engine and backup_engine live tests and the restore fence cells run under --rust-live. - The snapshot_engine tests run in mongodb-snapshot, with EXTENDDB_TEST_MONGODB_REQUIRED set. No other workspace test reads EXTENDDB_TEST_MONGODB_URI.
LeeroyHannigan
requested review from
amrith,
c33howard,
eliseong,
hitesh96db,
jcshepherd,
navareamol,
pdf-amzn and
robinnsc
as code owners
November 9, 2026 14:43
The comment said that the records_live and migration sections of run-mongodb-tests run for either Rust suite. They run when the arguments name --rust or --rust-integration, and not for --all, which run-tests expands to both suites. The comment now says so, and it names the tests that mongodb-rust runs in these sections.
On the CI run of d9528e6 (run 42637473269), every shard of run-integration and run-integration-sqlite ran tests/test_backup_store_config.py and tests/test_backup_job.py by name. The two files took 2 min 52 s to 3 min 8 s on each PostgreSQL shard. The S3 mock took 22 to 28 s more. On each SQLite shard the two files took 4 min 28 s to 4 min 30 s. Each SQLite shard also ran the store configuration suite a second time inside devtools/run-tests, against an S3 mock of its own. That run took 2 min 45 s to 2 min 46 s. - PostgreSQL: the new run-integration-backup job runs the two files once, with the shards' PostgreSQL service, the S3 mock and the same environment. The integration job needs it. The CLI lifecycle list of devtools/run-tests still runs the store configuration suite's PostgreSQL cells on one shard. - SQLite: the shards run neither file. devtools/run-tests skips its SQLite backup store block in a run with --shard. The shards no longer start the S3 mock, whose one reader was that block. run-integration-sqlite-s3 runs both files on the same build with the S3 mock. On run 42637473269 it passed every test that a SQLite shard passed in either of those runs. The timeout comments give the measured times and the projected time of a shard.
This branch has not been deployed
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.
What
Two jobs ran tests that CI also runs elsewhere in the same run.
mongodb-rust
CI's mongodb-rust job no longer runs the whole workspace's
cargo test. It randevtools/run-mongodb-tests --rust-live -- --rust --rust-integration. The--rustsuite ofdevtools/run-testsrunscargo testover all 14 workspace crates. The job now runsdevtools/run-mongodb-tests --rust-live -- --rust-integration.devtools/run-mongodb-testsnow names both Rust suites in the condition of its storage-level sections (records_live and the migration tests). The old condition matched the substring--rust, which--rust-integrationalso contains. Without--rust, the old condition selects these sections only because of that match. The new condition names--rust-integration, so the job does not depend on the substring.The integration shards
Every shard of run-integration (PostgreSQL) and run-integration-sqlite ran
tests/test_backup_store_config.pyandtests/test_backup_job.pyby name. Each SQLite shard also ran the store configuration suite insidedevtools/run-tests.devtools/run-testsstill runs the store configuration suite's PostgreSQL cells on one shard.devtools/run-testsskips its SQLite backup store block in a run with--shard. The shards no longer start the S3 mock, whose one reader was that block. run-integration-sqlite-s3 already ran both files on the same build with an S3 mock.Why
The mongodb-integration check waits for six jobs, and mongodb-rust finishes last. On main's push run for 96a6b6f, the workspace
cargo testtook 12.2 of the job's 31.8 minutes. Cargo compiled the test binaries in 4 min 58 s and ran them in 7 min 12 s. The Test workflow runs the same test binaries on stable and on 1.88.0.The integration check waits for the shards. On this PR's run for d9528e6 (run 42637473269), the PostgreSQL shards took 16 min 52 s to 18 min 14 s. The two files took 2 min 52 s to 3 min 8 s of that, and their S3 mock 22 to 28 s more. The SQLite shards took 20 min 6 s to 21 min 52 s. The two files took 4 min 28 s to 4 min 30 s of that. The run inside
devtools/run-teststook 2 min 45 s to 2 min 46 s more. Without these runs, the PostgreSQL shards should take 13 min 38 s to 14 min 44 s. The SQLite shards should take 12 min 26 s to 14 min 7 s. Both are projections from the same run.Testing done
mongodb-rust
EXTENDDB_TEST_MONGODB_REQUIRED=1.--rust-live.EXTENDDB_TEST_MONGODB_REQUIRED=1.EXTENDDB_TEST_MONGODB_URIorEXTENDDB_TEST_MONGODB_REQUIRED. The Test workflow runs every test binary of the workspacecargo test. It has no MongoDB server, so the migration and snapshot_engine tests skip there.EXTENDDB_ADMIN_USERandEXTENDDB_ADMIN_PASSWORD, which run-mongodb-tests exports. When the environment has them, an in-memory or dev SQLite open in crates/storage-sqlite passes them tobootstrap_dev_rows. The workspace tests passed both with and without them.--rust,--rust-integration,--rust --rust-integration,--pytest --comprehensive --paralleland--pytest --parallel --filter backup. They also give the same result for all 255 combinations of the eight suite flags of run-tests.bash -npasses on devtools/run-mongodb-tests. shellcheck reports one info finding there: SC2329, for thecleanupfunction thattrapcalls. Main's copy of the script gives the same finding. actionlint passes on the workflow.cargo testin mongodb-rust=== Rust tests (debug)section.The integration shards
devtools/run-testspassed 13 tests of the store configuration suite.extenddb initon a catalog of its own.devtools/run-testsruns the store configuration suite in a run without--shard. For shards 1/3 and 2/3 it prints a skip line.bash -npasses on devtools/run-tests, and shellcheck gives the same finding there as on main's copy.devtools/run-testspassed 12 and skipped 5, and its run by name passed 28 and skipped 4. Each SQLite shard printed the skip line.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.