-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
When a test reports a digest (read: an image with some metadata) to Skia Gold, there is a tri-modal state of how it is considered:
| State | What it means |
|---|---|
| ✅ Positive | An existing digest was found that matches1 the image that was marked positive previously2. |
| ❔Untriaged | No existing digest was found that matches the image. |
| 🚫 Negative | An existing digest was found that matches the image that was marked negative previously3. |
The way our (read: flutter/flutter and flutter/engine) trees work, is that when a test uses Skia Gold, and uploads a digest, the test passes regardless of what match state occurred4, and later5, asynchronously, our Flutter Gold custom check runs and verifies that no untriaged digests exist at the current commit.
That is, the following workflow causes a post-submit build breakage:
- User
Octocatpushes a PR that, as a result, produces an update todraw_square_test. - The test suite/builder, a hypothetical
linux: framework_draw_shapes, runs, and reports all tests passing. - The
Flutter Goldcheck holds a pending state, and will report back pending untriage digests, similar to below:
- The square test now draws a circle. Oops! It is marked "negative".
- Now, all tests are passing (as they were in step 2), and Flutter Gold is also marked as passing.
- Either manually, or via
auto-submit, the PR lands. - ... eventually, it's run on post-submit, which cause a tree breakage, because a test matches a negative digest.
Possible improvements (to discuss):
- Update our documentation on Skia Gold
- Update the GitHub bot to print a scary message that "negative doesn't work like you think it does"
- Update the Flutter Gold check to consider matching negative digests as a failure (note that from talking to @kjlubick, this currently is not something available in the Skia Gold API - we'd either need to request the API, help implement it, or find another way to get this functionality)
- Update the Skia Gold Client logic to fail pre-submit on matching negatives (we could keep the current untriaged behavior)
/cc @Piinks @jonahwilliams @gaaclarke @goderbauer
Footnotes
-
What that means is out of scope of this issue, but it's not necessarily a 1:1 pixel match, nor a specific match. ↩
-
I believe the heuristic also includes "and was seen in the last 100 landed commits". ↩
-
I'm not sure about the retention of negative digests, I'd assume they are 'forever' 🤞🏼. ↩
-
The context of this decision is in https://github.com/flutter/flutter/issues/48744. ↩
-
I believe it is a cron-job that runs every 5 minutes and checks if all other status checks are passing. ↩
