fix: include caller job name in coverage artifact names
Metadata
Current evaluation
Merged PR #139 (commit 221d4dd), adding github.job to coverage artifact names so repeated reusable-workflow callers get unique uploads without 409 conflicts.
Resolution: closed resolved
Reason: PR #139 was merged as commit 221d4dd after approval and with all CI checks passing. It prefixes coverage artifact names with the caller's github.job, preventing collisions when test-python.yaml is invoked multiple times.
Evaluated by: mr-cal-bot
No scores available.
Issue body
## Problem
When `test-python.yaml` is called multiple times in the same workflow run (e.g. in [craft-parts](https://github.com/canonical/craft-parts/actions/runs/25734925915/job/75569361111?pr=1583)), the coverage artifact names collide because they only include platform and Python version. This causes `409 Conflict: an artifact with this name already exists on the workflow run` errors on upload.
## Fix
Include `${{ github.job }}` in all coverage artifact names. In reusable workflows, `github.job` resolves to the **caller's** job key, making names unique across callers:
| Before | After |
|--------|-------|
| `coverage-slow-ubuntu-24.04-3.12` | `coverage-test-common-slow-ubuntu-24.04-3.12` |
| `coverage-slow-ubuntu-24.04-3.12` ❌ conflict | `coverage-test-java-plugins-slow-ubuntu-24.04-3.12` ✅ |
## Testing
The existing `self-test-qa.yaml` already exercises this scenario — `test-python-custom` and `test-python-as-root` call `test-python.yaml` with overlapping parameters (`ubuntu-latest`, Python `3.14`, lowest `3.8`). Added a comment documenting this intentional overlap.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #139 (commit 221d4dd), adding github.job to coverage artifact names so repeated reusable-workflow callers get unique uploads without 409 conflicts. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged canonical/starflow#139 in commit 221d4dd, adding the caller job name to coverage artifact names to prevent upload collisions across reusable-workflow calls. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged canonical/starflow#139, adding the caller's job name to coverage artifact names to prevent collisions and 409 upload errors. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for coverage artifact name collisions. Added github.job to artifact names for uniqueness across callers. Copilot resolved conflicts and added token permissions before merging to main. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
10
Confidence:
95
|
needs review | Resolves GitHub Actions coverage artifact name collisions in reusable workflows by including the caller job name. Approved by two reviewers, CI passing, merge conflicts resolved, and ready for final maintainer review and landing. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
15
Confidence:
95
|
needs review | Resolves GitHub Actions artifact name collisions by including the caller job name in coverage artifact names. PR is approved, CI passes, merge conflicts resolved, and ready to merge. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
10
Confidence:
95
|
needs review | Fixes coverage artifact name collisions in reusable workflows by including the caller job name. Approved by one reviewer, all CI checks pass, merge conflicts resolved, and ready for final review and merge. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
15
Confidence:
90
|
needs review | Fixes GitHub Actions coverage artifact name collisions by including the caller job name. Approved by one reviewer, merge conflicts resolved, and ready for maintainer review. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
15
Confidence:
90
|
needs review | Fixes coverage artifact name collisions in reusable workflows by including the caller job name. Approved by one reviewer, merge conflicts resolved, CI passing, awaiting final maintainer review. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
15
Confidence:
90
|
needs review | Fixes GitHub Actions artifact name collisions by including the caller job name in coverage artifact names. Approved by one reviewer, all CI checks passing, awaiting Copilot conflict resolution. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
25
Complexity:
15
Confidence:
85
|
needs review | Adds caller job name to coverage artifact names to prevent GitHub Actions upload conflicts when reusable workflows are called multiple times. Approved by one reviewer, all CI checks passing, but has 7 unresolved review comments. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
55
Complexity:
10
Confidence:
85
|
needs review | Fixes GitHub Actions artifact name collisions in reusable workflows by including the caller job name. Currently awaiting review with no comments or activity for 57 days. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| updated | |
| updated | |
| updated |
Related work
-
Related To:
canonical/craft-parts#1583
(confidence 95%)
Cited as a real-world caller that reproduced the artifact-name collision.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #80 fix: handle arrays in coverage filename | starflow | merged | Merged starflow#80 with a two-line fix to handle array-valued inputs when constructing coverage artifact filenames. |