Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Jul 12, 2019

Description

New PR to re-land reverted changes from #33688

Current State

Ready for review, changes from #33688 have been notated.

In a previous state of this PR, Cirrus behavior was validated by mocking post-submit conditions.

Issues resolved from original PR:

Notes:

  • Results from Gold have been sporadically returning exceptions from the service. It appears these flakes have been resolved, but will require validation. As such, exceptions have been disabled for the skia gold client.

Related Issues

Addresses:

Tests

Added/Relocated/Updated:

  • flutter_test/test/matchers_test.dart
    • Comparator succeeds in incorporating version number
    • Comparator succeeds with null version number
    • Comparator failure incorporates version number
    • Comparator failure with null version number
  • flutter_test/test/goldens_test.dart
    • getTestUri updates file name with version number
    • getTestUri does nothing for null version number
  • flutter_goldens/test/flutter_goldens_test.dart
    • group: GoldensClient
    • group: SkiaGoldClient
      • auth performs minimal work if already authorized
    • group: FlutterGoldensRepositoryFileComparator
      • fromDefaultComparator calculates the base directory correctly
      • group: getTestUri
        • incorporates version number
        • ignores null version number
    • group: FlutterSkiaGoldFileComparator
      • fromDefaultComparator calculates the base directory correctly
      • group: getTestUri
        • ignores version number
  • Any and all tests that have invoked matchesGoldenFile with a skip in place for platforms other than Linux.

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 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

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

Copy link
Contributor Author

@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.

I've notated the lines that have changed (and why) from the original change that was reverted, in the hopes that it will make for easier review.
cc/ @goderbauer @dnfield @tvolkert

use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: mojave-xcode-10.1
image: mojave-xcode-10.2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes time drift on Cirrus.

test_all_script:
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
- dart --enable-asserts dev/bots/test.dart
on_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.

Added to help identify time drift if it should happen again. Time issues are referenced at the top of this shard.

test_all_script:
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
- dart --enable-asserts dev/bots/test.dart
on_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.

Added to help identify time drift if it should happen again. Time issues are referenced at the top of this shard.

@@ -0,0 +1,14 @@
$url= "https://storage.googleapis.com/chrome-infra/depot_tools.zip"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to work on Cirrus. Verified in earlier commit by using a mock-post-submit state in pre-submit to run Skia tests.

final String cirrusCI = platform.environment['CIRRUS_CI'] ?? '';
final String cirrusPR = platform.environment['CIRRUS_PR'] ?? '';
final String cirrusBranch = platform.environment['CIRRUS_BRANCH'] ?? '';
final String goldServiceAccount = platform.environment['GOLD_SERVICE_ACCOUNT'] ?? '';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the availability of the service account as a condition for using the FlutterSkiaGoldFileComparator. There are some shards that meet the first three conditions, but are not meant for executing skia gold testing.

String get _serviceAccount => platform.environment[_kServiceAccountKey];

@override
Directory get comparisonRoot => flutterRoot.childDirectory(fs.path.join('bin', 'cache', 'pkg', 'skia_goldens'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rather than putting the generated images in the same folder 'goldens', created a separate one for skia files.

_goldctl,
authArguments,
);
// TODO(Piinks): Re-enable after Gold flakes are resolved, https://github.com/flutter/flutter/pull/36103
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Flaky behavior from the skia gold service needs to be resolved before these exceptions can be enabled.

imgtestInitArguments,
);

// TODO(Piinks): Re-enable after Gold flakes are resolved, https://github.com/flutter/flutter/pull/36103
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Flaky behavior from the skia gold service needs to be resolved before these exceptions can be enabled.

@Piinks Piinks changed the title WIP Re-land "Part 1: Skia Gold Testing" Re-land "Part 1: Skia Gold Testing" Jul 25, 2019
Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

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

Thanks for pointing out the differences. LGTM!

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM.

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

@Piinks
Copy link
Contributor Author

Piinks commented Jul 28, 2019

The linux integration test states it is queued, but going into Cirrus it is all green.

@Piinks Piinks merged commit 616794f into flutter:master Jul 28, 2019
@Piinks Piinks mentioned this pull request Jul 30, 2019
8 tasks
johnsonmh pushed a commit to johnsonmh/flutter that referenced this pull request Jul 30, 2019
@Piinks Piinks deleted the relandGold branch November 22, 2019 00:52
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants