Repository navigation
Description
Wait for #293. Its pull request, #294, adds a job to
.github/workflows/testing.yaml, and this repository takes one change
at a time. Start once that has merged.
Summary
The action downloads the build artefact by name and fails on the first lookup that finds nothing. Since 21 November GitHub's artefact service can fail to list an artefact for a second or two after its upload, so a download that follows an upload in the same job often fails although the artefact exists. Retry the download a bounded number of times before failing.
This repository's tests are the visible casualty. They build, or upload a fixture, and then audit in one job: 8 of the 12 test runs since the onset failed on this, among them all four pushes to main. A caller that builds and audits in one job is exposed in the same way. python-workflows is not, because its audit job runs after its build job.
Line numbers are from 965bc9b on main.
Evidence
Twelve downloads missed, in eight runs. Each came within 2.2 s of the upload it followed, and each artefact was in its run's list afterwards.
| Job | Misses | Gap after the upload |
|---|---|---|
Test Custom Artefact Name |
6 | 0.30–0.46 s |
Test No Wheels Guard |
3 | 0.32–1.07 s |
Run Tests 🧪 |
3 | 1.73–2.20 s |
The runs: 44910286262, 45210544160, 45215109014, 45218678979, 45226951254, 45294845176 (three jobs), 45410377843 (three jobs) and 45412674238, which passed when its failed job was re-run with no change.
The miss has two messages. Nine read Artifact not found for name. Three read No artifacts found for ID, and those follow a lookup by name that worked, as in run 44910286262:
13:43:47.687 Artifact no-wheels-fixture successfully finalized. Artifact ID 14708489740
13:43:48.469 Downloading single artifact
13:43:48.631 - no-wheels-fixture (ID: 14708489740, Size: 155, Expected Digest: sha256:8d1ce5db…)
13:43:48.758 ##[error]Unable to download artifact(s): No artifacts found for ID: 14708489740
Both lookups are the same ListArtifacts call with a different filter (getArtifactInternal and downloadArtifactInternal in @actions/artifact). They ran 0.13 s apart and disagreed. So the listing lags after an upload, whichever filter asks.
The tests passed on main at 12:47 UTC on 21 November and missed at 13:43 UTC. The job that missed first builds nothing: it uploads a fixture with actions/upload-artifact and runs this action with artefact_name set, and both pins date from 15 October. That points at a change on GitHub's side. It is an inference: GitHub's status page lists no incident for it.
Cause
action.yamllines 214–222 hold oneactions/download-artifactv8.0.2 step, with no second attempt.- That step looks the artefact up by name and then again by ID. Either lookup can miss just after the upload.
Test Custom Artefact NameandTest No Wheels Guardpassartefact_name, which skips thenamingstep, so their download starts a third of a second after the upload.Run Tests 🧪resolves the name first and starts about two seconds after it. Thetests-python-project-typejob that Fix: Declare the Python project type #294 adds has the shape ofRun Tests 🧪.
Changes
- Give the download a fixed, documented number of attempts with a short wait between them, for example three attempts with waits of 5 s and 15 s. Fix: Retry the artefact download by name pypi-publish-action#240 proposes five attempts over about thirty seconds for the same fault; use one figure in both actions if that change has merged first.
- Retry whenever the download step fails. This action cannot tell a miss from another failure: a later step reads only the download step's
outcome, andartefact_pathmay hold files before the download, so an empty directory proves nothing here. A project at the repository root that builds in the same job leavesdist/behind, andRun Tests 🧪downloads into the samedist/three times. - The last attempt's failure fails the action, as a failed download does today. No step after the download may run once every attempt has failed, so that wheels already in
artefact_pathare never audited in place of the artefact. - On final failure, name the artefact and say how many attempts were made.
- Keep the artefact's name,
artefact_path, theCheck artefact nameguard and the pinnedactions/download-artifactcommit as they are. - One way to do this in a composite action is to repeat the download step behind
continue-on-error: trueand a check on the previous attempt's outcome, with a wait step between attempts. Any approach that meets the criteria below is fine. - Describe the retry in
README.md, in the paragraph on the artefact download.
Tests
- Keep the jobs that build and audit in one job as they are, with no sleep and no split. They are the ones that exercise the real lookup, and they are how this change shows on
main. - Add a pytest module in the style of
tests/test_artefact_name_guard.py, which reads the steps out ofaction.yaml. It should show that each later attempt runs only when the one before failed, that a wait lies between attempts, that the last failure is not swallowed, and that no step after the download can run once every attempt has failed.tests/test_artefact_name_guard.pyandtests/test_install_step_guard.pyfind the download step by its name and expect one such step; bring them along. - Add a job to
.github/workflows/testing.yamlthat runs the action with anartefact_namenothing uploaded, and checks that it failed after the last attempt, in the download and not in a later step. The invalidpermit_failcase inRun Tests 🧪shows one way to tell where an action failed.
A miss followed by a find cannot be staged on demand. The existing jobs supply it: before this change, most runs lose at least one of them.
Acceptance criteria
- A failed download is retried a fixed, documented number of times, with a wait between attempts
- When every attempt fails, the action fails with an error naming the artefact and the number of attempts, and no later step runs
- A download that succeeds at once behaves as before, with no added wait
- The tests above pass on the pull request, and the existing jobs are unchanged
- The README documents the retry
- Repository hooks pass; Zizmor's
auditorpersona reports no findings in changed workflow or action files
Related
- Fix: Retry the artefact download by name pypi-publish-action#240 covers the same fault in the publishing action; its first comment carries further evidence.
- build-artifact-action run 45294303187 shows the same lag as
(409) Conflict: an artifact with this name already exists, when an upload withoverwrite: truefollows 0.3 s after an upload of the same name. That repository is not part of this issue.
Notes for an automated author
- The new job lives in a workflow file, so this issue needs a dispatch with
allow_workflow_edits=true. uses: $/is this repository's self-reference and is correct; do not change it to./.
Activity
ModeSevenIndustrialSolutions commentedon Nov 24, 2026
#294 has merged, so this can start. lfreleng-actions/pypi-publish-action#242 has merged too, which settles the figures: use the ones it uses.
max_attemptsanddelaysinscripts/retry-download.shthere, and the same chain of download and check steps in itsaction.yamlis a working model for the step layout.artefact_pathmay hold files before the download, so retry on any failure of the download step, as the issue says.The schedule is enough for the fault as measured. On
mainofpypi-publish-action, in the first run after that change merged (45431465897):The artefact was missing 1.8 s after its upload and listed 4.2 s after it.
The latest push to
mainhere failed on the same miss inRun Tests 🧪andTest Custom Artefact Name(run 45425956106), 1.8 s and 0.2 s after their uploads. Those two jobs are the ones to watch on the pull request.Test: Add expected-fail download retry tests
Fix: Retry the artefact download
CI: Test the artefact download retry
lf-releng-code-monkey-bot commentedon Nov 24, 2026
🐒 An AI agent has proposed a change for this issue: pull request #296 (head 2a2bf68). The Copilot review of it is clean. Checks failed on its head: Test Custom Artefact Name.