Skip to content

Conversation

@bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Nov 4, 2024

Should help provide more information for flutter doctor timeouts like we've seen in #157513

Should help provide more information for `flutter doctor` timeouts like
we've seen in #157513
@bkonyi bkonyi added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 4, 2024
@github-actions github-actions bot added the a: desktop Running on desktop label Nov 4, 2024
Future<ValidationResult> validate() async {
final Stopwatch stopwatch = Stopwatch()..start();
final ValidationResult result = await validateImpl();
stopwatch.stop();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we ever reach this if the validator was running when the build got timed out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but we do already output a duration to the console if a validation step exceeds the timeout duration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but we do already output a duration to the console if a validation step exceeds the timeout duration.

Which timeout? For example, this change wouldn't help with this situation, right? https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8733230104891163105/+/u/run_build_android_host_app_with_module_source/stdout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This timeout: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/doctor.dart#L246

It isn't a solution for the situation we're seeing but it might give us some insights if we have multiple long running doctor validators that push us closer to the CI timeout.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genuine question: Would this PR change anything in the case that a validator completely stalls? Do validators simply get interrupted after running for 00:04:30?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think it would since the Future.any([validatorResult, timeout]) would complete after 00:04:30, leaving the result of the validator to be ignored.

Copy link
Contributor

@andrewkolos andrewkolos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm not thrilled with the amount of noise this adds to the code, but it should be fairly easy to revert down the line if needed.

@andrewkolos andrewkolos self-requested a review November 5, 2024 22:44
Copy link
Contributor

@andrewkolos andrewkolos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewkolos
Copy link
Contributor

The validator APIs are used in g3, so this while need a g3fix to land

@bkonyi bkonyi force-pushed the flutter_doctor_validator_execution_duration branch from d2da475 to 4c5a5d2 Compare December 20, 2024 18:36
@bkonyi bkonyi enabled auto-merge December 20, 2024 19:50
@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@bkonyi bkonyi added this pull request to the merge queue Jan 13, 2025
auto-merge was automatically disabled January 13, 2025 21:16

Pull Request is not mergeable

Merged via the queue into master with commit b3e6535 Jan 13, 2025
163 of 168 checks passed
@bkonyi bkonyi deleted the flutter_doctor_validator_execution_duration branch January 13, 2025 21:50
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 14, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 14, 2025
Roll Flutter from 72db8f6 to 40c2b86 (33 revisions)

flutter/flutter@72db8f6...40c2b86

2025-01-14 [email protected] update changelog for 3.27.2 release (flutter/flutter#161569)
2025-01-14 [email protected] Fix `showLicensePage` does not inherit ambient `Theme` (flutter/flutter#161599)
2025-01-14 [email protected] Added special case for fat width arcs (flutter/flutter#161255)
2025-01-14 [email protected] Replace `fetch `with `gclient sync`. (flutter/flutter#161565)
2025-01-14 [email protected] Roll Packages from 3c3bc68 to d1fd623 (4 revisions) (flutter/flutter#161597)
2025-01-14 [email protected] Remove unused method (flutter/flutter#161572)
2025-01-14 [email protected] Fix crash when closing a window with `Alt+F4` in multi-win Flutter on Windows (flutter/flutter#161375)
2025-01-14 [email protected] Update InputDecoration.border documentation (flutter/flutter#161415)
2025-01-14 [email protected] [Web] Allow specifying the strategy on when to use <img> element to display images (flutter/flutter#159917)
2025-01-14 [email protected] Roll Dart to  Version 3.7.0-323.0.dev (flutter/flutter#161567)
2025-01-14 [email protected] Use wildcards (flutter/flutter#161548)
2025-01-14 [email protected] Autocomplete Options Width (flutter/flutter#143249)
2025-01-13 [email protected] Move the analyzer_benchmark to Mac arm64 devicelab bots (flutter/flutter#161405)
2025-01-13 [email protected] Remove references to `cirrus`, mostly in doc comments. (flutter/flutter#161529)
2025-01-13 [email protected] Fix paths when running clang-tidy on git diffs (flutter/flutter#161496)
2025-01-13 [email protected] [web:a11y] treat empty tappables as buttons (flutter/flutter#161360)
2025-01-13 [email protected] Add route settings to CupertinoSheetRoute (flutter/flutter#161528)
2025-01-13 [email protected] Copy `linux_host_engine` as `linux_host_engine_test`, removing `archives: [...]`. (flutter/flutter#161532)
2025-01-13 [email protected] Remove last two references to Cirrus CI. (flutter/flutter#161530)
2025-01-13 [email protected] Mark `Mac_mokey microbenchmarks` as flakey (flutter/flutter#161550)
2025-01-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (#160241)" (flutter/flutter#161555)
2025-01-13 [email protected] Add validator execution times to `flutter doctor --verbose` (flutter/flutter#158124)
2025-01-13 [email protected] Explain more specifically how to use `flutter drive`/what it does (flutter/flutter#161450)
2025-01-13 [email protected] Fixed repeated strings for incompatible Gradle or AGP version in `create` command (flutter/flutter#161223)
2025-01-13 [email protected] Remove `WEB_SHARD_COUNT`, which no longer exists post-Cirrus. (flutter/flutter#161527)
2025-01-13 [email protected] [Impeller] Update guidance on prebuilt artifacts. (flutter/flutter#161251)
2025-01-13 [email protected] Migrate DisplayList unit tests to DL/Impeller geometry classes (flutter/flutter#161453)
2025-01-13 [email protected] Context menu button callback docs clarification (flutter/flutter#161451)
2025-01-13 [email protected] Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (flutter/flutter#160241)
2025-01-13 [email protected] Udpate documentation on the third_party directories (flutter/flutter#161407)
2025-01-13 [email protected] Propagate environment variables when `flutter drive` is invoked. (flutter/flutter#161452)
2025-01-13 [email protected] Convert base application name handling to kotlin source (start of FGP kt conversion) (flutter/flutter#155963)
2025-01-13 [email protected] [Impeller] remove API 30 restriction for SurfaceControl testing. (flutter/flutter#161438)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
...
maheshj01 pushed a commit to maheshj01/flutter that referenced this pull request Jan 15, 2025
…158124)

Should help provide more information for `flutter doctor` timeouts like
we've seen in flutter#157513
);
}, overrides: <Type, Generator>{AnsiTerminal: () => FakeTerminal()});
logger.statusText,
equals('[✓] Passing Validator (with statusInfo) [0ms]\n'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to fail on CI - in the most recent run the times were 1ms:

Expected: '[✓] First validator title (A status message) [0ms]\n'
            '    • A helpful message\n'
            '    • A different message\n'
            '\n'
            '• No issues found!\n'
            ''
  Actual: '[✓] First validator title (A status message) [1ms]\n'
            '    • A helpful message\n'
            '    • A different message\n'
            '\n'
            '• No issues found!\n'
            ''
   Which: is different.
          Expected: ... message) [0ms]\n     ...
            Actual: ... message) [1ms]\n     ...
                                  ^
           Differ at offset 46

Suggest we match with a regex to allow any value for ms?

Copy link
Contributor Author

@bkonyi bkonyi Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a bug in the tests. A fix is going to land in #161917

bkonyi added a commit that referenced this pull request Jan 20, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
Roll Flutter from 72db8f6 to 40c2b86 (33 revisions)

flutter/flutter@72db8f6...40c2b86

2025-01-14 [email protected] update changelog for 3.27.2 release (flutter/flutter#161569)
2025-01-14 [email protected] Fix `showLicensePage` does not inherit ambient `Theme` (flutter/flutter#161599)
2025-01-14 [email protected] Added special case for fat width arcs (flutter/flutter#161255)
2025-01-14 [email protected] Replace `fetch `with `gclient sync`. (flutter/flutter#161565)
2025-01-14 [email protected] Roll Packages from 3c3bc68 to d1fd623 (4 revisions) (flutter/flutter#161597)
2025-01-14 [email protected] Remove unused method (flutter/flutter#161572)
2025-01-14 [email protected] Fix crash when closing a window with `Alt+F4` in multi-win Flutter on Windows (flutter/flutter#161375)
2025-01-14 [email protected] Update InputDecoration.border documentation (flutter/flutter#161415)
2025-01-14 [email protected] [Web] Allow specifying the strategy on when to use <img> element to display images (flutter/flutter#159917)
2025-01-14 [email protected] Roll Dart to  Version 3.7.0-323.0.dev (flutter/flutter#161567)
2025-01-14 [email protected] Use wildcards (flutter/flutter#161548)
2025-01-14 [email protected] Autocomplete Options Width (flutter/flutter#143249)
2025-01-13 [email protected] Move the analyzer_benchmark to Mac arm64 devicelab bots (flutter/flutter#161405)
2025-01-13 [email protected] Remove references to `cirrus`, mostly in doc comments. (flutter/flutter#161529)
2025-01-13 [email protected] Fix paths when running clang-tidy on git diffs (flutter/flutter#161496)
2025-01-13 [email protected] [web:a11y] treat empty tappables as buttons (flutter/flutter#161360)
2025-01-13 [email protected] Add route settings to CupertinoSheetRoute (flutter/flutter#161528)
2025-01-13 [email protected] Copy `linux_host_engine` as `linux_host_engine_test`, removing `archives: [...]`. (flutter/flutter#161532)
2025-01-13 [email protected] Remove last two references to Cirrus CI. (flutter/flutter#161530)
2025-01-13 [email protected] Mark `Mac_mokey microbenchmarks` as flakey (flutter/flutter#161550)
2025-01-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (#160241)" (flutter/flutter#161555)
2025-01-13 [email protected] Add validator execution times to `flutter doctor --verbose` (flutter/flutter#158124)
2025-01-13 [email protected] Explain more specifically how to use `flutter drive`/what it does (flutter/flutter#161450)
2025-01-13 [email protected] Fixed repeated strings for incompatible Gradle or AGP version in `create` command (flutter/flutter#161223)
2025-01-13 [email protected] Remove `WEB_SHARD_COUNT`, which no longer exists post-Cirrus. (flutter/flutter#161527)
2025-01-13 [email protected] [Impeller] Update guidance on prebuilt artifacts. (flutter/flutter#161251)
2025-01-13 [email protected] Migrate DisplayList unit tests to DL/Impeller geometry classes (flutter/flutter#161453)
2025-01-13 [email protected] Context menu button callback docs clarification (flutter/flutter#161451)
2025-01-13 [email protected] Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (flutter/flutter#160241)
2025-01-13 [email protected] Udpate documentation on the third_party directories (flutter/flutter#161407)
2025-01-13 [email protected] Propagate environment variables when `flutter drive` is invoked. (flutter/flutter#161452)
2025-01-13 [email protected] Convert base application name handling to kotlin source (start of FGP kt conversion) (flutter/flutter#155963)
2025-01-13 [email protected] [Impeller] remove API 30 restriction for SurfaceControl testing. (flutter/flutter#161438)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
...
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
Roll Flutter from 72db8f6 to 40c2b86 (33 revisions)

flutter/flutter@72db8f6...40c2b86

2025-01-14 [email protected] update changelog for 3.27.2 release (flutter/flutter#161569)
2025-01-14 [email protected] Fix `showLicensePage` does not inherit ambient `Theme` (flutter/flutter#161599)
2025-01-14 [email protected] Added special case for fat width arcs (flutter/flutter#161255)
2025-01-14 [email protected] Replace `fetch `with `gclient sync`. (flutter/flutter#161565)
2025-01-14 [email protected] Roll Packages from 3c3bc68 to d1fd623 (4 revisions) (flutter/flutter#161597)
2025-01-14 [email protected] Remove unused method (flutter/flutter#161572)
2025-01-14 [email protected] Fix crash when closing a window with `Alt+F4` in multi-win Flutter on Windows (flutter/flutter#161375)
2025-01-14 [email protected] Update InputDecoration.border documentation (flutter/flutter#161415)
2025-01-14 [email protected] [Web] Allow specifying the strategy on when to use <img> element to display images (flutter/flutter#159917)
2025-01-14 [email protected] Roll Dart to  Version 3.7.0-323.0.dev (flutter/flutter#161567)
2025-01-14 [email protected] Use wildcards (flutter/flutter#161548)
2025-01-14 [email protected] Autocomplete Options Width (flutter/flutter#143249)
2025-01-13 [email protected] Move the analyzer_benchmark to Mac arm64 devicelab bots (flutter/flutter#161405)
2025-01-13 [email protected] Remove references to `cirrus`, mostly in doc comments. (flutter/flutter#161529)
2025-01-13 [email protected] Fix paths when running clang-tidy on git diffs (flutter/flutter#161496)
2025-01-13 [email protected] [web:a11y] treat empty tappables as buttons (flutter/flutter#161360)
2025-01-13 [email protected] Add route settings to CupertinoSheetRoute (flutter/flutter#161528)
2025-01-13 [email protected] Copy `linux_host_engine` as `linux_host_engine_test`, removing `archives: [...]`. (flutter/flutter#161532)
2025-01-13 [email protected] Remove last two references to Cirrus CI. (flutter/flutter#161530)
2025-01-13 [email protected] Mark `Mac_mokey microbenchmarks` as flakey (flutter/flutter#161550)
2025-01-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (#160241)" (flutter/flutter#161555)
2025-01-13 [email protected] Add validator execution times to `flutter doctor --verbose` (flutter/flutter#158124)
2025-01-13 [email protected] Explain more specifically how to use `flutter drive`/what it does (flutter/flutter#161450)
2025-01-13 [email protected] Fixed repeated strings for incompatible Gradle or AGP version in `create` command (flutter/flutter#161223)
2025-01-13 [email protected] Remove `WEB_SHARD_COUNT`, which no longer exists post-Cirrus. (flutter/flutter#161527)
2025-01-13 [email protected] [Impeller] Update guidance on prebuilt artifacts. (flutter/flutter#161251)
2025-01-13 [email protected] Migrate DisplayList unit tests to DL/Impeller geometry classes (flutter/flutter#161453)
2025-01-13 [email protected] Context menu button callback docs clarification (flutter/flutter#161451)
2025-01-13 [email protected] Match CupertinoPageTransitionsBuilder animation duration to CupertinoPageRoute (flutter/flutter#160241)
2025-01-13 [email protected] Udpate documentation on the third_party directories (flutter/flutter#161407)
2025-01-13 [email protected] Propagate environment variables when `flutter drive` is invoked. (flutter/flutter#161452)
2025-01-13 [email protected] Convert base application name handling to kotlin source (start of FGP kt conversion) (flutter/flutter#155963)
2025-01-13 [email protected] [Impeller] remove API 30 restriction for SurfaceControl testing. (flutter/flutter#161438)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants