Conversation
There was a problem hiding this comment.
Review Summary
Found 1 critical issue in the release workflow that needs to be addressed before merging. The CAGENT_VERSION file is not being included in the release commit, which could cause inconsistencies between the tagged release and what gets published.
32b7546 to
e8ddf21
Compare
There was a problem hiding this comment.
Review Summary
This PR successfully refactors the release workflow to use workflow_dispatch with automated versioning and introduces a single source of truth for the cagent version via the CAGENT_VERSION file. The implementation is generally solid, but there's a reliability issue with the sed operations that modify workflow files during release creation.
Found 1 issue requiring attention:
- Missing error handling for sed operations that modify critical workflow files
e8ddf21 to
0bea9dd
Compare
|
/review |
There was a problem hiding this comment.
Review Summary
✅ This PR successfully modernizes the release workflow with automated versioning and ref pinning. The approach is sound, but there are two issues in the changed code:
- MEDIUM severity: Incomplete verification of @latest ref pinning could allow orphaned unpinned refs in tagged releases
- LOW severity: Error messages reference the wrong filename (action.yml instead of CAGENT_VERSION)
The other concerns raised (TOCTOU race conditions, file staging, file existence checks) are either mitigated by existing safeguards or dismissed as non-issues.
Signed-off-by: Derek Misler <derek.misler@docker.com>
0bea9dd to
e603458
Compare
Summary
Replace the tag-triggered release workflow with a
workflow_dispatchrelease that computes the version, pins internal@latestrefs to the release tag, and publishes to Docker Hub — all without pushing commits to main.git write-tree/git commit-tree) where@latestrefs inreview-pr/action.ymlandreview-pr.ymlare replaced with@vX.Y.Z, then tags that commit as bothvX.Y.Zandlatest— main is never modifiedCAGENT_VERSIONfile replaces thecagent-versioninput that was hardcoded in 5 places;action.ymlreads it at runtime, release workflow reads it at publish timeChanges
CAGENT_VERSION.github/workflows/release.ymlworkflow_dispatchwith version calc, ref pinning via detached commit, and Docker Hub publishaction.ymlcagent-versioninput; reads fromCAGENT_VERSIONfile insteadreview-pr/action.ymlcagent-versioninput and pass-through.github/workflows/review-pr.ymlcagent-versioninput and pass-throughREADME.md,review-pr/README.mdcagent-versionfrom docsHow the release works
vX.Y.Z@latest→@vX.Y.Zin working tree, creates detached commit via git plumbingvX.Y.Zandlatest, pushes tags onlyTest plan
vX.Y.Z:review-pr/action.ymlhas pinned@vX.Y.ZrefsvX.Y.Z:.github/workflows/review-pr.ymlhas pinned@vX.Y.Zrefs@latestrefs (unchanged)vX.Y.Z