Skip to content

ci(release): wait out transparency-log outages before retrying attestation - #1402

Merged
c-vigo merged 3 commits into
devfrom
chore/1399-attest-retry-backoff
Aug 10, 2026
Merged

c-vigo merged 3 commits into
devfrom
chore/1399-attest-retry-backoff

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

1.7.0-rc1 and rc2 both died in publish when the public-good Sigstore
transparency log timed out. The outer retry we had — sleep 30 between two
attempts — 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/attest hardcodes DEFAULT_TIMEOUT = 10000 and DEFAULT_RETRIES = 3
into 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_RETRY apply to the registry push, not to Rekor.

Since Actions cannot loop over a uses: step, more attempts would have meant a
third 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/log every 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 the
    helper with a 600s budget instead of sleep 30. Attempt/retry structure is
    otherwise untouched: attempt 1 stays continue-on-error, the retry still
    fails the job.
  • release.yml — publish timeout raised 30 → 45 min. Publishing itself
    runs ~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) — stubs curl and sleep to
    drive 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 timeout
    outlasts both waits.
  • Full local suite green: 590 bats, 462 pytest (docker/image/integration
    deselected locally, CI covers them), just precommit clean including
    actionlint 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-signing input
would 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

@c-vigo c-vigo added this to the 1.7.1 milestone Aug 10, 2026
@c-vigo
c-vigo merged commit 77acc65 into dev Aug 10, 2026
13 checks passed
@c-vigo
c-vigo deleted the chore/1399-attest-retry-backoff branch August 10, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant