GeezerVison is showing github.com — chore(release): add dry-run to release tool prepare command by rickeylev · Pull Request #3869 · bazel-contrib/rules_python
Conversation
rickeylev
commented
Jun 29, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
To enable safe testing of the release pipeline, this change introduces a --dry-run flag to the prepare command that simulates all repository and GitHub actions.
This also fixes a few issues with the prepare command not fully working
end-to-end.
Along the way, factor out the code a bit. release.py was over 1000 lines and
becoming unwieldly.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
gemini-code-assist[bot] reacted with eyes emoji
…afe testing of the release pipeline, and refactor the tool's codebase into modular components to improve maintainability. This structure is verified by an updated test suite using temporary directories and package-level mocking.
rickeylev
changed the title
chore(release): add dry-run to prepare
chore(release): add dry-run to release tool prepare command
Jun 29, 2026
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.
Code Review
This pull request refactors the release tool by modularizing the monolithic release.py into smaller, dedicated modules: prepare.py, release_issue.py, shell.py, and utils.py. It also introduces custom exceptions for tracking issues, simplifies pull request creation, and adds a dry-run mode to the prepare subcommand. The test suite has been updated to reflect these structural changes. Feedback on the changes highlights a fragile manual parsing of git status output in prepare.py when staging files, suggesting a more robust alternative using git add -u.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
aignas
Awaiting requested review from aignas
aignas is a code owner
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.