ADFA-4085: Decouple plugin-api release from weekly-release workflow#1328
ADFA-4085: Decouple plugin-api release from weekly-release workflow#1328Daniel-ADFA wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 Walkthrough
Risks and best-practice violations
WalkthroughAdds a manual ChangesPlugin API Release Workflow Separation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release-plugin-api.yml:
- Around line 20-21: Pin the checkout action to a full commit SHA instead of
actions/checkout@v4 and disable credentials by setting persist-credentials:
false (update the actions/checkout usage), and make the release target use the
actual checked-out commit rather than GITHUB_SHA by either checking out ref:
$GITHUB_SHA or changing the gh release command to target the checked-out commit
(e.g., git rev-parse HEAD) so the ref used by gh release create --target
"$GITHUB_SHA" matches the commit you checked out; update references to
actions/checkout@v4, persist-credentials, ref: main, and gh release create
--target "$GITHUB_SHA" accordingly.
- Line 22: The workflow hard-pins the checkout to "ref: main" while the release
command uses $GITHUB_SHA as --target, causing provenance mismatch; update the
actions/checkout step (the block using actions/checkout@... with "ref: main") to
checkout the exact commit used for the release by replacing the hard-coded ref
with the workflow runtime SHA (use the same value used by gh release, e.g.
github.sha / $GITHUB_SHA) and ensure fetch-depth is sufficient (e.g. 0) so the
checked-out commit and tags are available for gh release create --target to
accurately reflect build provenance.
In @.github/workflows/weekly-release.yml:
- Line 291: The finalize job runs the command shown by the shell line "flox
activate -d flox/base -- bash -eo pipefail {0}" but does not check out the
repository first, so add an actions/checkout@v4 step immediately before the step
that runs the flox activate shell command; locate the job or step containing the
exact shell string and insert a preceding step with uses: actions/checkout@v4
(and appropriate with/checkout parameters if needed) so flox/base and repo files
are present when the flox activate command executes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 960696da-ff0b-45ff-b202-b48d344a8e86
⛔ Files ignored due to path filters (1)
flox/base/.flox/env/manifest.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
.github/workflows/release-plugin-api.yml.github/workflows/weekly-release.ymlflox/base/.flox/env/manifest.toml
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/release-plugin-api.yml (1)
50-50: ⚡ Quick winReplace fixed delay with bounded polling before recreate.
A hard wait can still flake on GitHub-side propagation. Prefer a short bounded poll that confirms deletion before
gh release create.Suggested patch
if gh release view plugin-api-latest >/dev/null 2>&1; then gh release delete plugin-api-latest --cleanup-tag --yes - sleep 10 + for i in {1..30}; do + if ! gh release view plugin-api-latest >/dev/null 2>&1; then + break + fi + sleep 1 + done + if gh release view plugin-api-latest >/dev/null 2>&1; then + echo "::error::Timed out waiting for plugin-api-latest deletion to propagate" + exit 1 + fi fi🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release-plugin-api.yml at line 50, Replace the hard-coded sleep 10 in the release step with a bounded polling loop that verifies the previous release is actually deleted before running gh release create; specifically, poll using gh release view (or gh api /repos/:owner/:repo/releases/tags/:tag) in a loop with a short interval (e.g., 2s) and a total timeout (e.g., 60s), exit early when the release is confirmed gone, and fail the job after the timeout so gh release create only runs when deletion is observed. This change targets the workflow step containing the literal "sleep 10" and the subsequent "gh release create" command.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/weekly-release.yml:
- Around line 266-269: The finalize job's checkout step uses actions/checkout@v4
unpinned and omits persist-credentials: false; update the checkout step in the
finalize job (and other jobs with the same pattern) to pin the action to a
specific commit SHA instead of the floating tag (replace actions/checkout@v4
with actions/checkout@<commit-sha>) and add persist-credentials: false under the
with: block to prevent credential persistence and avoid exposure to upstream
changes.
---
Nitpick comments:
In @.github/workflows/release-plugin-api.yml:
- Line 50: Replace the hard-coded sleep 10 in the release step with a bounded
polling loop that verifies the previous release is actually deleted before
running gh release create; specifically, poll using gh release view (or gh api
/repos/:owner/:repo/releases/tags/:tag) in a loop with a short interval (e.g.,
2s) and a total timeout (e.g., 60s), exit early when the release is confirmed
gone, and fail the job after the timeout so gh release create only runs when
deletion is observed. This change targets the workflow step containing the
literal "sleep 10" and the subsequent "gh release create" command.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c2404687-06e0-4478-8025-85a5ac99b28a
📒 Files selected for processing (2)
.github/workflows/release-plugin-api.yml.github/workflows/weekly-release.yml
No description provided.