-
Notifications
You must be signed in to change notification settings - Fork 308
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
New release and pr-commit scripts #860
New release and pr-commit scripts #860
Conversation
Looks awesome, @fnothaft! One question: with the |
One thing I noticed with the 0.17.1 release process, the link to CHANGES.md on the releases page does not contain the 0.17.1-related changes https://github.com/bigdatagenomics/adam/blob/adam-parent_2.11-0.17.1/CHANGES.md linked from here https://github.com/bigdatagenomics/adam/releases/tag/adam-parent_2.11-0.17.1 → Release Notes |
Test PASSed. |
This PR resolves that issue.
That is correct; it will automatically rebase. My general thought is that as long as the branch has no merge conflicts, doing a rebase will achieve the same results as Jenkins achieves when it merges the branch into master when testing in the PR builder. |
@fnothaft (catching up on some GH notifications) So Jenkins doesn't just check out the PR branch, but it actually creates a merge commit before running tests? This is not how I would expect it to work. In my experience, there have definitely been rebases/merges that finish smoothly but produce unexpected results. |
If we look at the latest ADAM-prb build, it is doing:
The last line (
Long story short, the branch |
These two commits contain two changes:
script/commit-pr.sh
that automates the process of FF merging a PR from the command line.Branch-then-release model
Recently, someone (@ryan-williams?) mentioned the idea of moving to a branch-then-release model. Here, we would make a branch, and then make the release off of this branch. The release commits would not show up on the master branch. This would make it easier to make maintenance releases. Although the Maven release plugin contains a goal for releasing from a branch, the general consensus is that this goal works with SVN but not with Git (I tested this out and this does seem to be the case). It seems like many people advocate the "Gitflow" release approach; however, that seemed like a radical departure from our current model, so I decided not to go that route.
In this PR, we make an update on the starting branch (presumably master, but this is not hardcoded in the scripts, in case we want to make a maintenance release) to the
CHANGES.md
file. We then make a branch for the Scala 2.10 release, and run the typical Maven release process there. Finally, we make a branch from our starting branch for the Scala 2.11 release. On this branch, we move the pom.xml files from Scala 2.10 to Scala 2.11, and then run the Maven release process. If we start with this structure:Once the release completes, our repo will look like this:
Once both Scala 2.10 and 2.11 releases succeed, the release script updates the pom.xml's on the master branch to the new development version.
PR Commit scripts
There are two problems with the PR merge button in Github:
The
./scripts/commit-pr.sh
script will checkout a single PR, rebase those changes on master, and then merge the changes into master as a fast-forward merge. If there are multiple commits in a pull request, the script will prompt the user as to whether they would like to continue with the merge. If it is a PR where the multiple commits should not be squashed down (like this one), the user can sayy
to continue, and the merge will go on. If the commits should be squashed, the user can sayn
to stop the merge, and then manually squash the commits from there. The script will print out the directions for finishing the merge, in the case that it aborts.If we want to merge a pull request (
#1
) started from thedocs
branch in the picture below:We would run
./scripts/commit-pr.sh 1
, which will do the above, and lead to the following branch structure: