Skip to content

Add a skill for flake analysis#187530

Merged
auto-submit[bot] merged 7 commits into
flutter:masterfrom
gmackall:flake-analysis-skill
Jun 3, 2026
Merged

Add a skill for flake analysis#187530
auto-submit[bot] merged 7 commits into
flutter:masterfrom
gmackall:flake-analysis-skill

Conversation

@gmackall
Copy link
Copy Markdown
Member

@gmackall gmackall commented Jun 3, 2026

Example output for issue #185070

Flake Analysis Report: android_engine_vulkan_tests

This report analyzes the failures of the android_engine_vulkan_tests shard in the flutter/flutter repository across 15 recent failed builds between Build 1658 and Build 2495.


Executive Summary

The failures in the android_engine_vulkan_tests builder fall into three distinct categories:

  1. Primary Blocker (Skia Gold Image Mismatch): A deterministic/semi-deterministic failure where 5 different integration tests all output the exact same image digest (5ba6df7acef516f7dab78587cf30ce20). This strongly points to a frame buffer rendering or screenshot capture failure (e.g., capturing a completely blank, black, or transparent frame) on the Vulkan emulator.
  2. Infrastructure / Emulator Issues (Transient Flakes): Classical ADB/emulator connection issues, such as failing to uninstall/install the application APK, or failure to initialize the native driver wrapper.
  3. Timeout / Aborted Runs: Builds that failed during the test execution without printing any specific stdout failure details before termination, indicating runner-level timeouts.

Build Failure Summary Table

Build Number Failure Category Details / Primary Failure Symptom
2495 Skia Gold Mismatch All 5 tests matched hash 5ba6df7acef516f7dab78587cf30ce20
2392 Timeout / Aborted Shard failed without specific error logs
2337 Infrastructure Failed to uninstall app (Process exited abnormally)
2317 Infrastructure Failed to uninstall app (Process exited abnormally)
2313 Skia Gold Mismatch All 5 tests matched hash 5ba6df7acef516f7dab78587cf30ce20
2283 Infrastructure Failed to uninstall app (Process exited abnormally)
2280 Infrastructure Failed to uninstall app (Process exited abnormally)
2268 Infrastructure Failed to uninstall app, nativeDriver has not been initialized
2198 Infrastructure Failed to uninstall app, Failed to fulfill WaitFor due to remote error
1965 Skia Gold Mismatch All 5 tests matched hash 5ba6df7acef516f7dab78587cf30ce20
1857 Timeout / Aborted Shard failed without specific error logs
1813 Skia Gold Mismatch All 5 tests matched hash 5ba6df7acef516f7dab78587cf30ce20
1810 Timeout / Aborted Shard failed without specific error logs
1691 Skia Gold Mismatch All 5 tests matched hash 5ba6df7acef516f7dab78587cf30ce20
1658 Skia Gold Mismatch All 5 tests matched hash 5ba6df7acef516f7dab78587cf30ce20

Detailed Findings

1. Skia Gold Image Mismatch (Primary Blocker)

In builds 2495, 2313, 1965, 1813, 1691, and 1658, the following 5 tests failed because the screenshot captured during the test did not match any approved golden image:

  • android_engine_test.vulkan.external_texture_surface_texture_smiley_face
  • android_engine_test.vulkan.external_texture_surface_producer_smiley_face
  • android_engine_test.vulkan.platform_view_tap_color_change_initial
  • android_engine_test.vulkan.fluttered_rendered_blue_rectangle
  • android_engine_test.vulkan.texture_layer_hybrid_composition_platform_view.blue_orange_gradient_portrait

Important

