Repository navigation
ensure_bucket: wait until the bucket answers (the baselines flake's NoSuchBucket race) - #217
Merged
Merged
Conversation
…e since #176) The baselines flake's cause, printed by #211's diagnostic on main 40dcc92: HTTP 404 NoSuchBucket. In one test binary, baselines' tests all create the bucket at once on a fresh RustFS; one gets 409 while another's create is in progress, and its upload then finds no bucket. ensure_bucket now polls HEAD bucket until it answers (up to 10 s).
ndbroadbent
force-pushed
the
fix/test-bucket-race
branch
from
December 4, 2026 17:22
eb92380 to
597a8ca
Compare
ndbroadbent
added a commit
that referenced
this pull request
Dec 4, 2026
…og when it fails #217 didn't end the baselines flake: run 47389263799 (#222) still got NoSuchBucket on first uploads, after HEAD bucket had answered. Every failure was in the burst of concurrent creates as the one test binary starts, so the fixture now creates the bucket once per process (a tokio OnceCell), and a failed app job prints the store's log.
ndbroadbent
added a commit
that referenced
this pull request
Dec 4, 2026
…og when it fails (#225) #217 didn't end the baselines flake: run 47389263799 (#222) still got NoSuchBucket on first uploads, after HEAD bucket had answered. Every failure was in the burst of concurrent creates as the one test binary starts, so the fixture now creates the bucket once per process (a tokio OnceCell), and a failed app job prints the store's log.
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.
Fixes the root cause of the baselines flake that #176 brought, which turned main red on 40dcc92 (run 47378633259).
#211's diagnostic printed the store's answer:
Cause: with every integration test in one binary, baselines' tests are the first to touch storage. They all call
fixtures::blob_store()→ensure_bucket()at once on a fresh RustFS. A caller can get 409 (already exists, counted as success) while another caller's create is still in progress, and its upload straight after gets NoSuchBucket. Before #176, an earlier test binary had created the bucket long before.Fix: after the create call answers 200 or 409,
ensure_bucketwaits until HEAD on the bucket answers (100 ms polls, up to 10 s). It's only used by the test fixture and in development; production buckets come from Terraform.Locally, on fresh Postgres and RustFS containers: the full app test binary passes (350), and clippy is clean.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.