Skip to content
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

Merged
merged 2 commits into from Nov 12, 2020

Conversation

youngoli
Copy link
Contributor

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:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status --- --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

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.
@youngoli
Copy link
Contributor Author

R: @ibzib @kennknowles
CC: @lostluck

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}
Copy link
Contributor

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?

Copy link
Contributor Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@ibzib ibzib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lostluck
Copy link
Contributor

Run Java PreCommit

Copy link
Contributor

@lostluck lostluck left a 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.

@youngoli youngoli merged commit 9681467 into apache:master Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants