With branching and branch testability being supported for Flutter & Dart releases, cherry-picking fixes is the preferred method to address issues for released software (beta and stable channels). Stability of the release will be the overarching goal, so only highly impactful and critical cherry-picks will be allowed across Dart and Flutter. This document outlines the process for requesting and approval of cherry-picks.
Note: This process applies to regressions from the previous release or serious bugs otherwise introduced by the current release. Feature work is not considered for cherry-picking and will need to wait for the next release.
[NOTE] If you are trying to open a cherry-pick before that release has shipped (e.g., you would like to CP into 3.21 beta but the current beta is 3.20) then you will need to follow the manual cherry-pick instructions below.
cp: beta or cp: stable label to the pull request on flutter/flutter master. (you can find beta and stable candidate branch info by following the respective links)If for some reason, an automated cherry-pick can not be applied, please follow the manual cherry-pick instructions.
If the automated cherry-pick process fails, you will have to create the cherry-pick request manually:
How to find the intended branch: You can find the current beta and stable candidate branches by following the respective links. For a pre-release branch, you will need to locate the correct candidate branch yourself. It should follow the pattern
flutter-X.XX-candidate.XwhereX.XXis the release you are targeting.
Anyone can request a cherry-pick.
The release engineering team will assign a cherry-pick reviewer who is an expert in the area of the code that your cherry-pick may affect.
While we attempt to address every cherry-pick requests, there are various reasons a cherry-pick request may not be accepted to include, but not limited to:
merge-to-beta or merge-to-stable label.cp: merged label to the cherry-pick issue.This is the perfect opportunity for you to learn and add cherry-picking to your toolbox. A typical cherry-pick request follows a process similar to the below.
Note: Commands that are wrapped with < > are variables that apply to your specific situation.
git checkout <master/main>git fetchgit pull // ensure all changes from master/main have been pulledgit checkout <candidate branch you want to cherry-pick to>git checkout -b <your local branch name for cherry-picking>git cherry-pick <your commit hash>git push --set-upstream origin <your branch name>In the case that your cherry-pick commit has a merge conflict, it is up to you to resolve it. If you can not resolve it, reach out to the original PR author who may be able to help resolve the conflict.
If you discovered an issue on a X version that is no longer on the stable channel, we can still hotfix it in. For stables, we are more likely to do this as that is what most Flutter developers use.
Generally, if the stable is relatively fresh, such as we recently shipped the new stable and a large chunk of developers have not migrated, we would prioritize backporting a fix.
Generally, we ship every third beta to stable, and prioritize fixes to those branches as those are soon to be stable. We have no official comms planned around this yet, but will encourage developers on Discord to try out this beta.
In the last few weeks of a stable, we may opt to only release hotfixes to the beta instead of stable. At end of 2023, we're planning to have more automation around releases, which will allow us to ship hotfixes to both channels easily, and this will be less of a concern.