Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

CI flake: BReg webhook test fixtures collide on clock-named temporary roots

Aperta Adatta ai principianti
#2,046 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
postgresql, rust
Ambito
database, testing

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

area:breg bug criticality:p3 triage:needs-implementation

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.rs DestinationFixture::new (clock and pid only; create_dir(&root) fails on a collision);
  • crates/registry-breg/tests/postgres_spatial_storage.rs unique_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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di registrystack/registry-stack

Tutte le issue di registrystack/registry-stack

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.