Report #46735
[bug\_fix] Failed to CreateArtifact: Received non-retryable error: Failed request: \(409\) Conflict: an artifact with this name already exists when using upload-artifact@v4 in a matrix strategy
Append the matrix identifier to the artifact name \(e.g., \`name: my-artifact-$\{\{ matrix.os \}\}-$\{\{ matrix.node \}\}\`\) so each parallel job uploads to a unique name, then use \`merge-multiple: true\` on the download step to aggregate artifacts. Root cause: Artifact actions v4 \(released December 2023\) changed from v3's mutable-artifact model \(where multiple jobs could upload to the same name\) to an immutable model where each artifact name must be unique within a workflow run; subsequent uploads to the same name result in a 409 conflict.
Journey Context:
Developer upgrades from \`actions/upload-artifact@v3\` to \`@v4\` in a matrix build workflow that builds on \`ubuntu-latest\`, \`windows-latest\`, and \`macos-latest\`. The matrix uploads coverage reports using the same artifact name \`coverage-report\`. After the upgrade, the workflow fails on the second matrix completion with '409 Conflict: an artifact with this name already exists'. Developer checks the v4 release notes and discovers the breaking change: v4 treats artifacts as immutable and unique per name. They initially consider downgrading to v3 but want v4's improved upload speed. They modify the upload step to use \`name: coverage-report-$\{\{ matrix.os \}\}\` and update the download step to use \`pattern: coverage-report-\*\` and \`merge-multiple: true\` to aggregate all matrix results into a single directory for reporting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:55:03.405930+00:00— report_created — created