Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[web] Start support for Skia Gold #29139

Merged
merged 20 commits into from
Nov 16, 2021
Merged

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Oct 12, 2021

This PR provides initial support for Skia Gold. It uploads all screenshots to the Skia Gold dashboard.

At this point, we still use the goldens repo for the actual comparison.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Oct 12, 2021
@google-cla google-cla bot added the cla: yes label Oct 12, 2021
@mdebbar mdebbar force-pushed the skia_gold branch 4 times, most recently from 0d90c7b to 6cf5b52 Compare October 19, 2021 16:26
@mdebbar
Copy link
Contributor Author

mdebbar commented Oct 19, 2021

@CaseyHillers I'm still not getting the GOLDCTL env variable. See this log file towards the end it shows:

_setupSkiaGoldClient:::GOLDCTL null

Other environment variables are working fine (e.g. SWARMING_TASK_ID, LUCI_CONTEXT, ENGINE_PATH, etc).

@CaseyHillers
Copy link
Contributor

@mdebbar the issue is the goldctl is being run on a drone. I'm not sure if we'd support this. Are the gold tests something we could run on the original bot? An alternative is the web engine recipe can be updated to pass its properties to the drone builds

@skia-gold
Copy link

Gold has detected about 292 new digest(s) on patchset 6.
View them at https://flutter-engine-gold.skia.org/cl/github/29139

@skia-gold
Copy link

Gold has detected about 86 new digest(s) on patchset 13.
View them at https://flutter-engine-gold.skia.org/cl/github/29139

@skia-gold
Copy link

Gold has detected about 507 new digest(s) on patchset 14.
View them at https://flutter-engine-gold.skia.org/cl/github/29139

@mdebbar mdebbar changed the title Skia gold [web] Start support for Skia Gold Nov 9, 2021
@mdebbar mdebbar marked this pull request as ready for review November 9, 2021 18:45
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@skia-gold
Copy link

Gold has detected about 217 new digest(s) on patchset 15.
View them at https://flutter-engine-gold.skia.org/cl/github/29139

@mdebbar mdebbar requested a review from Piinks November 10, 2021 17:52
@Piinks
Copy link
Contributor

Piinks commented Nov 11, 2021

I am just back in office today, this look exciting! Will be able to do a full review tomorrow. 🎉
@mdebbar do you have a design doc or plans for migrating off of flutter/goldens for the comparison as you mentioned above?

} on io.OSError catch (_) {
print('OSError occurred, could not reach Gold.');
} on io.SocketException catch (_) {
print('SocketException occurred, could not reach Gold.');
Copy link
Contributor

Choose a reason for hiding this comment

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

These should do io.stderr.writeln, but as mentioned above, I think I'd prefer a hard failure in this case. Instead, if whether goldens are compared should be controlled by a command-line flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this line of code is the right place to do it, but I agree that we should fail if Skia Gold isn't available and we expect golden tests to run.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now, I don't want to introduce any failures caused by Skia Gold. In a future step, I'm going to start relying on Skia Gold to block PRs (until images are triaged). That's when I'm going to add the check to make sure Skia Gold is actually running when we expect it to.

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM. Let's file an issue and leave a TODO pointing to it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Was there an issue filed & TODO added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the issue to list all steps required to finish this work.

@skia-gold
Copy link

Gold has detected about 38 new digest(s) on patchset 17.
View them at https://flutter-engine-gold.skia.org/cl/github/29139

// Skia Gold. The next step would be to actually use Skia Gold for
// comparison.

// TODO(mdebbar): Use Skia Gold for comparison, not only for uploading.
Copy link
Contributor

@Piinks Piinks Nov 11, 2021

Choose a reason for hiding this comment

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

Might be good to add to this comment that when this is being used for comparison, it should account for any auto rollers, they will break if it fails in presubmit. We should be able to really easily add support of the flutter-gold check to manage checking in images when it's ready, just a small adjustment in cocoon. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1. Autorollers:

We plan to rely on the gold check for failures in pre-submit (we won't fail any tests even if the golden match fails). This comment/TODO was meant for local testing. Sorry that wasn't clear.

2. gold-check & cocoon:

Out of the box, we got those comments by the gold bot that provide triage links. I looked at the cocoon repo and found a couple places that need to be adjusted to work for the engine. Is there anything else we need to do (besides the cocoon change) to get the extra gold check to appear on engine PRs?

@skia-gold
Copy link

Gold has detected about 108 new digest(s) on patchset 20.
View them at https://flutter-engine-gold.skia.org/cl/github/29139

@mdebbar mdebbar requested review from yjbanov and Piinks November 12, 2021 21:32
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@CaseyHillers CaseyHillers changed the base branch from master to main November 15, 2021 18:14
@Piinks
Copy link
Contributor

Piinks commented Nov 15, 2021

@CaseyHillers I see you switched this PR to the main branch, but it looks like the bot switched it back to master, can you confirm this is ok to land and on which branch? Thanks very much! :)

@mdebbar mdebbar changed the base branch from master to main November 15, 2021 20:09
@mdebbar
Copy link
Contributor Author

mdebbar commented Nov 15, 2021

@Piinks Thanks for noticing that! The merge button was actually disabled because the "master" branch is now protected (?). So I had to switch the base back to main in order to re-enable the merge button.

@mdebbar mdebbar added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Nov 15, 2021
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.

This LGTM! Verified the engine instance of Gold received and has been approved with 540 images! Awesome! Can you cc me on the follow-up issue? Thanks!

} on io.OSError catch (_) {
print('OSError occurred, could not reach Gold.');
} on io.SocketException catch (_) {
print('SocketException occurred, could not reach Gold.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Was there an issue filed & TODO added?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes needs tests platform-web Code specifically for the web engine waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants