* Bump to 0.36.0 * Add a two-week delay to Wasmtime's release process This commit is a proposal to update Wasmtime's release process with a two-week delay from branching a release until it's actually officially released. We've had two issues lately that came up which led to this proposal: * In #3915 it was realized that changes just before the 0.35.0 release weren't enough for an embedding use case, but the PR didn't meet the expectations for a full patch release. * At Fastly we were about to start rolling out a new version of Wasmtime when over the weekend the fuzz bug #3951 was found. This led to the desire internally to have a "must have been fuzzed for this long" period of time for Wasmtime changes which we felt were better reflected in the release process itself rather than something about Fastly's own integration with Wasmtime. This commit updates the automation for releases to unconditionally create a `release-X.Y.Z` branch on the 5th of every month. The actual release from this branch is then performed on the 20th of every month, roughly two weeks later. This should provide a period of time to ensure that all changes in a release are fuzzed for at least two weeks and avoid any further surprises. This should also help with any last-minute changes made just before a release if they need tweaking since backporting to a not-yet-released branch is much easier. Overall there are some new properties about Wasmtime with this proposal as well: * The `main` branch will always have a section in `RELEASES.md` which is listed as "Unreleased" for us to fill out. * The `main` branch will always be a version ahead of the latest release. For example it will be bump pre-emptively as part of the release process on the 5th where if `release-2.0.0` was created then the `main` branch will have 3.0.0 Wasmtime. * Dates for major versions are automatically updated in the `RELEASES.md` notes. The associated documentation for our release process is updated and the various scripts should all be updated now as well with this commit. * Add notes on a security patch * Clarify security fixes shouldn't be previewed early on CI
8.6 KiB
Release Process
This is intended to serve as documentation for Wasmtime's release process. It's largely an internal checklist for those of us performing a Wasmtime release, but others might be curious in this as well!
Releasing a major version
Major versions of Wasmtime are relased once-a-month. Most of this is automatic and all that needs to be done is to merge GitHub PRs that CI will generate. At a high-level the structure of Wasmtime's release process is:
- On the 5th of every month a new
release-X.Y.Zbranch is created with the current contents ofmain. - On the 20th of every month this release branch is published to crates.io and release artifacts are built.
This means that Wasmtime release are always at least two weeks behind
development on main and additionally happen once a month. The lag time behind
main is intended to give time to fuzz changes on main as well as allow
testing for any users using main. It's expected, though, that most consumers
will likely use the release branches of wasmtime.
A detailed list of all the steps in the release automation process are below. The steps requiring interactions are bolded, otherwise everything else is automatic and this is documenting what automation does.
- On the 5th of every month, (configured via
.github/workflows/release-process.yml) a CI job will run and do these steps:
- Download the current
mainbranch - Push the
mainbranch torelease-X.Y.Z - Run
./scripts/publish.rswith thebumpargument - Commit the changes
- Push these changes to a temporary
ci/*branch - Open a PR with this branch against
main - This step can also be triggered manually with the
mainbranch and thecutargument.
- A maintainer of Wasmtime merges this PR
- It's intended that this PR can be immediately merged as the release branch has been created and all it's doing is bumping the version.
- Time passes and the
release-X.Y.Zbranch is maintained
- All changes land on
mainfirst, then are backported torelease-X.Y.Zas necessary. - Even changes to
RELEASES.mdare pushed tomainfirst.
- On the 20th of every month (same CI job as before) another CI job will run performing:
- Download the current
mainbranch. - Update the release date of
X.Y.Zto today inRELEASES.md - Open a PR against
mainfor this change - Reset to
release-X.Y.Z - Update the release date of
X.Y.Zto today inRELEASES.md - Add a special marker to the commit message to indicate a tag should be made.
- Open a PR against
release-X.Y.Zfor this change - This step can also be triggered manually with the
mainbranch and therelease-latestargument.
- A maintainer of Wasmtime merges these two PRs
- The PR against
mainis a small update to the release notes and should be mergeable immediately. - The PR against
release-X.Y.Z, when merged, will trigger the next steps due to the marker in the commit message. A maintainer should double-check there are no open security issues, but otherwise it's expected that all other release issues are resolved by this point.
- The
.github/workflow/push-tag.ymlworkflow is triggered on all commits including the one just created with a PR merge. This workflow will:- Scan the git logs of pushed changes for the special marker added by
release-process.yml. - If found, tags the current
maincommit and pushes that to the main repository.
- Scan the git logs of pushed changes for the special marker added by
- Once a tag is created CI runs in full on the tag itself. CI for tags will
create a GitHub release with release artifacts and it will also publish
crates to crates.io. This is orchestrated by
.github/workflows/main.yml.
If all goes well you won't have to read up much on this and after hitting the Big Green Button for the automatically created PRs everything will merrily carry on its way.
Releasing a patch version
Making a patch release is somewhat more manual than a major version, but like before there's automation to help guide the process as well and take care of more mundane bits.
This is a list of steps taken to perform a patch release for 2.0.1 for example. Like above human interaction is indicated with bold text in these steps.
- Necessary changes are backported to the
release-2.0.0branch frommain
- All changes must land on
mainfirst (if applicable) and then get backported to an older branch. Release branches should already exist from the above major release steps. - CI may not have been run in some time for release branches so it may be
necessary to backport CI fixes and updates from
mainas well. - When merging backports maintainers need to double-check that the
PUBLIC_CRATESlisted inscripts/publish.rsdo not have semver-API-breaking changes (in the strictest sense). All security fixes must be done in such a way that the API doesn't break between the patch version and the original version. - Don't forget to write patch notes in
RELEASES.mdfor backported changes.
- The patch release process is triggered manually with
the
release-2.0.0branch and therelease-patchargument
- This will run the
release-process.ymlworkflow. Thescripts/publish.rsscript will be run with thebump-patchargument. - The changes will be committed with a special marker indicating a release needs to be made.
- A PR will be created from a temporary
ci/*branch to therelease-2.0.0branch which, when merged, will trigger the release process.
- Review the generated PR and merge it
- This will resume from step 6 above in the major release process where the special marker in the commit message generated by CI will trigger a tag to get pushed which will further trigger the rest of the release process.
After a patch release has been made you'll also want to double-check that the
release notes on the patch branch are in sync with the main branch.
Releasing a security patch
When making a patch release that has a security-related fix the contents of the patch are often kept private until the day of the patch release which means that the process here is slightly different from the patch release process above. In addition the precise runbook is currently under discussion in an RFC for security patches, so this intends to document what we've been doing so far and it'll get updated when the runbook is merged.
- The fix for the security issue is developed in a GitHub Security Advisory
- This will not have any CI run, it's recommended to run
./ci/run-tests.shlocally at least. - This will also only be the patch for the
mainbranch. You'll need to locally maintain and develop patches for any older releases being backported to. Note that from the major release process there should already be a branch for all older releases.
- Send a PR for the version bump when an email goes out announcing there will be a security release
- An email is sent to the bytecodealliance security mailing list ahead of a
patch release to announce that a patch release will happen. At this time you
should trigger the version bump against the appropriate
release-x.y.zbranch with therelease-patchargument. - This will send a PR, but you should not merge it. Instead use this PR and
the time ahead of the security release to fix any issues with CI. Older
release-x.y.zbranches haven't run CI in awhile so they may need to backport fixes of one variety or another. DO NOT include the actual fix for the security issue into the PR, that comes in the next step.
- Make the patches public
- For the
mainbranch this will involve simply publishing the GitHub Security Advisory. Note that CI will run after the advisory's changes are merged in onmain. - For the backported release branches you should either create a PR targeting these branches or push the changes to the previous version-bump PRs.
- Merge the version-bump PR
- Like the patch release process this will kick everything else into motion. Note that the actual security fixes should be merged either before or as part of this PR.
After a security release has been made you'll also want to double-check that
the release notes on the branch are in sync with the main branch.