-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Release procedure notes #3254
Comments
https://github.com/rvagg/gfm2html is another tool of mine I find useful in this process, making local html versions of markdown like they would be rendered on github |
The instructions were quite helpful. Thank you. Couple of nits:
|
@rvagg ... couple more bits on this: the process for doing a RC release should be included and this would likely be best as a file in the docs folder. I can open a PR for that a bit later. |
Note: when running |
I landed a big update to |
Refs: nodejs#3254 PR-URL: nodejs#4540 Reviewed-By: James M Snell <jasnell@gmail.com>
This is for discussion with @nodejs/release and intended as a first step in updating https://github.com/nodejs/node/blob/master/doc/releases.md to be better reflective of current practice.
Given that myself and @Fishrock123 have been cutting the majority of recent releases, certainly the only ones for io.js v3 and Node.js v4 and that we both would like to see additional members of @nodejs/release be empowered to cut releases and actually start doing so, I wanted to document some of the recent procedures I've been following to make a release happen so that we can update our docs and land on a shared agreement of how it should be done. So here it is!
1. Cherry-picking from master (or other)
This is something we should be doing often but it probably should be limited to a subset of maintainers, I would suggest that the @nodejs/release team be responsible for this with @nodejs/lts guiding how the LTS branches are maintained. In practice I've been doing most of this since we switched to the master-as-primary model, Jeremiah has also done some along the way. We don't have nightlies re-enabled yet so it's not as vital but it will become important that we do it very regularly so that our nightlies on stable branches have changes to build and users can start testing them in between releases.
I have a tool to help me with this, branch-diff that is like a
git log b1..b2
but uses our metadata to make proper comparisons. When I runbranch-diff v4 master
I get a similar output to changelog-maker (because they share some code) showing me the commits inmaster
that are not inv4
, calculated by comparing the commit summary (first line) and thePR-URL
. So far this has worked really well and it'll also show the semver tags we attach so thesemver-minor
andsemver-major
commits are obvious. The only drawback is that whenPR-URL
is left off accidentally, which it often is, the commit will show up because it's unsure if it's a duplicate or not.For example, running this right now shows 47 commits, some of which are meant to be cherry-picked, some of which are semver-major and some of which are missing a
PR-URL
, here's a snippet:(you can also use
--simple
to make it more console friendly but I like having the full URLs that I can click on in my console).In this case, the release commits and version bump (5.0.0) don't get cherry-picked, there's a few that don't have
PR-URL
like**doc**: update AUTHORS list
which was my fault, and there's alsodns: remove nonexistant exports.ADNAME
which has the wrongPR-URL
and should be showing assemver-major
(I had to force push this out of thev4.x
branch when someone pointed out that I had accidentally brought it over prior to 4.1.2—fwiw I consider force pushing less of a crime on these release branches when you're doing this kind of work because there's so few of us touching those branches).2. Propose a release
Release proposal timing is largely based on how long it's been since we've had a release and the kind of commit-debt we have built up. We have a few objectives to meet wrt release cadence IMO:
We seem to have carried over the approximate once-per-week cadence that we had for much of io.js (or aimed for anyway) and for v4 we are averaging just under once every 7 days. My personal comfort level would be somewhere around once every 1.5 weeks so it's not a relentless "patch Tuesday" type deal.
Also, we don't release at the end of the week. Based on strong feedback (a.k.a. criticism), users don't want releases on a Friday, so if it gets too late in the week then punt till Monday.
Release proposals should live for at least 24 hours, in practice they live for 48+ hours before resulting in tagging. Get a proposal up even when you have a vague idea of timing, best to start the process on GitHub early than rushing it through to meet a deadline.
Proposing a release is a matter of making a pull request now, using the following steps:
v4.1.2-proposal
src/node_version.h
to set the version number right and setNODE_VERSION_IS_RELEASE
to0
changelog-maker --group
to get the commits list of the changelog, use--simple
if you want to view it on your console without markdown and use--start-ref=vX.Y.Z
to begin the commits from the last release if there has been a tag created since the last release on that branch (i.e. the start point is uses is calculated by grabbing the last tag in the repo and assuming it's the last release but this often not the case, particularly when we have multiple branches cutting releases). If you use--start-ref
note that you'll also get the release commit and theWorking on X.Y.Z+1
commit which you should not include in the changelog—they are removed automatically when you let changelog-maker decide the start-ref for you.changelog-maker
after new commits and edit the Notable Items.3. Test and maintain PR
Now is the time for testing. Use CI on the release branch, as many times as necessary to have confidence that all's well with that code. Continue to do this as more commits are cherry-picked into this branch.
Perform some smoke-testing. We have citgm for this, it's not been quite ready when I've tried to use it extensively for this and often fall-back to manually testing a bunch of ecosystem modules. We also have a job in Jenkins called smoker that uses citgm to run across a bunch of these modules on different platforms but it's not quite ready yet either. The trickiest bit here is doing cross-platform checks which is where Jenkins + citgm is supposed to make life so much better, we'll get there but as a releaser you should probably be contributing to making citgm even better! Remember that node-gyp and npm both take a
--nodedir
flag to point to your local repository so that you can test unreleased versions without needing node-gyp to download headers for you.Continually update the PR, edit the OP with new commits, amend the release commit as new changes make it in, etc.
4. Build
When the time is right and the code is stable, make sure your release commit is ready. Check out previous release commits to make sure it looks right (e.g.
git show v4.1.2
to see an example). The commit itself should include a summary of predictable format, such as2015-10-05, Version 4.1.2 (Stable) Release
and the Notable Items in the commit description. I usually take the rendered HTML version of the Notable Items and paste it in then reformat to have the right line-length and indenting for the commit message.**Do not tag the commit until you have successful builds*.
Build using the iojs+release job (yes it needs renaming still ..) by pointing at your HEAD commit (the release commit). This can involve some pain and yak shaving:
Each of the slaves doing the builds will push their tarballs/packages to the webserver in that staging directory when they are done, they will wait there until you manually promote. Multiple runs of the Jenkins build job with the same parameters will result in the binaries going into the same place, so it's not a one-shot deal.
5. Test your builds
Jenkins collects the artifacts from the builds so you can go into the slaves for your build and grab tarballs and packages to test out the new build to make sure it's what you wanted (make sure version number is right, do some basic checks to confirm that it's all good before moving forward).
6. Tag
Only one you've got successful builds that you're happy with should you tag. This is so that you can bail on a release if something goes wrong at the last minute and more commits/changes are needed to the code. One tagged and the tag is pushed to the repo you _should not_ delete and re-tag. If you make a mistake after tagging then you'll have to version-bump and start again and count that tag/version as lost.
Tag summaries have a predictable format, look at a recent tag to see,
git tag -v v4.1.2
. The message should look something like2015-10-05 Node.js v4.1.2 Release
.Tag using something like this:
git tag v4.1.2 -sm '2015-10-05 Node.js v4.1.2 Release'
. The tag must be signed using the GPG key that's listed for you on the project README, that's where the-s
comes in.Push the tag to the repo before you promote the builds. Part of the promotion process involves some code scraping code from the repo by using the tag for the version you are promoting in order to populate index.json and index.tab. If you haven't pushed your tag before promoting then this won't work properly.
7. Update the repo
This means two things:
src/node_verisions.h
to setNODE_VERSION_IS_RELEASE
back to0
and increment theNODE_PATCH_VERSION
value. Then commit with a predictable summary, the format we've been using is something like this:Working on v4.1.3
). This new commit goes to the branch you released on.master
so it has your CHANGELOG information (the website points to this but that's just one reason to do this. After cherry-picking, editsrc/node_version.h
and make sure it's what it was onmaster
, i.e. don't bring any changes to that file from the release branch, leave it as themaster
version number.8. Promote
Use
tools/release.sh
to promote your builds. This logs in to the server and runs the promotion process for you, you'll be prompted for ay
orn
when it finds something to promote, then when it's done it'll make a SHASUMS.txt and ask you to sign it with your GPG key so it can upload that to the release directory.Note that promotion is only final for builds that are in staging. Any additional builds, including replacement builds, that land in staging can be promoted with
tools/release.sh
. You shouldn't be promoting new tarballs or packages to overwrite existing ones for any release (the shasum should be final for each file) but you can use it to add new tarballs or packages to the release. In practice this is normally about adding ARMv6 binaries when they are done. Just runtools/release.sh
again to make this happen and you'll be prompted again and will have to sign the new SHASUMS.txt that now includes your new files.9. Announce release on nodejs.org
There is an automatic build that is kicked off when you promote new builds, so within a few minutes nodejs.org will be listing your new version as the latest without you having to do anything extra. But the blog post is not yet fully automatic.
Clone new.nodejs.org,
npm install
, and run./scripts/release-post.js
. This has been contributed by @phillipj who has been very responsive in adjusting it to work better with each release, be sure to provide feedback. The program will inspect the latest promoted version and create a new post for you using all of the information it can collect.*Coming soon*
next to them. It's your responsibility to update these later when you have builds and it's a manual process of editing the post to add in the links.master
on the new.nodejs.org repo will trigger a new build of nodejs.org so your changes should appear in a few minutes after pushing.10. Announce on twitter
Link to the download directory for your builds, link to the changelog, mention the version and @-mention
@nodejs
so it gets retweeted when one of those individuals notice it.11. Cleanup
Close your PR, remove your branch, etc.
Ping myself, @Fishrock123 or @nodejs/build if any assistance is needed during this whole process.
The text was updated successfully, but these errors were encountered: