8000 CI: let the artifact upload retry actually retry by fedorov · Pull Request #562 · QIICR/dcmqi · GitHub
[go: up one dir, main page]

Skip to content

CI: let the artifact upload retry actually retry - #562

Merged
fedorov merged 1 commit into
masterfrom
ci/artifact-upload-retry-overwrite
Sep 11, 2026
Merged

fedorov merged 1 commit into
masterfrom
ci/artifact-upload-retry-overwrite

Conversation

@fedorov
@fedorov fedorov commented Sep 11, 2026
Copy link
Copy Markdown
Member

The package upload in each build job is guarded by a retry step that re-runs actions/upload-artifact under the same artifact name when the first attempt fails. That only helps when the first attempt failed before it registered the name.

What went wrong

On the Intel macOS job of run 34611736400 the upload got a 403 Forbidden at the FinalizeArtifact stage — which runs after CreateArtifact, so dcmqi-macos-x86_64-package was already registered on the run. The retry then failed with

Failed to CreateArtifact: Received non-retryable error: Failed request:
(409) Conflict: an artifact with this name already exists on the workflow run

and because the retry — unlike the first attempt — has no continue-on-error, the job went red even though the build succeeded and all 93 tests passed.

What changes

Each of the four upload retries (linux, linux-arm64, macos, windows) gets:

  • overwrite: true — deletes a matching artifact before uploading, and is documented as "Does not fail if the artifact does not exist", so the one setting covers both failure modes: the name was registered, or it was not.
  • continue-on-error: true — matching what the first attempt already has. Packaging is not what these jobs exist to verify, and a transient upload error should not fail a job whose build and tests passed.

No other behaviour changes; the artifact names, paths and if: conditions are untouched.

Verification

All five workflow files still parse, and each retry step now carries both keys:

cmake-linux.yml: retry steps -> [(build-linux, True, True), (build-linux-arm64, True, True)]
cmake-macos.yml: retry steps -> [(build-macos, True, True)]
cmake-win.yml:   retry steps -> [(build-windows, True, True)]

The failure itself is a first occurrence — the last dozen macOS runs on master are all success or cancelled — so this is about the retry being able to do its job when the flake recurs, not about a persistent breakage.

🤖 Generated with Claude Code

The package upload is guarded by a retry step that re-runs
actions/upload-artifact under the same artifact name when the first
attempt fails. That only helps when the first attempt failed before it
registered the name. When it fails later - as on the Intel macOS job of
run 34611736400, where FinalizeArtifact returned 403 - the name is
already taken, so the retry fails with

    409 Conflict: an artifact with this name already exists on the
    workflow run

and, unlike the first attempt, the retry has no continue-on-error, so a
transient upload error fails a job whose build and tests both passed.

Give the retry overwrite: true, which deletes a matching artifact before
uploading and is documented not to fail when none exists, so it covers
both cases. Give it continue-on-error: true as well, matching the first
attempt: packaging is not what these jobs are there to verify, and a
flaky upload should not red an otherwise green build.

All four upload retries (linux, linux-arm64, macos, windows) had the
same shape and are fixed together.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@fedorov
fedorov merged commit 021ace9 into master Sep 11, 2026
9 checks passed
@fedorov
fedorov deleted the ci/artifact-upload-retry-overwrite branch September 11, 2026 18:26
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

0