Repository navigation
[flutter_tool] Use a timeout for xcode showBuildSettings - #39280
Conversation
Codecov Report
@@ Coverage Diff @@
## master #39280 +/- ##
==========================================
+ Coverage 55.99% 56.71% +0.71%
==========================================
Files 195 195
Lines 18428 18469 +41
==========================================
+ Hits 10319 10474 +155
+ Misses 8109 7995 -114
Continue to review full report at Codecov.
|
|
This violates our style guide which says to never have timeouts because they are a source of flakes. Are these processes destructive or idempotent? If they're idempotent, then I suggest that we change this to not kill the first process, but to show a message after a few seconds saying "This seems to be taking longer than usual" and then start a second process in parallel, to see if it returns faster, and if it does, kill the first one. If the second takes more than a minute, kill it then try a third one, etc, leaving still the first one running, in case it's just being super slow. |
|
Filed as #42265 |
Description
Subcommands called by the tool may hang. Subsequent invocations may then succeed. This PR adds optional named parameters to
runAsync()andrunCheckedAsync()to provide for the need to retry subcommands that time-out.In particular, when xcode runs with the
-showBuildSettingsflag it may timeout and then succeed on retry. This PR updates the call site from the issue reported below to time out after one minute, and retry one time. Additionally, this PR caches the result of the-showBuildSettingssubcommand that could not be made asynchronous since it is called from a constructor.Related Issues
#35988
#39141
Tests
I added the following tests:
Added tests of timeout with retry to process_test.dart. Updated other affected tests.
Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?