-
Notifications
You must be signed in to change notification settings - Fork 1
Recipe Branching for Releases
Production builds of both the Flutter Framework and the Engine repositories are created on LUCI. The recipes (actual build scripts) live at flutter.googlesource.com/recipes, while the builder config is maintained in https://github.com/flutter/infra. At this time, there is no version pinning between either of these repositories and the source trees they build (the Flutter framework & engine). This leads to frequent CI failures when preparing beta and stable releases because of changes in the recipes since the release was originally built on master.
When a dev release is promoted to beta, copies will be made of the engine and framework recipes (and additional dependencies) from the time the release was branched off of master will be made, namespaced by the name of the targeted stable version (e.g. engine.py
-> engine_v1_17_0.py
).
The LUCI builder config now has separate builders for stable, beta, and dev channels, with stable and beta having their own recipes. With each new beta release, builder config should be updated to reflect the new version to look up the recipe by and which refs to trigger builds by.
When promoting a beta release to stable, we can delete any recipe copies older than the new stable. We then update constants in the builder config relating to stable version.
You must have read/write access to and local clones of the following repositories:
- Flutter Framework
- Flutter Engine
- Flutter Infra
- Flutter Recipes
- You should have Chromium's depot_tools installed (necessary for making LUCI updates)
You should fetch upstream of all of these before proceeding.
- Find the Flutter framework master commit that your release has branched off of, and set it as
$FRAMEWORK_REVISION
:
cd $FRAMEWORK_REPO
FRAMEWORK_REVISION=$(git merge-base master $RELEASE_BRANCH_NAME)
- Identify the name of the stable version that this is a release candidate for, normalize dots with underscores, set as
$VERSION
:
# for 1.18.0-12.0.pre
VERSION='1_18_0'
- Get the date/time this commit landed in the tree (since we use GitHub squash and merge, this will presumably be the commit date). The following command will retrieve the commit date of a given revision:
cd $FRAMEWORK_REPO
FRAMEWORK_DATE=$(git show --no-patch --format=%ci $FRAMEWORK_REVISION)
- Get the last LUCI recipe commit before the framework date:
cd $RECIPES_REPO
RECIPE_FRAMEWORK_REVISION=$(git log --before="$FRAMEWORK_DATE" -n 1 --format=%H)
- Copy the framework recipe at the time of
$FRAMEWORK_DATE
asflutter_$VERSION.py
(for the engine,engine_$VERSION.py
):
cd $RECIPES_REPO
./branch_recipes.py --flutter-version="$VERSION" --recipe-revision="$RECIPE_FRAMEWORK_REVISION"
- Update tests:
cd $RECIPES_REPO
./recipes.py test train
- Commit the two new recipes and all updated test expectations to git. Create a new CL with
git cl upload
and get a reviewer frombuild/scripts/slave/recipes/flutter/OWNERS
. Upon approval, merge the CL. - In flutter/infra, update BRANCHES dictionary in main.star:
-
BRANCHES['stable']['testing-ref']
, a regex to the branch name of the current stable -
BRANCHES['stable']['version']
, the version element of the recipe filename, e.g.v1_17_0
-
BRANCHES['beta']['testing-ref']
, a regex to the branch name of the current beta candidate BRANCHES['beta']'version']
-
BRANCHES['dev']['testing-ref']
, a regex to the branch names of dev releases after incrementing y
-
- Execute the main.star file to generate the rest of the config files (and validate your changes for mistakes):
$ ./main.star
- Commit your changes, push to github and get it reviewed. This PR should be landed after any LUCI recipe changes.
- After your PR has landed, wait for it to be mirrored to the chromium tree. LUCI post-submit builds should now work for your candidate branch.
Updating recipes for a stable release is much simpler than that for a beta release, as the requisite recipe should have already been forked when the release was promoted to beta.
- In flutter/infra, update BRANCHES dictionary in main.star:
-
BRANCHES['stable']['testing-ref']
, a regex to the branch name of the current stable development branch -
BRANCHES['stable']['version']
, the version element of the recipe filename, e.g.1_20_0
-
- Execute the main.star file to generate the rest of the config files (and validate your changes for mistakes):
$ ./main.star
- Commit your changes, push to github and get it reviewed. Merge it. Note, this updated configuration won't take effect until it has propagated to LUCI infra. The current version of the config can be seen here.
- In the recipes repo, any recipe forks older than the current stable can be safely deleted.
git rm /path/to/recipe
will both delete the file and stage the change with git. - Update tests:
cd $RECIPES_REPO
./recipes.py test train
- Commit the file deletions and updated test expectations to git. Create a new CL with
git cl upload
and get a reviewer frombuild/scripts/slave/recipes/flutter/OWNERS
. Upon approval, merge the CL.
- Home of the Wiki
- Roadmap
- API Reference (stable)
- API Reference (master)
- Glossary
- Contributor Guide
- Chat on Discord
- Code of Conduct
- Issue triage reports
- Our Values
- Tree hygiene
- Issue hygiene and Triage
- Style guide for Flutter repo
- Project teams
- Contributor access
- What should I work on?
- Running and writing tests
- Release process
- Rolling Dart
- Manual Engine Roll with Breaking Commits
- Updating Material Design Fonts & Icons
- Postmortems
- Setting up the Framework development environment
- The Framework architecture
- The flutter tool
- API Docs code block generation
- Running examples
- Using the Dart analyzer
- The flutter run variants
- Test coverage for package:flutter
- Writing a golden-file test for package:flutter
- Setting up the Engine development environment
- Compiling the engine
- Debugging the engine
- Using Sanitizers with the Flutter Engine
- Testing the engine
- The Engine architecture
- Flutter's modes
- Engine disk footprint
- Comparing AOT Snapshot Sizes
- Custom Flutter engine embedders
- Custom Flutter Engine Embedding in AOT Mode
- Flutter engine operation in AOT Mode
- Engine-specific Service Protocol extensions
- Crashes
- Supporting legacy platforms
- Metal on iOS FAQ
- Engine Clang Tidy Linter
- Why we have a separate engine repo
- Reduce Flutter engine size with MLGO
- Setting up the Plugins development environment
- Setting up the Packages development environment
- Plugins and Packages repository structure
- Plugin Tests
- Contributing to Plugins and Packages
- Releasing a Plugin or Package
- Unexpected Plugins and Packages failures