Uh oh!
There was an error while loading. Please reload this page.
[ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs - #7430
Conversation
stuartmorgan-g
commented
Oct 8, 2024
From triage: What's the status of this? Is it still something we plan to deploy? It would definitely be useful for debugging! |
jmagman
commented
Oct 24, 2024
Sorry, I lost track of this. I need to page back in why the tests are failing. |
2a21d04 to
d329678CompareThis reverts commit d329678b5be29c3c03ac0d3e9dc18d3bc0d8d154.
d329678 to
54003a8Comparejmagman
commented
Oct 29, 2024
@stuartmorgan this is ready to review, when you get a chance. |
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM
Is the FLUTTER_LOGS_DIR support low-level enough that it already applies to this repo, or do we need recipe changes too?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| Directory? screenshotDirectory; | ||
| if (logsDirectory != null) { | ||
| screenshotDirectory = logsDirectory.childDirectory('$exampleName-drive'); | ||
| } |
There was a problem hiding this comment.
Directory? screenshotDirectory = logsDirectory?.childDirectory(...);
There was a problem hiding this comment.
Oops, I copied code that was written before null safety and clumsily migrated (likely by me).
| for (final File target in targets) { | ||
| Directory? screenshotDirectory; | ||
| if (logsDirectory != null) { | ||
| screenshotDirectory = logsDirectory.childDirectory('$exampleName-drive'); |
There was a problem hiding this comment.
exampleName is a relative posix path; IIRC childDirectory will interpret that as a path and actually make intervening directories. Is that what we want? If not we should replace / with _ or something before this.
| required List<File> testFiles, | ||
| }) async { | ||
| final String enableExperiment = getStringArg(kEnableExperiment); | ||
| final Directory? logsDirectory = testFiles.isNotEmpty ? ciLogsDirectory(platform, testFiles.first.fileSystem) : null; |
There was a problem hiding this comment.
Why is this gated on testFiles not being empty? (I'd have to check but I wouldn't think this would ever be called with an empty test list.)
There was a problem hiding this comment.
I think I was just guarding the .first, I'll remove since I think you're right it's never called with an empty list.
jmagman
commented
Nov 4, 2024
It already applies as of https://flutter-review.googlesource.com/c/recipes/+/39703 You can see it in the env: |
…ve and integration_test runs (flutter/packages#7430)
flutter/packages@7219431...bb5a258 2024-11-06 magder@google.com [ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs (flutter/packages#7430) 2024-11-05 737941+loic-sharma@users.noreply.github.com Remove use_modular_headers! from Podfiles (flutter/packages#7796) 2024-11-05 30872003+misos1@users.noreply.github.com [camera_avfoundation] enable more than 30 fps (flutter/packages#7394) 2024-11-05 engine-flutter-autoroll@skia.org Roll Flutter from 8591d0c to 29d40f7 (25 revisions) (flutter/packages#8027) 2024-11-05 stuartmorgan@google.com [ci] Add vector_graphics and flutter_svg to autolabeler (flutter/packages#8025) 2024-11-05 alex@mariuti.com [vector_graphics_compiler] wasm compatibility (flutter/packages#8021) 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-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: 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
* main: (1187 commits) [various] Update example app minSdkVersions (flutter#8035) [go_router] Activate leak testing (flutter#7546) [in_app_purchase_storekit] Add restore purchases and receipts (flutter#7964) [interactive_media_ads] Adds remaining methods for internal wrapper of the Android native `BaseManager` (flutter#7943) [google_sign_in/google_identity_services] Clear-up documentation of callbacks in various APIs and uses of those APIs (flutter#8029) [flutter_svg] wasm compatibility (flutter#8014) Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (Part 2) (flutter#8019) Roll Flutter from 29d40f7 to 73546b3 (20 revisions) (flutter#8028) [ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs (flutter#7430) Remove use_modular_headers! from Podfiles (flutter#7796) [camera_avfoundation] enable more than 30 fps (flutter#7394) Roll Flutter from 8591d0c to 29d40f7 (25 revisions) (flutter#8027) [ci] Add vector_graphics and flutter_svg to autolabeler (flutter#8025) [vector_graphics_compiler] wasm compatibility (flutter#8021) [vector_graphics*] Relax dependency constraints of vector_graphics, vector_graphics_codec, vector_graphics_compiler, flutter_svg (flutter#8018) [various] Add `missing_code_block_language_in_doc_comment` lint to flutter/packages. (flutter#6473) [various] Update example apps to Kotlin 1.9.0 (flutter#7998) [go_router] add current state getter (flutter#7651) Applied Gradle Plugins Declaratively for Multiple Plugin Example Apps (flutter#7968) Roll Flutter from f86b777 to 8591d0c (16 revisions) (flutter#8015) ... # Conflicts: # packages/quick_actions/quick_actions/CHANGELOG.md # packages/quick_actions/quick_actions_ios/CHANGELOG.md # packages/quick_actions/quick_actions_platform_interface/CHANGELOG.md
…ntegration_test runs (flutter#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.  The unzipped xcresult looks like this in Xcode:  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):  Fixesflutter/flutter#144795
…ntegration_test runs (flutter#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.  The unzipped xcresult looks like this in Xcode:  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):  Fixesflutter/flutter#144795
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.
Pass
flutter test --debug-logs-dirflag to upload logs like Upload DerivedData logs in CI flutter#142643.Pass
flutter drive --screenshotflag to upload screenshots on timeout like Take drive screenshot on test failure before app is stopped flutter#96973.Example of failing Xcode analyzer build has the zipped xcresult attached as a log.

The unzipped xcresult looks like this in Xcode:
A failing "native test" step build:
Fixesflutter/flutter#144795
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.