CI flake: BReg webhook test fixtures collide on clock-named temporary roots
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia da DestinationFixture::new in crates/registry-breg/tests/postgres_webhook_delivery.rs, poi la stessa funzione in postgres_webhook_outbox.rs e unique_role in postgres_spatial_storage.rs. Confrontali con postgres_package.rs, che aggiunge già ai nomi temporanei una sequenza AtomicUsize a livello di processo. È completato quando tutti e tre i nomi generati includono quella sequenza e i binari di test interessati continuano a passare con products/breg/scripts/test-postgres.sh.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 2
- Fork
- 0
- Merge medio
- 10h 32m
- PR unite (30g)
- 256
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di registrystack/registry-stack
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
registrystack/registry-stack#2168 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
registrystack/registry-stack#2162 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
registrystack/registry-stack#2161 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
registrystack/registry-stack#2160 ·
I maintainer di solito rispondono entro 1 giorno
-
area:breg bug criticality:p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
registrystack/registry-stack#2150 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di registrystack/registry-stack
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
fritzprix/libr-agent#2165 ·
I maintainer di solito rispondono entro 1 giorno
-
area:ecosystem bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Chelis-Lang/chelis#3942 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
review-bot
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno