Skip to content
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

Use async execution for xcodebuild commands #29048

Merged

Conversation

Projects
None yet
4 participants
@priitlatt
Copy link
Contributor

commented Mar 8, 2019

Description

Sometimes Flutter never receives the output of xcodebuild -list and xcodebuild -showBuildSettings commands while they have actually been completed underneath (no alive processes for xcodebuild are present). For unknown reasons, the issue does not reproduce when the commands are invoked with runCheckedAsync instead of runCheckedSync.

Related Issues

#28415

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

@googlebot

This comment has been minimized.

Copy link

commented Mar 8, 2019

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no label Mar 8, 2019

@priitlatt priitlatt referenced this pull request Mar 8, 2019

Closed

Add timeout/retry logic to xcodebuild -list call #28842

9 of 10 tasks complete
@jonahwilliams

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2019

I'm ready to LGTM once the CLA is signed and the test is fixed

jonahwilliams and others added some commits Mar 8, 2019

Update packages/flutter_tools/test/ios/cocoapods_test.dart
Co-Authored-By: priitlatt <lattpriit@gmail.com>
Update packages/flutter_tools/test/project_test.dart
Co-Authored-By: priitlatt <lattpriit@gmail.com>
@jonahwilliams

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

@priitlatt are you able to continue working on it or should we continue ourselves?

@goderbauer goderbauer added the tool label Mar 12, 2019

@priitlatt

This comment has been minimized.

Copy link
Contributor Author

commented Mar 12, 2019

@jonahwilliams We were observing how this fix behaves in the production over the weekend and yesterday. At first it was very promising, but now it seems that it still occasionally gets stuck on /usr/bin/xcodebuild -project /paht/to/Runner.xcodeproj -target Runner -showBuildSettings.

Also, making XcodeProjectInterpreter#getBuildSettings async has proven to be a bit more involved than I initially thought it would be (this also causes the tests and some functionality to break). And on top of the complications, it doesn't even give the desired result.

But async version of XcodeProjectInterpreter#getInfo seems to solve at least half of the problem for now. So I'll revert changes related to getBuildSettings and perhaps we could move on with getInfo being async for now?

@jonahwilliams

This comment has been minimized.

Copy link
Contributor

commented Mar 12, 2019

That sounds reasonable to me

@jonahwilliams

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

cc @priitlatt what are your plans with this CL? If this improves the situation I would prefer to land it and continue addressing other forms of flakiness separately

@priitlatt

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2019

@jonahwilliams Last I checked the Flutter build was failing and hence the delays, sorry about that. I'm good to go on with this and continue with showBuildSettings getting stuck separately. Also, I've signed the CLA in the meantime.

@priitlatt priitlatt marked this pull request as ready for review Mar 19, 2019

@jonahwilliams
Copy link
Contributor

left a comment

LGTM,

Thank you for the contribution!

@priitlatt

This comment has been minimized.

Copy link
Contributor Author

commented Mar 19, 2019

I signed it!

@googlebot

This comment has been minimized.

Copy link

commented Mar 19, 2019

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Mar 19, 2019

@jonahwilliams jonahwilliams merged commit cdbd0f9 into flutter:master Mar 19, 2019

33 checks passed

WIP Ready for review
Details
add2app-macos Task Summary
Details
add2app-macos
Details
analyze Task Summary
Details
analyze
Details
build_tests-linux Task Summary
Details
build_tests-linux
Details
build_tests-macos Task Summary
Details
build_tests-macos
Details
build_tests-windows Task Summary
Details
build_tests-windows
Details
cla/google All necessary CLAs are signed
docs Task Summary
Details
docs
Details
flutter-build
integration_tests-linux Task Summary
Details
integration_tests-linux
Details
integration_tests-macos Task Summary
Details
integration_tests-macos
Details
integration_tests-windows Task Summary
Details
integration_tests-windows
Details
tests-linux Task Summary
Details
tests-linux
Details
tests-macos Task Summary
Details
tests-macos
Details
tests-windows Task Summary
Details
tests-windows
Details
tool_tests-linux Task Summary
Details
tool_tests-linux
Details
tool_tests-macos Task Summary
Details
tool_tests-macos
Details
tool_tests-windows Task Summary
Details
tool_tests-windows
Details

gspencergoog added a commit to gspencergoog/flutter that referenced this pull request Mar 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.