CI flake: BReg webhook test fixtures collide on clock-named temporary roots
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with DestinationFixture::new in crates/registry-breg/tests/postgres_webhook_delivery.rs, then the same function in postgres_webhook_outbox.rs and unique_role in postgres_spatial_storage.rs. Compare them with postgres_package.rs, which already adds a process-wide AtomicUsize sequence to its temporary names. Done when all three generated names include that sequence and the affected test binaries still pass under products/breg/scripts/test-postgres.sh.
Written by the indexing model from the issue text.
Description
What happens
real_postgres_webhook_delivery_finishes_prior_package_work_after_compatible_upgrade failed once in products/breg/scripts/test-postgres.sh --lane all on macOS:
panicked at crates/registry-breg/tests/postgres_webhook_delivery.rs:2831:39:
package root creates: Os { code: 17, kind: AlreadyExists, message: "File exists" }
It passed on an immediate rerun of the same binary, with no code change.
Cause
DestinationFixture::new in crates/registry-breg/tests/postgres_webhook_delivery.rs names its temporary root breg-webhook-delivery-{nanos}-{pid}. Tests in one binary run in parallel in one process, so the pid is shared. On macOS SystemTime::now() advances in microsteps, so two fixtures created in the same microsecond get the same root. The first create_dir_all succeeds for both, and the second create_dir(package) fails.
The same pattern is in:
crates/registry-breg/tests/postgres_webhook_outbox.rsDestinationFixture::new(clock and pid only;create_dir(&root)fails on a collision);crates/registry-breg/tests/postgres_spatial_storage.rsunique_role(clock only, for a PostgreSQL role name).
postgres_package.rs, postgres_startup.rs, startup_ordering.rs and runtime_config.rs already add a process-wide AtomicUsize sequence to the name. That is the fix for the other three.
Fix
Add the same sequence counter to the two DestinationFixture::new functions and to unique_role.
Seen while gating the product cleanup round for #2040 on 16 October 2026. On Linux CI the nanosecond clock makes a collision unlikely, but not impossible.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- Avg merge
- 10h 47m
- Merged PRs (30d)
- 241
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from registrystack/registry-stack
-
area:release criticality:p3 documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
registrystack/registry-stack#2085 ·
Maintainers usually reply within 1 day
-
area:casework criticality:p3
Difficulty 1/5 Under an hour Newbie friendliness 94/100
registrystack/registry-stack#2084 ·
Maintainers usually reply within 1 day
-
area:casework bug criticality:p3 rust
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
registrystack/registry-stack#1934 ·
Maintainers usually reply within 1 day
-
area:release area:scheduling bug criticality:p3 triage:needs-implementation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
registrystack/registry-stack#1909 ·
Maintainers usually reply within 1 day
-
area:release bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
registrystack/registry-stack#1874 ·
Maintainers usually reply within 1 day
All issues in registrystack/registry-stack
Similar issues
-
agent duplicate providers tool triaged
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
founders_reward panics on a configured Testnet when the slow-start subsidy is not a multiple of 5Openexternal-contribution
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ZcashFoundation/zebra#11792 ·
Maintainers usually reply within 1 day
-
content:edit documentation effort:high
Difficulty 1/5 1-3 hours Newbie friendliness 67/100
cloudflare/cloudflare-docs#34428 ·
Maintainers usually reply within 1 day
-
area/cli bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100