Skip to content

Marking digests as "negative" in Skia Gold has no impact on pre-submit, causing post-submit breakages #145043

@matanlurey

Description

@matanlurey

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:

  1. User Octocat pushes a PR that, as a result, produces an update to draw_square_test.
  2. The test suite/builder, a hypothetical linux: framework_draw_shapes, runs, and reports all tests passing.
  3. The Flutter Gold check holds a pending state, and will report back pending untriage digests, similar to below:

Example

  1. The square test now draws a circle. Oops! It is marked "negative".
  2. Now, all tests are passing (as they were in step 2), and Flutter Gold is also marked as passing.
  3. Either manually, or via auto-submit, the PR lands.
  4. ... 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

  1. What that means is out of scope of this issue, but it's not necessarily a 1:1 pixel match, nor a specific match.

  2. I believe the heuristic also includes "and was seen in the last 100 landed commits".

  3. I'm not sure about the retention of negative digests, I'd assume they are 'forever' 🤞🏼.

  4. The context of this decision is in https://github.com/flutter/flutter/issues/48744.

  5. I believe it is a cron-job that runs every 5 minutes and checks if all other status checks are passing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.dependency: skiaSkia team may need to help usteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions