Skip to content

fix(workflows): retry nix-hashes compute-hash on transient failure#30743

Open
jerome-benoit wants to merge 5 commits into
anomalyco:devfrom
jerome-benoit:fix/nix-hashes-retry-on-transient-failures
Open

fix(workflows): retry nix-hashes compute-hash on transient failure#30743
jerome-benoit wants to merge 5 commits into
anomalyco:devfrom
jerome-benoit:fix/nix-hashes-retry-on-transient-failures

Conversation

@jerome-benoit
Copy link
Copy Markdown
Contributor

@jerome-benoit jerome-benoit commented Jun 4, 2026

Issue for this PR

Closes #30742

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Wraps compute-hash in .github/workflows/nix-hashes.yml with a 3-attempt retry loop and 10s/20s linear backoff. Successful builds short-circuit on the first attempt; structural failures still surface with the full build log.

How did you verify your code works?

YAML syntax check passes. Real flaky runs will exercise the retry once merged.

Screenshots / recordings

N/A.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

The compute-hash matrix step intermittently fails on transient
`bun install` package resolution errors during `nix build` (e.g.
run 26936133588: "error: wrangler@4.50.0 failed to resolve" for ~25
packages on macos-15-intel).

Adds a 3-attempt retry loop with linear backoff (10s, 20s) around the
build + hash extraction. Success criterion is unchanged (hash
extracted from fakeHash mismatch log); structural failures still
surface with the full log after the final attempt.
- Replace magic number 3 with MAX_ATTEMPTS variable
- Use bash arithmetic for loop
@jerome-benoit jerome-benoit changed the title chore: retry compute-hash on transient failure in nix-hashes workflow fix(workflows): retry nix-hashes compute-hash on transient failure Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nix-hashes workflow fails on transient infrastructure errors

1 participant