[!NOTE] There are parts of this release process that can only be completed by Googlers on the Dash team. If you are not a Googler on the Dash team, please reach out on the #hackers-devtools Discord channel before trying to create a DevTools release.
A new minor version of DevTools should be released into the Dart SDK monthly. This release should be timed with the Dart / Flutter release code cutoff dates so that we can ensure it is included with the next Flutter beta (see the Dash release schedule). The minor DevTools releases must be submitted to the Dart SDK before the Beta release cutoff date. Dev or patch releases of DevTools may occur as needed between minor or major releases.
Before each minor or major DevTools release, the DevTools team will perform a bug bash for quality assurance and to prevent regressions from slipping into the release.
dt by adding the tool/bin folder to your PATH environment variable~/.bashrc file.export PATH=$PATH:<DEVTOOLS_DIR>/tool/bin[!NOTE]
Replace<DEVTOOLS_DIR>with the local path to your DevTools repo path.
Path variable and click Edit<DEVTOOLS_DIR>/tool/bin[!NOTE]
Replace<DEVTOOLS_DIR>with the local path to your DevTools repo path.
Ensure your Dart SDK is configured:
You have a local checkout of the Dart SDK (for getting started instructions, see sdk/CONTRIBUTING.md).
Ensure your .bashrc sets $LOCAL_DART_SDK
DART_SDK_REPO_DIR=<Path to cloned dart sdk> export LOCAL_DART_SDK=$DART_SDK_REPO_DIR/sdk
Ensure you have goma configured
Make sure:
Your Dart SDK checkout is on the latest main branch:
git checkout main; git rebase-update
Your Flutter SDK checkout is on the latest commit in specified in DevTools:
dt update-flutter-sdk --update-on-path
[!NOTE] If you need to install the Github CLI you can run:
brew install gh
From the devtools/tool directory, run the following:
dt release-helper
This command will automatically:
flutter-candidate.txt to the latest Flutter candidate SHA in g3 (see instructions in DevTools Release Rotation email).[!NOTE]
If there are failures caused by the latest Flutter SHA, this step can be skipped.
git commit -am "Update to latest Flutter candidate" git push upstream <release-branch>
Finally, update your Flutter to the commit you just spcified.
dt update-flutter-sdk --update-on-path
Verify the changes in the release PR contain:
devtools_app pubspec versionpackages/devtools_app/lib/devtools.dartThe other DevTools packages each have their own versioning strategy and are published as needed on their own schedules. For devtools_app_shared, devtools_extensions, and devtools_shared, we adhere to semantic versioning where breaking changes should be versioned with a major version bump, and all other changes should be minor or patch version bumps.
Build DevTools in release mode and serve it from a locally running DevTools server instance:
dt serve
Launch DevTools and verify that everything generally works.
flutter run an applicationOnce the build is in good shape,
git checkout . && \ git clean -f -d;
Receive an LGTM for the PR, squash and commit.
On each DevTools commit, DevTools is built and uploaded to CIPD. You can check the status of the builds on this dashboard. Within minutes, a build should be uploaded for the commit you just merged and tagged.
[!NOTE]
If the CIPD build times out, instructions for re-triggering can be found at go/dart-engprod/release.md
Run the tool script with the commit hash you just merged and tagged:
dt update-sdk-deps -c <commit-hash>
This automatically creates a Gerrit CL with the DEPS update for DevTools. Quickly test the build and then add a reviewer:
Build the Dart SDK locally
cd $LOCAL_DART_SDK && \ gclient sync -D && \ ./tools/build.py -mrelease -ax64 create_sdk;
Verify that running dart devtools launches the version of DevTools you just released.
xcodebuild/ReleaseX64/dart-sdk/bin/dart devtools
out/ReleaseX64/dart-sdk/bin/dart devtools
If the version of DevTools you just published to CIPD does not load properly, you may need to hard reload and clear your browser cache.
Add a reviewer and submit once approved.
In your terminal from the devtools directory, checkout the commit that you just released into the Dart SDK (the hash you updated the DEPS file with):
git fetch upstream; git checkout <release-commit>`
Then, tag the release:
dt tag-version
This command creates a tag on the flutter/devtools repo for this release. The version for the tag is automatically determined from packages/devtools/pubspec.yaml so there is no need to manually enter the version.
The daily-dev-bump workflow is currently broken: #8558. Until it's fixed, manually update the DevTools version for the next release and open a PR with the changes:
dt update-version auto --type minor dt update-version auto --type dev
gh workflow run daily-dev-bump.yaml -f updateType=minor+dev
This will kick off a workflow that will automatically create a PR with a minor + dev version bump. That PR should then be auto-submitted.
To publish a dev release follow just section Update the DevTools hash in the Dart SDK of the full release process.
flutter/devtools repoFind the DevTools tag that you want to perform the cherry-pick release on top of.
For example, if you want to perform a cherry pick release of DevTools into the Flutter / Dart beta branch, you can see what the current version of DevTools is on Flutter / Dart beta by doing the following:
Find the latest beta release candidate (or stable release candidate) that you will cherry-pick into.
In your terminal, in the flutter/flutter repository, run git checkout <latest-beta-version>.
Run flutter --version to see which version of DevTools is on current Flutter / Dart beta (assuming which flutter points to your local Flutter git repository). For example, you might see:
Tools • Dart 3.8.1 • DevTools 2.45.1
indicating that DevTools version 2.45.1 is used in this Flutter version.
Checkout that tag in your local DevTools repo. For this example, we'll use v2.29.0 as the base branch and 2.29.1 as the cherry-pick branch.
git fetch upstream git checkout v2.29.0
Create a new branch for your cherry pick release.
git checkout -b 2.29.1
Cherry pick the commit(s) you want in this cherry-pick release, and bump the DevTools version number:
git cherry-pick <commit> dt update-version auto -t patch
Commit your changes and push to the upstream remote.
git add .; git commit -m "Prepare cherry-pick release - DevTools 2.29.1"; git push upstream 2.29.1
To move on to the next step, you will need to take note of two values:
2.29.1)Follow the instructions at go/dart-engprod/devtools.md#cherry-picks to trigger the DevTools builder.
Checkout the Dart SDK branch you want to perform the cherry-pick on top of (e.g. stable or beta), and create a new branch:
git new-branch --upstream origin/<stable or beta> cherry-pick-devtools
From this branch:
Edit the "devtools_rev" entry in the Dart SDK DEPS file to point to the cherry-pick release hash (the commit at the tip of the cherry-pick branch you created above).
[Only if cherry-picking to stable] add a CHANGELOG entry.
Commit your changes and upload your CL:
git add . git commit -m "Cherry-pick DevTools 2.29.1" git cl upload -s
Once your CL is uploaded to Gerrit, modify your changelist commit message to meet the cherry-pick requirements.
The CL description should look like this:
[stable or beta] Cherry-pick DevTools <new version number> into the SDK <stable or beta> branch. Issue description: When attempting to use foo under certain conditions, users are unable to compile. What is the fix: foo is now evaluated at runtime. Why cherry-pick: Users of foo are no longer able to compile to bar. Risk: Low, this fix has landed on the main channel and is tested on the same infrastructure. Issue link(s): https://github.com/dart-lang/sdk/issues/12345678 Cherry-pick: https://github.com/flutter/devtools/compare/<previous DevTools tag>...<new version number> Change-Id: Id75075a7e697559263742bc25972ef47532c39cb
Then trigger a CQ Dry Run, add reviewers, and wait for approval. DO NOT merge the CL yet.
Do not move on to the next steps unless your cherry-pick CL has been approved and merged.
[!IMPORTANT] If your cherry-pick CL has not been approved and merged, wait.
Once your cherry-pick has been approved and merged, create a tag for this cherry-pick release. This will ensure that we have a tag we can branch from if we need to create another DevTools cherry-pick release from the tip of the one we just created.
Check out the cherry-pick branch you created earlier, and create a git tag:
git checkout upstream/2.29.1 dt tag-version
flutter/devtools repo[!IMPORTANT] If your cherry-pick CL has not been approved and merged, wait.
In order to ensure that the cherry-picked DevTools commit does not get GC'ed, we need to perform a merge commit from the branch we just created (e.g. 2.29.1) onto the flutter/devtools protected branch (master).
Create a pull request in the GitHub UI from the cherry-pick branch to the master branch.
https://github.com/flutter/devtools/compare/<cherry-pick-branch>, where <cherry-pick-branch> is the branch you pushed up to the upstream remote with the cherry-picked commit(s) (e.g. 2.29.1).Message @kenzieschmoll or @elliette directly with the following request. If you cannot message @kenzieschmoll or @elliette directly, create an issue and assign it to @kenzieschmoll or @elliette.
Title:
Create merge commit for flutter/devtools cherry-pick.
Body:
1. Temporarily modify the settings of https://github.com/flutter/devtools to “allow merge commits at the repo level and remove
require linear history”.
2. IMPORTANT: Merge as a MERGE COMMIT. When merging, use the merge button dropdown menu to select “Create a merge commit”, NOT “Squash and merge”.
3. Revert the settings.
If @kenzieschmoll is unavailable to complete the merge commit, please ask another member of the Dash team who has Admin access to the flutter/devtools repository settings (@piinks or @tvolkert).
dart-lang/sdk cherry-pick docsflutter/devtools: https://github.com/flutter/devtools/pull/6812