<!-- start_original_pr_link -->
Reverts: flutter/flutter#179647
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: gmackall
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Mac_mokey run_release_test failing
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: gmackall
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {reidbaker, jtmcdole}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
Changes our cipd hosted android sdk+ndk bundle to no longer modify
directory structure from what Android directly provides, allowing AGP to
find the ndk automatically and preventing downloading.
1. Changes the `create_cipd_packages.sh` script so we don't move the ndk
2. Uses the new script to upload a
[36v4unmodified](https://chrome-infra-packages.appspot.com/p/flutter/android/sdk/all/linux-amd64/+/version:36v4unmodified)
bundle
3. Changes DEPS+ci.yaml to reference the new bundle
4. Changes GN build rules accordingly
5. Removes special config in existing build.gradle files to point at the
location of the ndk - agp should now know where it is without conig
6. For some tests, passes in an environment variable pointing to the ndk
location, to override the environment variable passed by the recipes.
This variable is respected by the tool, so the recipes passing it,
pointing to the wrong place, is problematic. After this change lands we
can stop passing it in the recipes, and then we can remove this special
config in the tests. But adding it temporarily allows us to make this
change without coordinating a recipes change at the same moment, and
probably breaking things out of band.
Logs from a random postsubmit run of `Mac
build_android_host_app_with_module_aar` on the tree currently:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695664517253382913/+/u/run_build_android_host_app_with_module_aar/stdout
We see
> [2025-12-12 10:49:49.223087] [STDOUT] stdout: Checking the license for
package NDK (Side by side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/licenses
[2025-12-12 10:49:49.223221] [STDOUT] stdout: License for package NDK
(Side by side) 28.2.13676358 accepted.
[2025-12-12 10:49:49.223268] [STDOUT] stdout: Preparing "Install NDK
(Side by side) 28.2.13676358 v.28.2.13676358".
[2025-12-12 10:50:14.093824] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" ready.
[2025-12-12 10:50:14.093909] [STDOUT] stdout: Installing NDK (Side by
side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/ndk/28.2.13676358
[2025-12-12 10:50:14.093947] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" complete.
[2025-12-12 10:50:14.410724] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" finished.
Example of no longer downloading:
Logs from a presubmit run:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695732180931529361/+/u/run_build_android_host_app_with_module_aar/stdout
We don't see these logs. We still see android build tools downloading -
we can probably tackle that in another pr.
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
Changes our cipd hosted android sdk+ndk bundle to no longer modify
directory structure from what Android directly provides, allowing AGP to
find the ndk automatically and preventing downloading.
1. Changes the `create_cipd_packages.sh` script so we don't move the ndk
2. Uses the new script to upload a
[36v4unmodified](https://chrome-infra-packages.appspot.com/p/flutter/android/sdk/all/linux-amd64/+/version:36v4unmodified)
bundle
3. Changes DEPS+ci.yaml to reference the new bundle
4. Changes GN build rules accordingly
5. Removes special config in existing build.gradle files to point at the
location of the ndk - agp should now know where it is without conig
6. For some tests, passes in an environment variable pointing to the ndk
location, to override the environment variable passed by the recipes.
This variable is respected by the tool, so the recipes passing it,
pointing to the wrong place, is problematic. After this change lands we
can stop passing it in the recipes, and then we can remove this special
config in the tests. But adding it temporarily allows us to make this
change without coordinating a recipes change at the same moment, and
probably breaking things out of band.
Logs from a random postsubmit run of `Mac
build_android_host_app_with_module_aar` on the tree currently:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695664517253382913/+/u/run_build_android_host_app_with_module_aar/stdout
We see
> [2025-12-12 10:49:49.223087] [STDOUT] stdout: Checking the license for
package NDK (Side by side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/licenses
[2025-12-12 10:49:49.223221] [STDOUT] stdout: License for package NDK
(Side by side) 28.2.13676358 accepted.
[2025-12-12 10:49:49.223268] [STDOUT] stdout: Preparing "Install NDK
(Side by side) 28.2.13676358 v.28.2.13676358".
[2025-12-12 10:50:14.093824] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" ready.
[2025-12-12 10:50:14.093909] [STDOUT] stdout: Installing NDK (Side by
side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/ndk/28.2.13676358
[2025-12-12 10:50:14.093947] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" complete.
[2025-12-12 10:50:14.410724] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" finished.
Example of no longer downloading:
Logs from a presubmit run:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695732180931529361/+/u/run_build_android_host_app_with_module_aar/stdout
We don't see these logs. We still see android build tools downloading -
we can probably tackle that in another pr.
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
---------
Co-authored-by: DoLT <dolt@guide.inc>
Co-authored-by: Gray Mackall <mackall@google.com>
Co-authored-by: John "codefu" McDole <john@mcdole.org>
Also switches to using a regex group to match the device state instead
of splitting the matched string on '='.
Fixes https://github.com/flutter/flutter/issues/174952
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
<!-- start_original_pr_link -->
Reverts: flutter/flutter#165749
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Still passing command-line arguments from recipes
that have no effect but cause the runner to crash.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: matanlurey
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {jtmcdole}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
Partial re-land of https://github.com/flutter/flutter/pull/165628:
- Fixes the mistake that the `Cocoon` class did things that well, were
not specific to Cocoon.
- Renamed to `MetricsResultWriter`, as that is all it does now.
---
Closes https://github.com/flutter/flutter/issues/165618.
The `devicelab/bin/test_runner.dart upload-metrics` command use to have
_two_ responsibilities:
- Well, upload test **metrics** (benchmarks) to Skia Perf (it still does
that)
- Upload test **status** to Cocoon (it did until
https://github.com/flutter/flutter/pull/165614)
As https://github.com/flutter/flutter/pull/165614 proved, this API
predated the current LUCI setup, where Cocoon itself receives task
status updates from LUCI, and it turns out this entire time, DeviceLab
was making (at best) NOP calls, and at worst, causing crashes and
corrupt data (https://github.com/flutter/flutter/issues/165610).
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
<!-- start_original_pr_link -->
Reverts: flutter/flutter#165628
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: breaking tree:
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_mokey%20backdrop_filter_perf__e2e_summary/3833/overview
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: matanlurey
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {jtmcdole, yjbanov}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
🚫 **Do not merge** until
https://flutter-review.googlesource.com/c/recipes/+/64220/1 is merged.
---
Closes https://github.com/flutter/flutter/issues/165618.
The `devicelab/bin/test_runner.dart upload-metrics` command use to have
_two_ responsibilities:
- Well, upload test **metrics** (benchmarks) to Skia Perf (it still does
that)
- Upload test **status** to Cocoon (it did until
https://github.com/flutter/flutter/pull/165614)
As https://github.com/flutter/flutter/pull/165614 proved, this API
predated the current LUCI setup, where Cocoon itself receives task
status updates from LUCI, and it turns out this entire time, DeviceLab
was making (at best) NOP calls, and at worst, causing crashes and
corrupt data (https://github.com/flutter/flutter/issues/165610).
In other words, this is removing entirely dead/unused code (though the
recipes have to be updated first).
/cc @jason-simmons as I need Jason's help reviewing the recipes change
and want to provide context.
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.
**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
Fixes https://github.com/flutter/flutter/issues/156456
There is a known long running test that has been bumping up against the default timeout. This adjusts the perTestTimeout for the devicelab tests to add 15 seconds to stop this from flaking.
The test is question: 82ebb74c64/dev/devicelab/test/run_test.dart (L76)
`test/run_test.dart: run.dart script prints a message after a few seconds when failing to connect (this test takes >10s)`
Prior to this fix, `_TaskRunner.run` would immediately cleanup the
keep-alive port once the task completed, which would result in the
isolate shutting down as soon as the task result was returned from
`ext.cocoonRunTask` callback in the form of a
`ServiceExtensionResponse`. Since the service extension response is
processed by the service isolate, it was possible for the VM to start
shutting down before the service isolate could send the task result data
back to the task runner.
This change introduces a new service extension,
`ext.cocoonTaskResultReceived`, that the task runner invokes after it
receives the task result from `ext.cocoonRunTask`, notifying the task
process that it can close the keep-alive port and shutdown.
Fixes https://github.com/flutter/flutter/issues/155475
A recent change to the flutter_drone recipe is setting FLUTTER_TEST_OUTPUTS_DIR in the environment (see https://flutter.googlesource.com/recipes/+/b111cd3ef2297e66905cc48c2cfedce0cf1ba46f)
If FLUTTER_TEST_OUTPUTS_DIR is set, then perf_tests will use an output path based on that variable. perf_tests_test needs to use the same logic when looking for the expected output file.
Fixes https://github.com/flutter/flutter/issues/150093
New tests added to cover that we at least pass the arguments we expect to adb.
The test for #150093 is not ideal in that it does not verify the behavior of a failed process but instead ensures we set the parameter that contains the behavior we want.
devicelab code and tests are not setup to enable fake process or fake output from stdin/stderr and hang if adb or no hardware are present.
- fix https://github.com/flutter/flutter/issues/53707 by having the test not expect a timeout but instead actually look for the retry message
- simplify the `--task` option to only accept task names rather than also accepting paths
- remove some obsolete options that referred to the manifest which no longer seems to exist
These values are generated since https://github.com/flutter/flutter/pull/135279, but I didn't know to add the new keys to this list to get them to upload.
Failed to do so in #135645, I believe the mistake there was putting them in `_kCommonScoreKeys`, which is also used in "E2E" tests, that don't get full trace data, only high level `FrameTiming` packets.
Part of https://github.com/flutter/flutter/issues/129150