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
[BEAM-11074] build_release_candidate usability improvements. #13290
Conversation
Specifically, this change checks whether a tag exists before calling the gradle release plugin, allowing the user to either delete the existing tag or skip creating the tag. Also avoids going into interactive commit messages with SVN, instead using commit messages built-in to the script.
R: @ibzib @kennknowles Kenn, adding you as a reviewer because one of my changes basically reverts a change you made in an old commit. I found it slightly user unfriendly because one moment the script is just running and then suddenly you're thrown into an interactive commit prompt without much context about what to do. Going back to having the script prompting seems more user-friendly, and also means that the script can automatically set a commit message. |
echo "Delete the tag and create a new tag commit (y) or skip this step (n)? [y/N]" | ||
read confirmation | ||
if [[ $confirmation = "y" ]]; then | ||
git push origin :refs/tags/v${RELEASE}-RC${RC_NUM} |
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.
Can you add a comment explaining how this deletes the tag?
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.
Done.
git push origin :refs/tags/v${RELEASE}-RC${RC_NUM} | ||
fi | ||
fi | ||
if [[ $confirmation = "y" ]]; then # Expected to only be "n" if user chose to skip creating tag. |
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.
if [[ $confirmation = "y" ]]; then # Expected to only be "n" if user chose to skip creating tag. | |
if [[ $confirmation = "y" ]]; then # Expected to be "y" unless user chose to skip creating tag. |
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.
Done.
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.
LGTM
Run Java PreCommit |
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.
Thank you! This is very helpful.
Specifically, this change checks whether a tag exists before calling the gradle release plugin, allowing the user to either delete the existing tag or skip creating the tag. Also avoids going into interactive commit messages with SVN, instead using commit messages built-in to the script.
Note that the original intention behind this change is to allow finer-grained skipping in the release candidate script to avoid problems if steps need to be repeated if a release candidate fails. For example, in the current implementation if a release candidate fails after creating a release candidate tag and that step gets run again, it'll cause an error due to trying to create an existing tag. I tried to read through the script to find other instances where repeating a step might be problematic, but I couldn't really find anything else that isn't already skippable. Reviewers, let me know if I missed any.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.