Skip to content

Conversation

@matanlurey
Copy link
Contributor

Closes flutter/flutter#143352.

In practice this reverts the functionality in flutter/flutter#123979 (#2585). Sorry for the back-and-forth, we tried this model but ended up with (currently) ~170 untriaged failures, so we want to go back to treating these as failures and improve our tools/process if needed instead.

/cc @jonahwilliams and @Piinks

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Definitely check with @mdebbar, I am less familiar here.

I think if the expectation that the engine sheriff will triage images is not working, then this is a good option. It is how we treat the same situation in the framework.

Alternatively, I think Gold has an endpoint to see "are there unapproved images at head?" If we wanted to try making ownership by the sheriff work, we could have a separate check or alert that notifies them. IIRC that endpoint had rate limitations though. @kjlubick may be able to expand more on this. :)

@kjlubick
Copy link

https://flutter-engine-gold.skia.org/search is the best way to see all unapproved images at head. It should be reasonably performant (as well as the underlying RPC call, but please try to avoid calling those directly, since we may break you).

I think the rate limitation thing @Piinks was thinking of was related to the changes for a particular PR - we use some extra caching for HEAD that isn't there for PRs.

@mdebbar
Copy link
Contributor

mdebbar commented Feb 13, 2024

I'm not familiar with the recent developments in the engine golden story. But one thing that came to mind a couple days ago as I was looking into some golden problems was this:

// Framework shards run framework goldens
// Web shards run web version of framework goldens
// Misc shard runs API docs goldens
if (name.contains('framework') || name.contains('web engine') || name.contains('misc')) {
runsGoldenFileTests = true;
}

I think that if condition is stale and we might be skipping the golden checks on some PRs that DO introduce golden changes. Thoughts on removing the condition and doing golden checks on ALL PRs? (cc @Piinks and @kjlubick in case this breaks some Gold API quota?)

@kjlubick
Copy link

I would like a quick write up on which RPCs would be affected on the Gold side before making a call about quotas.

@Piinks
Copy link
Contributor

Piinks commented Feb 13, 2024

I would like a quick write up on which RPCs would be affected on the Gold side before making a call about quotas.

@kjlubick This doc lists all the RPCs we use, where and how. It is linked here in the wiki: https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter and cane be used to write this up if we want to make changes.

I think that if condition is stale and we might be skipping the golden checks on some PRs that DO introduce golden changes. Thoughts on removing the condition and doing golden checks on ALL PRs? (cc @Piinks and @kjlubick in case this breaks some Gold API quota?)

@mdebbar That's super intentional (#672 for context).

  1. Contributors complained that they did not want to be bothered with a flutter-gold check on their PR if the change had nothing to do with goldens. And I mean, they felt really really strongly about this.
  2. By not running the flutter-gold check on PRs that do not execute golden file tests, we were able to reduce the amount of calls to Gold significantly. Changing that back would greatly increase traffic.

If the engine has deviated from the expected pattern for naming test shards that execute golden file tests, then that's something we can easily fix.

@matanlurey
Copy link
Contributor Author

Just so I understand correctly @Piinks, the configuration pointed out by @mdebbar is flutter/flutter specific, right?

@matanlurey
Copy link
Contributor Author

Also while I appreciate the chat here, I'd love to still get this PR approved/landed unless I'm missing something?

}

// Treat any GitHub check run as stale if created over [Config.kGitHubCheckStaleThreshold] hours ago.
bool isStale(DateTime dateTime) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure about the removal of this here. @keyonghan what do you think?

Copy link
Contributor

@ricardoamador ricardoamador Feb 13, 2024

Choose a reason for hiding this comment

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

If I recall correctly we are trying to flag PRs that have checkruns over 2 hours old so I believe this code needs to stay if you are only removing stuff related to flutter-gold.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was my bad, I had branched from a stale PR. Reverted.

final String? name = status.context;

// If the account author is a roller account do not block merge on flutter-gold check.
if (isToEngineRoller(author, slug) && name == 'flutter-gold') {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is the only code that needs to be removed here to avoid skipping and enforcing the failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah thinks Ricardo, this is my bad - it looks like I had an older branch. Let me redo this fix and tag you.

@ricardoamador
Copy link
Contributor

Overall I think this is good but I would like to get @keyonghan to look over the stale checkRun flagging as I am not sure if he is tracking metrics there or we have alerting around that.

@matanlurey
Copy link
Contributor Author

Overall I think this is good but I would like to get @keyonghan to look over the stale checkRun flagging as I am not sure if he is tracking metrics there or we have alerting around that.

Thanks @ricardoamador. I actually made a mistake and branched from an older main locally.

The change to ci_successful.dart should be ~1-line-ish, re-upped.

@Piinks
Copy link
Contributor

Piinks commented Feb 13, 2024

Just so I understand correctly @Piinks, the configuration pointed out by @mdebbar is flutter/flutter specific, right?

No. That whole file is the flutter-gold implementation intended to cover flutter/flutter and flutter/engine.

Copy link
Contributor

@ricardoamador ricardoamador left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @matanlurey !

@matanlurey matanlurey requested a review from mdebbar February 13, 2024 19:18
@yjbanov
Copy link
Contributor

yjbanov commented Feb 13, 2024

A note about the 170 untriaged web goldens. They all come from Safari + HTML renderer. All of them exhibit bimodality. There are exactly 2 golden variants per test. One hypothesis from @eyebrowsoffire is that our macOS fleet is made of Arm and x64 machines, and our tests get one of them randomly. If Safari is sensitive to Arm vs x64, that would lead to this behavior. Essentially, you send a PR, triage goldens, then submit. However, what you just did is triage a random combination of Arm and x64 goldens. After the PR is submitted, the post-submit instance of LUCI will again randomize the bots that run web tests, and report different golden outcomes in post-submit.

@matanlurey
Copy link
Contributor Author

Thanks for explaining! I'm happy to hold this PR until we have consensus on how to handle those diffs.

@jonahwilliams
Copy link
Contributor

Goldens are allowed to have multiple images per configuration, so if it was truly bimodal (only), then you'd eventually triage all of them.

@matanlurey
Copy link
Contributor Author

I don't have consensus on how to land this yet, so holding off until I chat more with the teams that will be impacted (I'll loop in infra as well).

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App. label Feb 20, 2024
@auto-submit auto-submit bot merged commit eff005a into flutter:main Feb 20, 2024
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the flutter/engine block on untriaged goldens, similar to flutter/flutter

7 participants