Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#2,046 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, rust
Domain
database, testing

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

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.

Dominant language
Rust
Stars
2
Forks
0
Avg merge
10h 47m
Merged PRs (30d)
241

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from registrystack/registry-stack

All issues in registrystack/registry-stack

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.