ADR-0338: A read of the evidence that finds nothing is tried again too
Status: Accepted
Date: 2026-12-01
Amends: 0321: which reads of evidence-* are tried again
Context
The composite action .github/actions/evidence tries a download of
evidence-* again where it fails, and takes one that finds no artifact as
read (ADR-0321).
GitHub also lists an artifact a moment after a job finalized it. In run
46631297109 the job pr finalized evidence-pr (artifact 15479044000), and
the action's download in the same job, steps later, listed "Found 0
artifact(s)" and succeeded with nothing. The overlay then failed with "No job
of this run left evidence, in this attempt or an earlier one", and the same
job run again passed.
Every job that gathers evidence runs after a job that left some, or leaves its own first, so a first attempt's listing that finds none has not seen what was finalized.
Decision
A download of evidence-* that fails, or that leaves the directory it reads
into empty, is tried again after 5 s, 10 s and 20 s, each into the same
directory. The fourth is the last: where it fails the job fails with GitHub's
own message, and where it finds nothing the overlay fails the job as before.
Alternatives considered
- Wait a fixed time before the first read: every gathering job pays it, and no fixed time is known to be enough.
- Read by the artifact id the upload returned: only
pr.ymlgathers in the job that uploaded; the other workflows' gathering jobs hold no ids.
Consequences
- A gathering job whose run left no evidence at all takes 35 s longer to fail.
- A run attempt after the first, whose jobs were not run again, reads nothing new four times before it lays the earlier attempt's evidence: 35 s.