-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Fix flaky failure related to core_device_list.json not being found #158946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It's possible that the tool can be in the process of shutting down, which could result in the temp directory being deleted after the shutdown hooks run before we check if `output` exists. If this happens, we shouldn't crash but just carry on as if no devices were found as the tool will exit on its own. Fixes #141892
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
| final bool isPossiblyShutdown = _fileSystem is LocalFileSystem && _fileSystem.disposed; | ||
|
|
||
| // It's possible that the tool is in the process of shutting down, which | ||
| // could result in the temp directory being deleted after the shutdown hooks run | ||
| // before we check if `output` exists. If this happens, we shouldn't crash | ||
| // but just carry on as if no devices were found as the tool will exit on | ||
| // its own. | ||
| // | ||
| // See https://github.com/flutter/flutter/issues/141892 for details. | ||
| if (!isPossiblyShutdown && !output.existsSync()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: consider renaming isPossiblyShutdown to isToolPossiblyShutdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or toolPossbilyShutdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
andrewkolos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/flutter@b3818f6...8536b96 2024-11-19 matanlurey@users.noreply.github.com Terminate `flutter test` when no longer needed in integration test. (flutter/flutter#159117) 2024-11-19 matanlurey@users.noreply.github.com Terminate the test device if the `flutter` tool is signal-killed. (flutter/flutter#159115) 2024-11-19 engine-flutter-autoroll@skia.org Roll Packages from c1eabf5 to fc4adc7 (10 revisions) (flutter/flutter#159143) 2024-11-19 reidbaker@google.com Deflake api 35 emulator tests by updating emulator definitions version to latest available from chrome infra (flutter/flutter#158017) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from b6723e33b858 to cff1e751f853 (1 revision) (flutter/flutter#159141) 2024-11-19 bruno.leroux@gmail.com Fix InkWell overlayColor resolution ignores selected state (flutter/flutter#159072) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 983b7b85d122 to b6723e33b858 (3 revisions) (flutter/flutter#159134) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from c1b0e18a70b3 to 983b7b85d122 (2 revisions) (flutter/flutter#159124) 2024-11-19 engine-flutter-autoroll@skia.org Roll Flutter Engine from 878f593802e1 to c1b0e18a70b3 (13 revisions) (flutter/flutter#159118) 2024-11-19 737941+loic-sharma@users.noreply.github.com [SwiftPM] Move where the migration checks feature flags (flutter/flutter#159110) 2024-11-18 gspencergoog@users.noreply.github.com Plumbs `scrollBehavior` into `SelectableText` so that the scrollbar may be hidden (flutter/flutter#158887) 2024-11-18 matanlurey@users.noreply.github.com Add a tag and assert some state in FlutterTestDriver tests. (flutter/flutter#159099) 2024-11-18 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 4.6.0 to 5.0.2 in the all-github-actions group (flutter/flutter#159104) 2024-11-18 nate.w5687@gmail.com Add `@protected` to public `State` method overrides (flutter/flutter#157313) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9686de154114 to 878f593802e1 (5 revisions) (flutter/flutter#159097) 2024-11-18 bkonyi@google.com Fix flaky failure related to core_device_list.json not being found (flutter/flutter#158946) 2024-11-18 katelovett@google.com Prettier merge_queue.md (flutter/flutter#158969) 2024-11-18 matanlurey@users.noreply.github.com Define and use `flutterBin` consistently across `integration.shard`. (flutter/flutter#159007) 2024-11-18 matanlurey@users.noreply.github.com No longer download `android-x86-jit-release`. (flutter/flutter#159011) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from e1f4e7d9bfc4 to 9686de154114 (1 revision) (flutter/flutter#159082) 2024-11-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from f365c9f5dce3 to e1f4e7d9bfc4 (4 revisions) (flutter/flutter#159078) 2024-11-18 engine-flutter-autoroll@skia.org Roll Packages from b164be3 to c1eabf5 (6 revisions) (flutter/flutter#159077) 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 louisehsu@google.com,stuartmorgan@google.com 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: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
It's possible that the tool can be in the process of shutting down, which could result in the temp directory being deleted after the shutdown hooks run before we check if
outputexists. If this happens, we shouldn't crash but just carry on as if no devices were found as the tool will exit on its own.Fixes #141892