This document explains the steps related to publishing a version-numbered Drake binary release. It is intended only for use by the few Drake Developer experts who regularly handle the release process.
We publish a minor release approximately once per month in the middle of the
calendar month, with version number is v1.N.0 where N is monotonically
increasing.
Minor releases
Begin this process around 1 week prior to the intended release date.
The release engineering tools (relnotes, download_release_candidate, push_apt, etc.) are supported only on Ubuntu (not macOS).
Prior to release
- Choose the next version number.
- Create a local Drake branch named
release_notes-v1.N.0(so that others can easily find and push to it after the PR is opened). - Bootstrap the release notes file using the
tools/release_engineering/relnotestooling, with--action=createfor the first run. Instructions can be found atop its source code:relnotes.py.- The output is draft release notes in
doc/_release-notes/v1.N.0.md. - The version numbers in
doc/_pages/from_binary.mdshould also have been automatically upgraded. Commit the results.
- The output is draft release notes in
- Push that branch and then open a new pull request titled:
[doc] Add release notes v1.N.0Make sure that “Allow edits by maintainers” on the GitHub PR page is enabled (the checkbox is checked). Set the labels
release notes: noneandstatus: defer cito disable CI while notes-only updates are ongoing. - Make gradual updates to the release notes using
tools/release_engineering/relnotes, with--action=updateto refresh the file.- Try to avoid updating the release notes to refer to changes newer than
the likely release, i.e., if you run
--updateon the morning you’re actually doing the release, be sure to pass the--target_commit=argument to avoid including commits that will not be part of the tag.
- Try to avoid updating the release notes to refer to changes newer than
the likely release, i.e., if you run
- For release notes, on an ongoing basis, clean up and relocate the commit notes to properly organized and wordsmithed bullet points. See Polishing the release notes.
- From time to time, merge
upstream/masterinto yourorigin/release_notes-v1.N.0branch (so that it doesn’t go stale). Never rebase or force-push to the branch. We expect that several people will clone and push to it concurrently. - As the release is nearly ready, post a call for action for feature teams to
look at the draft document and provide suggestions (in reviewable) or fixes
(as pushes).
- To help ensure that the “newly deprecated APIs” section is accurate, grep
the code for
YYYY-MM-01deprecation notations, for theMMvalues that would have been associated with our +3 months typical period.
- To help ensure that the “newly deprecated APIs” section is accurate, grep
the code for
- As the release is nearly ready, check the website docs for regressions:
- Does the Python API appear normal? The site has a full list of modules?
- Does the C++ API appear normal? The site has a full list of topics and classes?
- Do all of the tutorials display correctly? Look at the output cells for any error text or LaTeX salad.
Polishing the release notes
Here are some guidelines for bringing commit notes from the relnotes tool into the main body of the document:
- Many commit messages can be cut down to their summary strings and used as-is.
- File geometry/optimization changes under the “Mathematical Program” heading, not the “Multibody” heading.
- Expand all acronyms (eg, MBP -> MultibodyPlant, SG -> SceneGraph).
- PRs may appear in multiple sections, depending on the tags they have. For example, a PR that includes a fix and new deprecation will appear in both the fix and newly-deprecated sections. Generally, PRs will be included once in each appropriate section according to the tags assigned to it.
- In general you should mention deprecated/removed classes and methods using
their exact name (for easier searching).
- In the deprecation section you can provide the fully-qualified name as the whole line item; the meaning is clear from context.
- This may mean having a long list of items for a single commit. That is fine.
- We have four common grammatical forms for our commit messages:
- Past tense (“Added new method foo”) is acceptable
- Noun phrase (“Ability to foo the bar”) is acceptable
- Imperative (“Add new method foo”, i.e. PEP-8 style) is acceptable
- Present tense (“Adds new method foo”, i.e. Google styleguide style) is discouraged
- Use exactly the same wording for the boilerplate items:
- Every dependency upgrade line should be “Upgrade dependency libfoobar to 1.2.3” or “Upgrade dependency funrepo to latest commit”.
- Dependencies should be referred to by their
workspacename. - Only one dependency change per line. Even if both meshcat and meshcat-python were upgraded in the same pull request, they each should get their own line in the release notes.
- Keep all bullet points to one line.
- Using hard linebreaks to stay under 80 columns makes the bullet lists hard to maintain over time.
- Say “macOS” not “Mac” or “Apple” or etc.
- Say “SDFormat” not “SDF” nor “sdf”.
Cutting the release
- Find the git sha of the most recent nightly build:
- Make sure https://drake-jenkins.csail.mit.edu/view/Nightly%20Production/ has nothing still running; if something is running, wait until it finishes.
- Make sure https://drake-jenkins.csail.mit.edu/view/Production/ is clean. If not, then wait until tomorrow to try again.
- Open https://github.com/RobotLocomotion/drake/commits/nightly-release/; the top (newest) commit will be the git sha for this release.
- Launch the staging builds for that git commit sha:
- Open the following Jenkins jobs (e.g., each in its own new window, so you can copy-and-paste sha1 and version easily):
- In the upper right, click “sign in” (unless you’re already signed in). This will use your GitHub credentials.
- Click “Build with Parameters”.
- Change “sha1” to the full git sha corresponding to
v1.N.0and “release_version” to1.N.0(no “v”).- If you mistakenly provide the “v” in “release_version”, your build will appear to work, but actually fail 5-6 minutes later.
- Click “Build”; each build will take around an hour, give or take.
- Wait for all staging jobs to succeed. It’s OK to work on release notes finishing touches in the meantime, but do not merge the release notes nor tag the release until all five builds have succeeded.
- Update the release notes to have the
YYYY-MM-DDwe choose.- There is a dummy date 2099-12-31 nearby that should likewise be changed.
- Make sure that the nightly build git sha from the prior steps matches the
newest_commitwhose changes are enumerated in the notes.
- Re-enable CI by removing the label
status: defer ciand commenting@drake-jenkins-bot retest this pleaseto trigger a re-run. - Wait for the wheel builds to complete, and then download release artifacts:
- Use the
tools/release_engineering/download_release_candidatetool with the--versionoption to download and verify all binaries. (Its usage instructions are atop its source code: download_release_candidate.py.)
- Use the
- Merge the release notes PR.
- Take care when squashing not to accept github’s auto-generated commit message if it is not appropriate.
- After merge, go to https://drake-jenkins.csail.mit.edu/view/Documentation/job/linux-noble-unprovisioned-gcc-bazel-nightly-documentation/ and push “Build now”.
- If you don’t have “Build now” click “Sign in” first in upper right.
- Open https://github.com/RobotLocomotion/drake/releases and choose “Draft
a new release”. Note that this page has neither history nor undo. Be
slow and careful!
- Tag version is: v1.N.0
- Target is: [the git sha from the
--find-git-shain step 1.v]- You should select the commit from Target > Recent Commits. The search via commit does not work if you don’t use the correct length.
- Release title is: Drake v1.N.0
- The body of the release should be forked from the prior release (open the
prior release’s web page and click “Edit” to get the markdown), with
appropriate edits as follows:
- The version number
- Click the box labeled “Attach binaries by dropping them here or selecting
them.” and then choose for upload the 60 release files from
/tmp/drake-release/v1.N.0/...:- 3: 1 source
.tar.gz+ 2 checksums - 15: 5 linux binary
.tar.gz+ 10 checksums ({noble} x {amd64, arm64} + {resolute} x {amd64, amd64v3, arm64}) - 3: 1 macOS arm binary
.tar.gz+ 2 checksums - 15: 5
.deb+ 10 checksums ({noble} x {amd64, arm64} + {resolute} x {amd64, amd64v3, arm64}) - 18: 6 linux
.whl+ 12 checksums ({3.12, 3.13, 3.14} x {x86_64, aarch64}) - 6: 2 macOS arm
.whl+ 4 checksums ({3.13, 3.14}) - Note that with
snapprovided Firefox, drag-and-drop from Nautilus will fail, and drop all of your release page inputs typed so far. Use the Firefox-provided selection dialog instead, by clicking on the box.
- 3: 1 source
- Choose “Save draft” and take a deep breath.
- Once the documentation build finishes, release!
- Check that the link to drake.mit.edu docs from the GitHub release draft page actually works.
- Click “Publish release”.
- Create a new GitHub issue on the drake repository and select the “Post-Release Actions” template.
- Create a GitHub issue on the drake-ros
repository, requesting an update of the
DRAKE_SUGGESTED_VERSIONconstant. - Announce on Drake Slack,
#general. - Party on, Wayne.
Post-release wheel upload
After tagging the release, you must manually upload a PyPI release.
If you haven’t done so already, follow Drake’s PyPI account setup instructions to obtain a username and password.
Most likely, you will want to use an api token to authenticate yourself to the
twine uploader. See https://pypi.org/help/#apitoken and https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#create-an-account
for advice on managing api tokens.
-
Run
twineto upload the wheel release, as follows:- You will need your PyPI username and password for this. (Do not use drake-robot.)
- Run:
$ cd tmp $ python3 -m venv env $ env/bin/pip install twine $ env/bin/twine upload /tmp/drake-release/v1.N.0/*.whl $ rm -rf env - Confirm that all of the uploads succeeded without any error messages in your terminal.