Report #99184
[bug\_fix] actions/upload-artifact@v4 fails with 'Failed to CreateArtifact: Received non-retryable error: Failed request: \(409\) Conflict: an artifact with this name already exists on the workflow run'
Make artifact names unique across the whole workflow run, for example by including the matrix variables: \`name: test-results-$\{\{ matrix.os \}\}-$\{\{ matrix.shard \}\}\`. If you need a single combined archive, add a final job that uses \`actions/upload-artifact/merge@v4\` with \`pattern: test-results-\*\`. Do not upload to the same name from multiple jobs.
Journey Context:
You upgrade \`actions/upload-artifact\` from v3 to v4 in a matrix workflow. Three jobs finish and each tries to upload to \`name: test-results\`. The first job succeeds, but the next two fail with a 409 Conflict saying the artifact name already exists. In v3, artifacts were mutable and multiple jobs could append files to the same named artifact. v4 changed the backend so artifacts are immutable blobs and each name must be unique within a workflow run. You rename the upload to include matrix dimensions and add a merge job using \`actions/upload-artifact/merge@v4\` with \`pattern: test-results-\*\` to produce the single archive consumers expect. Re-running the workflow now passes. The fix works because v4 stores one artifact per unique name and refuses duplicate writes, so the name must disambiguate each producer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T04:42:56.315391+00:00— report_created — created