Skip to content

Conversation

@vashworth
Copy link
Contributor

@vashworth vashworth commented Jan 31, 2024

When the Dart VM is not found within 10 minutes in CI on CoreDevices (iOS 17+), stop the app and upload the logs from DerivedData. The app has to be stopped first since the logs are not put in DerivedData until it's stopped.

Also, rearranged some logic to have CoreDevice have its own function for Dart VM url discovery.

Debugging for #142448.

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.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. labels Jan 31, 2024
@vashworth vashworth requested a review from jmagman January 31, 2024 22:00
maxWaitForCI = Timer(const Duration(minutes: 10), () async {
_logger.printError('Failed to find Dart VM after 10 minutes.');
await _xcodeDebug.exit();
final String? logsDirectoryPath = _platform.environment['FLUTTER_LOGS_DIR'];
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we have any prior examples for putting the environment details of LUCI into the tool. In the past I've passed in the log location if the tool really needed to know about it #78822

@christopherfujino wdyt about this? I don't really like it in the public-facing tool but maybe I'm being arbitrary, but this repo does of course understand details about LUCI

Directory? get dumpDirectory {
if (_dumpDirectory == null) {
// Set in LUCI recipe.
final String? directoryPath = _platform.environment['FLUTTER_LOGS_DIR'];
if (directoryPath != null) {
_dumpDirectory = _fileSystem.directory(directoryPath)..createSync(recursive: true);
print('Found FLUTTER_LOGS_DIR dump directory ${_dumpDirectory?.path}');
}
}
return _dumpDirectory;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

previously where we needed this we would expose a new CLI option to the tool (for example --debug-logs-dir) and then provide them from the devicelab runner. This also might be generally useful for adding other debugging of this kind if and only if the --debug-logs-dir=$FLUTTER_LOGS_DIR option is passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, I changed it to pass as a flag

.childDirectory(entity.basename)
.childDirectory('Logs');
_logger.printTrace('Copying logs ${logsToCopy.path} to ${copyDestination.path}...');
copyDirectory(logsToCopy, copyDestination);
Copy link
Member

Choose a reason for hiding this comment

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

You may wind up needing to compress this before you copy it if you hit this problem #75736 :

Screen Shot 2021-02-09 at 1 00 49 PM

I'm not sure how logs are handled these days, may as well merge this and see.

Copy link
Contributor

Choose a reason for hiding this comment

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

yolo

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 1, 2024
Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 1, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 1, 2024

auto label is removed for flutter/flutter/142643, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 1, 2024
@auto-submit auto-submit bot merged commit e5c286e into flutter:master Feb 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 5, 2024
tarrinneal pushed a commit to flutter/packages that referenced this pull request Feb 5, 2024
Manual roll Flutter from e02e207 to 0b5cd50 (46 revisions)

Manual roll requested by [email protected]

flutter/flutter@e02e207...0b5cd50

2024-02-05 [email protected] fix AppBar docs
for backgroundColor & foregroundColor (flutter/flutter#142430)
2024-02-04 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"Update gradle lockfiles template" (flutter/flutter#142889)
2024-02-04 [email protected] Update gradle lockfiles template
(flutter/flutter#140115)
2024-02-04 [email protected] Roll Flutter Engine from
20742e37e54e to f34c658b9600 (1 revision) (flutter/flutter#142876)
2024-02-03 [email protected] Roll Flutter Engine from
23763db72272 to 20742e37e54e (1 revision) (flutter/flutter#142850)
2024-02-03 [email protected] Roll Flutter Engine from
fee02145da8c to 23763db72272 (3 revisions) (flutter/flutter#142848)
2024-02-03 [email protected] Roll Flutter Engine from
9869d47a2736 to fee02145da8c (2 revisions) (flutter/flutter#142847)
2024-02-03 [email protected] Roll Flutter Engine from
78c63d3c2c68 to 9869d47a2736 (1 revision) (flutter/flutter#142842)
2024-02-02 [email protected] Roll Flutter Engine from
266d5d0b5588 to 78c63d3c2c68 (1 revision) (flutter/flutter#142836)
2024-02-02 49699333+dependabot[bot]@users.noreply.github.com Bump
github/codeql-action from 3.23.2 to 3.24.0 (flutter/flutter#142839)
2024-02-02 49699333+dependabot[bot]@users.noreply.github.com Bump
codecov/codecov-action from 3.1.6 to 4.0.1 (flutter/flutter#142838)
2024-02-02 [email protected] Update TextSelectionOverlay
(flutter/flutter#142463)
2024-02-02 [email protected] Roll Flutter Engine from
e29263212bfd to 266d5d0b5588 (5 revisions) (flutter/flutter#142832)
2024-02-02 [email protected] Fix CupertinoTextSelectionToolbar
clipping (flutter/flutter#138195)
2024-02-02 [email protected] Reland "Add support for Gradle Kotlin DSL
(#140744)" (flutter/flutter#142752)
2024-02-02 [email protected] Support navigation during a Cupertino
back gesture (flutter/flutter#142248)
2024-02-02 [email protected] Avoid depending on files from
build_system/targets other than from top level entrypoints in
flutter_tools. (flutter/flutter#142760)
2024-02-02 [email protected] Roll Packages from
5b48c44 to d37fb0a (14 revisions) (flutter/flutter#142812)
2024-02-02 [email protected] Add a link
the different possible Android virtual device configs
(flutter/flutter#142765)
2024-02-02 [email protected] Allow all iOS
tests to use either iOS 16 or 17 (flutter/flutter#142714)
2024-02-02 [email protected] Roll Flutter Engine from
b35153d00b2e to e29263212bfd (2 revisions) (flutter/flutter#142799)
2024-02-02 [email protected] Roll Flutter Engine from
dd4c79a6c864 to b35153d00b2e (10 revisions) (flutter/flutter#142783)
2024-02-02 [email protected] Wasm/JS Dual Compile with the
flutter tool (flutter/flutter#141396)
2024-02-02 [email protected] Reland: Added
ButtonStyle.foregroundBuilder and ButtonStyle.backgroundBuilder
(flutter/flutter#142762)
2024-02-01 [email protected] Use proto
name for emulator version and show cipd package version
(flutter/flutter#142262)
2024-02-01 [email protected] [github actions] ping actor of workflow
on cherry pick pr creation (flutter/flutter#142676)
2024-02-01 [email protected] Marks Linux_android_emu android
views to be unflaky (flutter/flutter#142590)
2024-02-01 [email protected] Implement `switch` expressions in
`lib/src/material/` (flutter/flutter#142634)
2024-02-01 [email protected] Roll Flutter Engine from
9beb7e82e081 to dd4c79a6c864 (1 revision) (flutter/flutter#142749)
2024-02-01 [email protected] Write Tests for API Example of
`form.0.dart` (flutter/flutter#142635)
2024-02-01 [email protected] Make leak_tracking bots sticked to the
left even if bot thinks they are non-flacky. (flutter/flutter#142744)
2024-02-01 [email protected] Upload
DerivedData logs in CI (flutter/flutter#142643)
2024-02-01 [email protected] Test codesigning xcframeworks in artifacts
(flutter/flutter#142666)
2024-02-01 [email protected] Fix gen_defaults test randomness
(flutter/flutter#142743)
2024-02-01 98614782+auto-submit[bot]@users.noreply.github.com Reverts
"Added ButtonStyle.foregroundBuilder and ButtonStyle.backgroundBuilder"
(flutter/flutter#142748)
2024-02-01 [email protected] Roll Flutter Engine from
39415c3eed42 to 9beb7e82e081 (5 revisions) (flutter/flutter#142745)
2024-02-01 [email protected] Remove unused deprecated autoroll
mirror-remote flag (flutter/flutter#142738)
2024-02-01 [email protected] Fix leaks in tests.
(flutter/flutter#142677)
2024-02-01 [email protected] Roll Flutter Engine from
8c43332c6ffc to 39415c3eed42 (1 revision) (flutter/flutter#142740)
2024-02-01 [email protected] Remove verbose-system-logs on iOS perf
tests (flutter/flutter#142739)
2024-02-01 [email protected] Remove outdated arm64_armv7 check
(flutter/flutter#142737)
2024-02-01 [email protected] fix
CupertinoTabView's Android back button handling with PopScope
(flutter/flutter#141604)
2024-02-01 [email protected] Roll Flutter Engine from
68943afd62d1 to 8c43332c6ffc (8 revisions) (flutter/flutter#142726)
2024-02-01 [email protected] Unpin test
(flutter/flutter#141427)
...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Nov 6, 2024
…ntegration_test runs (#7430)

1. Native Xcode tests will output a helpful "xcresult" package on failure containing logs, screenshots, and screen recordings.  Zip and upload these results when tests fail.

2. Pass `flutter test --debug-logs-dir` flag to upload logs  like flutter/flutter#142643.

3. Pass `flutter drive --screenshot` flag to upload screenshots on timeout like flutter/flutter#96973.

Example of [failing Xcode analyzer build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20ios_platform_tests_shard_5%20master/17374/overview) has the [zipped xcresult](https://storage.googleapis.com/flutter_logs/flutter/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcode%20analyze/ff98c32e-18ca-4ad4-a910-9db1d7f7e4b0/xcodebuild-2024-10-25T09:56:46.440913.zip) attached as a log.
![Screenshot 2024-10-25 at 10 10 36�AM](https://github.com/user-attachments/assets/dd7ae9bc-6161-4381-8a4f-f10b8c981801)

The unzipped xcresult looks like this in Xcode:

![Screenshot 2024-10-25 at 10 11 55�AM](https://github.com/user-attachments/assets/d4dd8420-f272-459c-9785-ab0c03887a74)

A [failing "native test" step build](https://ci.chromium.org/ui/p/flutter/builders/try/Mac_arm64%20macos_platform_tests%20master%20-%20packages/17315/overview):

![Screenshot 2024-10-25 at 10 19 55�AM](https://github.com/user-attachments/assets/76a86a15-2150-482a-8b15-e3e7ac90485e)

Fixes flutter/flutter#144795
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants