Repository navigation
ci: release only commits whose CI passed - #591
Conversation
The release workflows now fail in their first job unless a successful run of ci.yml exists for a push of the tagged commit, so nothing is published for a commit whose CI failed or never ran. The error says to re-run the workflow once CI passed. Docs updated. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Reviewer's GuideRelease preparation and chart testing now verify through the GitHub Actions API that a push-triggered Sequence diagram for CI-gated release publishingsequenceDiagram
actor Maintainer
participant ReleaseWorkflow
participant GitHubActionsAPI
participant PublishJobs
Maintainer->>ReleaseWorkflow: Push release tag
ReleaseWorkflow->>GitHubActionsAPI: gh api actions/workflows/ci.yml/runs
GitHubActionsAPI-->>ReleaseWorkflow: Successful push run for GITHUB_SHA
alt CI run exists
ReleaseWorkflow->>PublishJobs: Allow downstream release jobs
PublishJobs-->>Maintainer: Publish release artifacts
else CI missing or still running
ReleaseWorkflow-->>Maintainer: Fail and request workflow rerun
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #591 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 56 56
Lines 7068 7068
=========================================
Hits 7068 7068
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#590 ci: release only commits whose CI passed · 5 of 5 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Require a successful ci.yml run for a push of the tagged commit before release. |
✅ Met | Both release workflows query for a successful push-triggered CI run matching GITHUB_SHA and fail if none exists. |
| 2 | Tell maintainers to rerun the release workflow once CI has passed. | ✅ Met | Both checks emit an error instructing maintainers to rerun the workflow once CI passed. |
| 3 | Gate every publishing job on the CI check. | ✅ Met | The package release's publishing jobs depend directly or transitively on prepare; chart publishing depends on test, which runs the check. |
| 4 | Add workflow tests where the repository tests workflows. | ✅ Met | The repository has no workflow tests; its existing tests cover citation handling. |
| 5 | Update the release documentation. | ✅ Met | The contributing and Helm chart release docs describe the CI prerequisite and rerun behavior. |
Sourcery assessment
Approved.
Summary
release.yml(jobprepare, "Prepare release") andrelease-chart.yml(jobtest, "Test chart release") now fail unless a successful run ofci.ymlexists for a push of the tagged commit. The step, API query and error text are those of the other repos' release workflows (step "Check that CI passed for the release commit"); the jobs getactions: readat job level only. Every publishing job already depends onprepare(push,release-image, transitivelyscan,pypi,publish) ortest(publishin the chart workflow). Docs updated (docs/contributing/index.md,docs/helm-chart.md).Closes #590
Verification
actionlintandzizmor --offlineon the workflows: no new findings (pre-existing SC2102 info inci.ymland zizmor lows are unrelated).Lane
Regular lane (release workflows): adversarial and quality review, one round. No high or medium findings; later fixes were comments and docs only.
Declined review findings
REPOSITORYtoGH_REPO: declined, the reference repos useREPOSITORY.|| truearound the API call: not added; a transient API error fails safely and a re-run fixes it.Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Gate library and Helm chart releases on successful CI for the tagged commit.
Bug Fixes:
Enhancements:
CI:
Documentation: