Repository navigation
ci(release): wait out transparency-log outages before retrying attestation - #1402
Merged
Merged
Conversation
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1.7.0-rc1 and rc2 both died in
publishwhen the public-good Sigstoretransparency log timed out. The outer retry we had —
sleep 30between twoattempts — capped the whole envelope at about 2 minutes, shorter than the
incident that hit us.
The action already retries internally, so widening had to happen on our side:
@actions/attesthardcodesDEFAULT_TIMEOUT = 10000andDEFAULT_RETRIES = 3into the Rekor witness (4 attempts at 0/+1/+2/+4s, ~47s per step) and exposes no
input to change it. Confirmed against the pinned bundle;
OCI_TIMEOUT/OCI_RETRYapply to the registry push, not to Rekor.Since Actions cannot loop over a
uses:step, more attempts would have meant athird and fourth copy of each attestation block. Instead the wait got
smarter: it polls the transparency log until it answers again, up to a 10-minute
budget, and returns the moment the service is actually back.
Changes
.github/scripts/wait-for-rekor.sh(new) — settles 30s, then probes${REKOR_URL}/api/v1/logevery 30s until it responds or the budget runs out.Always exits 0: deciding the release's fate is the retry step's job, and a
non-zero exit here would abort the job before that retry ever ran. Tunable via
REKOR_URL/REKOR_SETTLE_SECONDS/REKOR_PROBE_INTERVAL/REKOR_WAIT_SECONDS.release.yml— both attestation waits (provenance and SBOM) call thehelper with a 600s budget instead of
sleep 30. Attempt/retry structure isotherwise untouched: attempt 1 stays
continue-on-error, the retry stillfails the job.
release.yml—publishtimeout raised 30 → 45 min. Publishing itselfruns ~5 min (measured across the 1.7.0 candidates); two full waits could burn
20 min, which would have hit the old ceiling and failed the release on the
timeout instead.
Coverage goes from ~2 minutes to ~12 per attestation, and the common case gets
faster — a 40-second blip no longer costs a flat 30-second sleep.
Testing
tests/bats/wait-for-rekor.bats(new, 5 tests) — stubscurlandsleeptodrive a simulated clock: returns as soon as the log answers, keeps probing
while it is down, gives up at the deadline without failing the step,
probes the configured URL, and always settles before the first probe.
tests/test_workflow_attest_retry_backoff.py(new, 8 tests) — workflow shape:waits poll rather than sleep, the budget is minutes-scale, the guards keep the
happy path free, attempt 1 is soft and the retry is final, retry and attempt
stay in lockstep, no third copy of the
uses:blocks, and the job timeoutoutlasts both waits.
deselected locally, CI covers them),
just precommitclean includingactionlint and shellcheck.
Notes
The remaining acceptance criterion — exercising this on a release candidate — is
inherently deferred to the next train; the path only runs when an attestation
actually fails, so it cannot be proven green in PR CI.
Out of scope, recorded on the issue: the undocumented
private-signinginputwould sidestep public-good Rekor entirely but destroys public verifiability, and
decoupling SBOM attestation from the publish critical path is a larger design
change that deserves its own issue if this proves insufficient.
Closes #1399