-
Notifications
You must be signed in to change notification settings - Fork 17
Add patch release script #2502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add patch release script #2502
Conversation
|
Why a slash command instead of a script? I ask because I have some trust issues with LLMs based on experience, and feel that having code we can validate is safer and easier to reason with when something goes wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a /patch-release Claude Code slash command that automates the scanner patch release process. The command streamlines creating patch releases by handling version detection, validation, git operations, and GitHub release creation.
Key changes:
- Auto-detection of the next patch number when not explicitly provided
- Validation checks for release commit state and sequential patch numbering
- Automated GitHub release creation with proper semantic versioning handling
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This more of an experiment rather than a suggestion on how we should manage scanner releases. These slash commands are just prompt templates, and all "judgement calls" LLM could do are scriptable here. |
|
Would this be better suited for one of the tooling repos? |
Probably. I think this is an example of AI vibe, so tooling might make more sense. I might look into converting these steps into a script, maybe using claude to do it. |
|
@BradLugo Asked Claude to convert this to a script. Can you take a look to see if it makes sense? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
05524ea to
588ee26
Compare
Adds a `/patch-release` command that automates the scanner patch release process. The command handles: - Auto-detection of the next patch number - Validation that HEAD is not already a release commit - Sequential patch number verification - Cherry-pick prompts - GitHub release creation with proper --latest flag handling - Release documentation generation Usage: /patch-release <RELEASE> [PATCH_NUMBER] Example: /patch-release 2.36 (auto-detects next patch) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
The LLM-based slash command has been replaced with a deterministic bash script that provides the same functionality with: - Full testability (--dry-run mode) - Auditability (every command visible in source) - Reproducibility (same input → same behavior) - Proper error handling (set -euo pipefail) Usage: ./scripts/patch-release.sh [--dry-run] [-y] <RELEASE> [PATCH_NUMBER] 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Run release operations in an isolated /tmp worktree instead of checking out the release branch in place. This prevents issues when the script doesn't exist on older release branches. Changes: - Create worktree in /tmp/scanner-release-X.Y.Z-XXXXXX - Cleanup worktree automatically on exit via trap - Preserve worktree when user aborts for manual operations - Use origin/release-X.Y for dry-run checks instead of HEAD Co-Authored-By: Claude Opus 4.5 <[email protected]>
588ee26 to
f723af9
Compare
|
@github-actions[bot]: The Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
/retest scanner-on-push |
|
@github-actions[bot]: The Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@jvdm: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
scripts/patch-release.shto automate the scanner patch release process--latestflag based on semantic versioningUsage
Options:
--dry-run- Preview what would happen without making changes-y, --yes- Skip confirmations (for automation)Examples:
Test plan
./scripts/patch-release.sh --dry-run 2.37to verify workflow