Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Mar 4, 2020

Description

This PR will change framework tests to rely on the Gold status check introduced in
flutter/cocoon#651

This also adds an "inconsequential golden test" to more easily validate changes to Gold integration and detect if the dashboard is not working properly.

Related Issues

Fixes #48744

Tests

Inconsequential golden file test.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.

@Piinks Piinks added a: tests "flutter test", flutter_test, or one of our tests c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels. work in progress; do not review a: error message Error messages from the Flutter framework will affect goldens Changes to golden files team-infra Owned by Infrastructure team labels Mar 4, 2020
@skia-gold
Copy link

Gold has detected one or more untriaged digests on patchset 1.
Please triage them at https://flutter-gold.skia.org/search?issue=51968.

@fluttergithubbot
Copy link
Contributor

Golden image changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

Check Handling Breaking Changes. While there are exceptions to this rule, if this patch modifies an existing golden file, it is probably not an exception. Only new golden files are not considered breaking changes.

Writing a golden file test for package:flutter may also provide guidance for this change.

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

Changes reported for pull request 51968 at sha 0075363

@fluttergithubbot fluttergithubbot added the c: API break Backwards-incompatible API changes label Mar 5, 2020
@skia-gold
Copy link

Gold has detected one or more untriaged digests on patchset 2.
Please triage them at https://flutter-gold.skia.org/search?issue=51968.

@fluttergithubbot
Copy link
Contributor

Golden image changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

Check Handling Breaking Changes. While there are exceptions to this rule, if this patch modifies an existing golden file, it is probably not an exception. Only new golden files are not considered breaking changes.

Writing a golden file test for package:flutter may also provide guidance for this change.

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

Changes reported for pull request 51968 at sha a9fa8dd

@Piinks
Copy link
Contributor Author

Piinks commented Mar 6, 2020

I am going to close this for now, will return.

@Piinks Piinks closed this Mar 6, 2020
@Piinks Piinks reopened this Mar 10, 2020
@fluttergithubbot
Copy link
Contributor

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

Changes to golden files are considered breaking changes, so consult Handling Breaking Changes to proceed. While there are exceptions to this rule, if this patch modifies an existing golden file, it is probably not an exception. Only new golden file tests, or downstream changes like those from skia updates are considered non-breaking.

For more guidance, visit Writing a golden file test for package:flutter.

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

Changes reported for pull request #51968 at sha a9fa8dd

@skia-gold
Copy link

Gold has detected one or more untriaged digests on patchset 3.
Please triage them at https://flutter-gold.skia.org/search?issue=51968.

@fluttergithubbot
Copy link
Contributor

Golden file changes remain available for triage from new commit, Click here to view.

Changes reported for pull request #51968 at sha 0906b43

@skia-gold
Copy link

Gold has detected one or more untriaged digests on patchset 4.
Please triage them at https://flutter-gold.skia.org/search?issue=51968.

@fluttergithubbot
Copy link
Contributor

Golden file changes remain available for triage from new commit, Click here to view.

Changes reported for pull request #51968 at sha dc2fe1b

@Piinks
Copy link
Contributor Author

Piinks commented Mar 11, 2020

Triaged at 1:49 pm pt, flutter-gold should go green in 3..2..1..

@Piinks
Copy link
Contributor Author

Piinks commented Mar 11, 2020

Going to push a commit now that alters an existing golden file, validating a previous green state for flutter-gold will be updated to reflect the new commit.

@skia-gold
Copy link

Gold has detected one or more untriaged digests on patchset 6.
Please triage them at https://flutter-gold.skia.org/search?issue=51968.

@fluttergithubbot
Copy link
Contributor

Golden file changes remain available for triage from new commit, Click here to view.

Changes reported for pull request #51968 at sha 09c495e

@Piinks
Copy link
Contributor Author

Piinks commented Mar 11, 2020

Now I will revert the unintended change and make sure it can go green again.

@Piinks Piinks changed the title [WIP] Switching to Gold Status Check Switching to Gold Status Check Mar 12, 2020
@Piinks Piinks requested a review from goderbauer March 12, 2020 00:53
@Piinks
Copy link
Contributor Author

Piinks commented Mar 12, 2020

@cbracken @yjbanov this is the change I mentioned to alleviate the engine roll process. This fixes #48744, where it there was a lot of discussion around solving this. Feel free to tag other interested parties. :)

});
});
testWidgets('Inconsequential golden test', (WidgetTester tester) async {
// This test does not matter, it can be approved at any time if rendering
Copy link
Member

Choose a reason for hiding this comment

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

I was confused by "this test does not matter" - if it does not matter we should just delete it :)

Maybe rephrase to something like: The test validates foobar. Any changes to the golden file can be approved at any time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

}

return result.exitCode == 0;
return true;
Copy link
Member

Choose a reason for hiding this comment

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

Why does this method have a return value if it is always true? Should we change it to return Future<void>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

return skiaClient.tryjobAdd(golden.path, goldenFile);
await skiaClient.tryjobAdd(golden.path, goldenFile);

return true;
Copy link
Member

Choose a reason for hiding this comment

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

This probably deserves a comment. Why does the comparison always succeed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@lock
Copy link

lock bot commented Apr 2, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@lock lock bot locked and limited conversation to collaborators Apr 2, 2020
@Piinks Piinks deleted the testGoldCheck branch March 14, 2025 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: error message Error messages from the Flutter framework a: tests "flutter test", flutter_test, or one of our tests c: API break Backwards-incompatible API changes c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels. team-infra Owned by Infrastructure team will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Golden file changes originating from flutter/engine require a manual roll

6 participants