Skip to content

Cherry picks to a release channel

William Hesse edited this page Jan 20, 2023 · 42 revisions

Cherry-picking is the process of selecting and merging an existing bug fix from our main development branch into a release branch (e.g. from main to beta or stable) for inclusion into the next hotfix release.

With the Dart and Flutter joint release process, we're using a combined Dart & Flutter Cherrypick Review and Approval Process. This document is a supplement to the main process and describes the process and flow within the Dart team.

Note: This process applies to bugs and regressions. Feature work is not considered for cherry picking and will need to wait for the next release.

Notice a cherry-pick is required

Resolve the issue and land the fix on the main branch along with tests to confirm whether the issue was in fact fixed. Identity whether the latest beta and stable releases contain the issue and judge whether the fix should be backported. Two changelists may be required if both channels are affected.

Upload cherry-pick as a changelist

Cherry-pick your changelist's commit onto a new branch targeting beta or stable:

$ git fetch
$ git new-branch --upstream origin/stable cherry
$ git cherry-pick --edit $commit

Update the commit message accordingly:

  1. Add a [beta] or [stable] gerrit hashtag at the start of the first line.
  2. Rename the Reviewed-on field to Cherry-pick to link to the original changelist being cherry-picked.
  3. Remove the conflicting fields Change-id, Commit-queue, Reviewed-by that are not true of the new changelist.

E.g.:

[stable] Fix foo crash.

Avoid foo doing bar instead.

Add reproducing test case.

Bug: https://github.com/dart-lang/sdk/issues/12345678
Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/12345678

For stable, consider adding a CHANGELOG.md entry about the issue or the release leads will write one when authoring the next patch release.

Upload the changelist to gerrit for approval:

git cl upload

Trigger a commit queue dry run and add any appropriate try builders to confirm the fix is correct.

Request cherry-pick approval

Request approval for releasing the fix to beta/stable using this cherry-pick to beta/stable request template:

  • Brief description of the problem.
  • The reason for cherry pick, user impact, and a brief risk assessment (low/medium/high).
  • Link to the changelist.
  • The cherry-pick-review label.

Edit the changelist's commit message with a link to the cherry-pick request to close it upon the changelist landing:

Fixes: https://github.com/dart/sdk/issues/56781234

Await the appropriate consensus and approval via the cherry-pick-approved for them or any OWNER to review the changelist.

Once the cherry-pick issue is approved and the changelist is reviewed, submit it to the commit queue. The tryjobs will compare the test results with the previous commit on the beta/stable branch and fail if any regressions are introduced. If any regressions must be introduced, or the try builders don't work on the older beta/stable code, then bypass the commit queue by force submitting.

The release engineers will automatically bundle the cherry-pick into the next hotfix release of beta/stable and no further actions are required.

Clone this wiki locally