Identical Hash Anomaly:
For all 5 tests, the screenshot captured had the exact same hash: 5ba6df7acef516f7dab78587cf30ce20.
Since these tests render completely different UI components (e.g. a blue rectangle vs. a blue/orange gradient vs. a smiley face texture), it is mathematically impossible for them to produce the same valid image digest. This indicates that the screenshot capture mechanism (or the emulator's Vulkan rendering context) returned a blank, black, or default-cleared buffer.

2. Infrastructure / Emulator Issues (Transient Flakes)

In builds 2337, 2317, 2283, 2280, 2268, and 2198, the tests failed due to VM/emulator communication errors:

  • ADB Failures: Logs show Failed to uninstall app followed by Process exited abnormally with exit code 1.
  • Driver Failures: In build 2268, the runner output Local 'nativeDriver' has not been initialized and Failed to fulfill NativeCommand due to remote error.
  • Wait Failures: In build 2198, the runner output Failed to fulfill WaitFor due to remote error.

These are standard emulator health and connectivity flakes, where the test runner loses connection to the emulator device during apk installation/uninstallation or command dispatch.


Recommendations & Next Steps

  1. Verify Vulkan Screenshot/Buffer Capture:
    Investigate if the screenshotting code in the Flutter Driver / engine Vulkan integration tests is correctly capturing the Vulkan swapchain. The identical hash suggests a blank/empty frame buffer is being captured.
  2. Review/Triage on Flutter Gold:
    Check the Flutter Gold console for digest 5ba6df7acef516f7dab78587cf30ce20 to visually confirm if the images are blank/black.
  3. Emulator Stability Improvements:
    To address the secondary infrastructure failures, consider adding retry logic for emulator ADB connection, or updating the Android emulator image version used on the LUCI bots.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 3, 2026
@gmackall gmackall marked this pull request as ready for review June 3, 2026 19:43
@gmackall gmackall requested a review from reidbaker as a code owner June 3, 2026 19:43
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new skill markdown file (SKILL.md) for analyzing GitHub flake issues in the flutter/flutter repository, outlining instructions, rules, and steps to collect failing builds and fetch logs. Feedback on the changes includes correcting minor grammatical and typographical errors, as well as parameterizing hardcoded values in the curl payload to allow dynamic replacement of the bucket and builder names.

Comment thread .agents/skills/analyze-github-flake/SKILL.md Outdated
Comment thread .agents/skills/analyze-github-flake/SKILL.md Outdated
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36' \
-H 'x-return-encrypted-headers: all' \
--data-raw '{"builder":{"project":"flutter","bucket":"try","builder":"Linux repo_checks"},"buildNumber":<buildNumber>,"mask":{"fields":"id,builder,builderInfo,number,canceledBy,createdBy,createTime,startTime,endTime,cancelTime,status,statusDetails,summaryMarkdown,output,steps,tags,schedulingTimeout,executionTimeout,gracePeriod,ancestorIds,retriable"}}'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The curl command payload has hardcoded values for "bucket" ("try") and "builder" ("Linux repo_checks"). Since the flaking builds can come from different builders (e.g., Windows plugin_test in prod), these should be parameterized as <bucket> and <check_name> so the agent knows to replace them dynamically based on the URL being analyzed.

Suggested change
--data-raw '{"builder":{"project":"flutter","bucket":"try","builder":"Linux repo_checks"},"buildNumber":<buildNumber>,"mask":{"fields":"id,builder,builderInfo,number,canceledBy,createdBy,createTime,startTime,endTime,cancelTime,status,statusDetails,summaryMarkdown,output,steps,tags,schedulingTimeout,executionTimeout,gracePeriod,ancestorIds,retriable"}}'
--data-raw '{"builder":{"project":"flutter","bucket":"<bucket>","builder":"<check_name>"},"buildNumber":<buildNumber>,"mask":{"fields":"id,builder,builderInfo,number,canceledBy,createdBy,createTime,startTime,endTime,cancelTime,status,statusDetails,summaryMarkdown,output,steps,tags,schedulingTimeout,executionTimeout,gracePeriod,ancestorIds,retriable"}}'

gmackall and others added 2 commits June 3, 2026 12:45
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 3, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 3, 2026
Copy link
Copy Markdown
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

You also need to add yourself to CODEOWNERs for this skill.

# Flake analysis instructions

*Context*
flutter/flutter repo has the following folder structure.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would eventually want this out of the skill but for a first pass I think it can stay in.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm fine removing now if you're not opposed. I think it made sense in your packages skill but makes less sense for a skill living inside flutter proper

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

removed


For example to find information about the issue https://github.com/flutter/flutter/issues/174116 you can call `gh issue view 174116 --repo flutter/flutter --json=author,body,id,labels,number,state,title,url`

The title will contain the name of the flaking check, and the body will contain urls which link to instances where the check failed or flaked, each on a new line, directly after "Flaky builds:". You should also inspect the comments and find each comment made by "login": "fluttergithubbot", and extract the urls from there as well (the format will be the same, with an example flake at the top, and the full list immediately after the "Flaky builds:" header).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not all github issues are flake issues. If this skill is called on an issue that is not a flake it should short circuit out. Can you add a section for how to determine if an issue is a flake issue and if the issue does not meet the criteria then stop working and tell the user.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added short circuit case

<!-- TODO include a .gitignored directory where agent can dump local files in flutter/packages -->

```
curl 'https://cr-buildbucket.appspot.com/prpc/buildbucket.v2.Builds/GetBuild' \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this came from a skill I posted. Eventually we will want to make this have less specific information.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changed to be slightly more general (for bucket (prod/try) and check name)

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 3, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 3, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 3, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 3, 2026
@gmackall gmackall requested a review from reidbaker June 3, 2026 20:05
@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 3, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jun 3, 2026
Merged via the queue into flutter:master with commit afa7552 Jun 3, 2026
62 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 3, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 5, 2026
Roll Flutter from 2ba5420a7049 to 1bdf4af29076 (43 revisions)

flutter/flutter@2ba5420...1bdf4af

2026-06-05 engine-flutter-autoroll@skia.org Roll Packages from 03352b5 to 61bdbb4 (5 revisions) (flutter/flutter#187612)
2026-06-05 engine-flutter-autoroll@skia.org Roll Skia from 6e003d7f69c8 to a47a9a2c8ae5 (1 revision) (flutter/flutter#187610)
2026-06-05 engine-flutter-autoroll@skia.org Roll Dart SDK from aad8be4ce307 to 6a9a0efe66eb (10 revisions) (flutter/flutter#187609)
2026-06-05 engine-flutter-autoroll@skia.org Roll Skia from 494f1bf55f51 to 6e003d7f69c8 (2 revisions) (flutter/flutter#187607)
2026-06-05 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ZE1Jy9CtVVi-tjBAE... to N_LiSaBSUsE2LDZgG... (flutter/flutter#187597)
2026-06-05 engine-flutter-autoroll@skia.org Roll Skia from 59556fdb8c33 to 494f1bf55f51 (2 revisions) (flutter/flutter#187596)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from 8eb107046fd5 to 59556fdb8c33 (1 revision) (flutter/flutter#187590)
2026-06-04 34871572+gmackall@users.noreply.github.com Remove `embedded_android_views_integration_test.dart` (flutter/flutter#187465)
2026-06-04 burak.karahan@mail.ru Remove Material imports from rendering editable tests (flutter/flutter#186951)
2026-06-04 jason-simmons@users.noreply.github.com [Impeller] Wait for the Vulkan device to become idle before destroying Vulkan objects in the AHBSwapchainImplVK destructor (flutter/flutter#187477)
2026-06-04 chris@bracken.jp [iOS] Eliminate unnecessary redeclaration of FlutterDisplayLink (flutter/flutter#187557)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from 928ded2a31af to 8eb107046fd5 (1 revision) (flutter/flutter#187583)
2026-06-04 34871572+gmackall@users.noreply.github.com Log stdout in adb.dart (flutter/flutter#187531)
2026-06-04 mvincentong@gmail.com Clarify RouterDelegate popRoute bubbling (flutter/flutter#186875)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from 928ded2a31af to 8eb107046fd5 (1 revision) (flutter/flutter#187584)
2026-06-04 1063596+reidbaker@users.noreply.github.com Add updating-android-sdk agent skill for rolling Android SDK in CIPD (flutter/flutter#187576)
2026-06-04 Rusino@users.noreply.github.com Fixing alignment issue (flutter/flutter#187518)
2026-06-04 brackenavaron@gmail.com [Material Cross Imports] Clean up Material Divider usages (flutter/flutter#187300)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from cecc0e0da9ae to 928ded2a31af (6 revisions) (flutter/flutter#187574)
2026-06-04 31859944+LongCatIsLooong@users.noreply.github.com Use swift demangle to verify internal Swift symbols (flutter/flutter#186835)
2026-06-04 1063596+reidbaker@users.noreply.github.com Add android 37 platform and build tools to script for android cipd bundle creation (flutter/flutter#187571)
2026-06-04 jason-simmons@users.noreply.github.com [Impeller] Increase the precision of the IPSampleWithTileModeOES coords parameter to match the input coordinates in the tiled_texture_fill_external shader (flutter/flutter#187545)
2026-06-04 engine-flutter-autoroll@skia.org Roll Packages from b11504f to 03352b5 (4 revisions) (flutter/flutter#187569)
2026-06-04 iinozemtsev@google.com Roll Dart SDK to Dart 3.13 beta2 (flutter/flutter#187555)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from 611e3f8ceb93 to cecc0e0da9ae (1 revision) (flutter/flutter#187562)
2026-06-04 6655696+guidezpl@users.noreply.github.com Add step to bootstrap Flutter tool in coverage workflow (flutter/flutter#187199)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from 4fdb859c8da7 to 611e3f8ceb93 (4 revisions) (flutter/flutter#187554)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from 0020aae33f63 to 4fdb859c8da7 (2 revisions) (flutter/flutter#187552)
2026-06-04 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ap7MhLX4TdpWRrLS_... to ZE1Jy9CtVVi-tjBAE... (flutter/flutter#187550)
2026-06-04 stuartmorgan@google.com Add vector_math to package issue template (flutter/flutter#187536)
2026-06-04 jason-simmons@users.noreply.github.com Manual roll Dart SDK from d39850bf4a01 to 3b70b98fa7c0 (flutter/flutter#187519)
2026-06-04 engine-flutter-autoroll@skia.org Roll Skia from d625048c853a to 0020aae33f63 (20 revisions) (flutter/flutter#187539)
2026-06-04 smille2003@yandex.ru [Impeller][Windows] fix black screen on OpenGL fallback (flutter/flutter#187288)
2026-06-04 97480502+b-luk@users.noreply.github.com Fix unintentionally joined path contours (flutter/flutter#187522)
2026-06-03 matt.boetger@gmail.com fix: resolve issue #177379 by using lazy buildDirectory.dir() API in build.gradle template (flutter/flutter#187127)
2026-06-03 34871572+gmackall@users.noreply.github.com Add a skill for flake analysis (flutter/flutter#187530)
2026-06-03 30870216+gaaclarke@users.noreply.github.com adds linux impeller project flag (flutter/flutter#186982)
2026-06-03 codedoctor@linwood.dev Add support for stylus buttons (flutter/flutter#183369)
2026-06-03 46920873+gabrimatic@users.noreply.github.com Prevent Cubic transform from looping on out-of-range input (flutter/flutter#185875)
2026-06-03 bdero@google.com [Impeller] Reland: Allow attaching specific texture mip levels and slices (flutter/flutter#187470)
2026-06-03 kjlubick@users.noreply.github.com [skia] Update image deserial proc (flutter/flutter#185041)
2026-06-03 112751483+shivanshu877@users.noreply.github.com docs: update Impeller advanced blend docs for framebuffer fetch (flutter/flutter#185457)
2026-06-03 ahmedsameha1@gmail.com Handle#6537 fifth grouped tests (flutter/flutter#183720)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants