Fix workflow-dispatch action triggering of code-coverage#673
Conversation
coverage-upload was missing setup in its needs list and was missing ref: and repository: in its checkout step. Without those, on a workflow_dispatch run where main advances between the coverage job starting and the coverage-upload job starting (which happened in PR Framework-R-D#668), the upload job checks out a different commit than the one coverage was actually measured on. Codecov then tries to upload for that wrong commit SHA, which it has no record of, producing the 404.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
|
| Layer / File(s) | Summary |
|---|---|
Job ordering .github/workflows/coverage.yaml |
coverage-upload now requires both setup and coverage before running. |
Codecov checkout .github/workflows/coverage.yaml |
The Codecov mapping checkout step now uses needs.setup.outputs.ref and needs.setup.outputs.repository. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~5–15 minutes
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title matches the core change: fixing the code-coverage workflow_dispatch behavior in the coverage workflow. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment @coderabbitai help to get the list of available commands.
|
19 fixed, 0 new since branch point (41c3534) ✅ 19 CodeQL alerts resolved since the branch point
Review the full CodeQL report for details. |
I've been having trouble running the code-coverage via
workflow_dispatchonmain(see https://github.com/Framework-R-D/phlex/actions/runs/28241141170/job/83669733668).Diagnosis by Claude Sonnet 4.6
coverage-uploadwas missingsetupin its needs list and was missingref:andrepository:in its checkout step. Without those, on aworkflow_dispatchrun wheremainadvances between the coverage job starting and the coverage-upload job starting (which happened in PR #668), the upload job checks out a different commit than the one coverage was actually measured on. Codecov then tries to upload for that wrong commit SHA, which it has no record of, producing a 404..github/workflows/coverage.yamlsocoverage-uploadnow waits on bothsetupandcoverage.refandrepositoryvalues fromneeds.setup.outputs, ensuring the upload job checks out the same commit/repo used to generate coverage.mainand avoids Codecov 404s for unknown commit SHAs whenmainadvances between jobs.