Commit Graph

80 Commits

Author SHA1 Message Date
Ian Hickson
62f1594908
Make tests more resilient to Skia gold failures and refactor flutter_goldens for extensive technical debt removal (#140101)
Originally landed in https://github.com/flutter/flutter/pull/139549
Originally reverted in https://github.com/flutter/flutter/pull/140085

- Remove all use of global variables.
- Always pass in all dependencies, only create them in main or in tests.
- Pass in the "print" primitive.
- Make all network traffic retry (except when run locally, when it just auto-passes).
- Enable tests to be run in random order.
- Better error messages
2023-12-21 21:35:07 +00:00
auto-submit[bot]
91877c6345
Reverts "Make tests more resilient to Skia gold failures and refactor flutter_goldens for extensive technical debt removal" (#140085)
Reverts flutter/flutter#139549
Initiated by: Piinks
This change reverts the following previous change:
Original Description:
* Remove all use of global variables.
* Always pass in all dependencies, only create them in main or in tests.
* Pass in the "print" primitive.
* Make all network traffic retry (except when run locally, when it just auto-passes).
* Enable tests to be run in random order.
2023-12-13 20:20:20 +00:00
Ian Hickson
11a9cb7029
Make tests more resilient to Skia gold failures and refactor flutter_goldens for extensive technical debt removal (#139549)
* Remove all use of global variables.
* Always pass in all dependencies, only create them in main or in tests.
* Pass in the "print" primitive.
* Make all network traffic retry (except when run locally, when it just auto-passes).
* Enable tests to be run in random order.
2023-12-13 04:09:13 +00:00
Kate Lovett
91ea024cbc
Don't send images to Gold on release branches (#139706)
Part of fixing https://github.com/flutter/flutter/issues/139673, it will need to be cherry picked into the stable branch to fully resolve.

Originally I tried to come at this from `ci.yaml`, but the syntax does not exist to either conditionally include a dependency based on the branch we are on, or to disable a shard for a given branch (as opposed to enabling it which is supported). I could double every CI shard that uses Gold to try to serve my purpose, but it is already a very large and cumbersome file to keep up to date. Doubling it does not feel like the best solution. Using a RegEx is not my favorite, but I am using the same one we use in our CI, and left a note there to update it if it should ever change. Since there is already a whole infra built around it, I feel it is pretty safe so we can fix the stable tree.

We already had mitigated Gold affecting release branches in the past through flutter/cocoon (https://github.com/flutter/flutter/issues/58814), but https://github.com/flutter/flutter/issues/139673 exposed a rather rare edge case. A change was CP'd into the stable branch that introduced golden file image changes. Typically this would not cause an issue since any change that has landed on the master branch has golden files accounted for. In this case, the CP'd change on master has generated a different image on canvaskit due to another change that was not on stable. So when the CP landed, it generated a new image Gold had never seen before. Gold only tracks the master branch, so we cannot approve the image, and so cannot fix the stable tree.

This would disable the failing check on release branches and fix the tree.
2023-12-07 19:34:05 +00:00
Kostia Sokolovskyi
22f593e578
GoldenFileComparators should dispose created Image objects. (#136716) 2023-10-17 15:25:52 -07:00
Greg Spencer
8cda3bea23
Remove 'must not be null' comments from various libraries. (#134984)
## Description

This removes all of the comments that are of the form "so-and-so (must not be null|can ?not be null|must be non-null)" from the cases where those values are defines as non-nullable values.

This PR removes them from the animation, cupertino, foundation, gestures, semantics, and services libraries.  Each of them only had a few, so I lumped them together.

This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.

In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.

This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).

## Related PRs
- https://github.com/flutter/flutter/pull/134991
- https://github.com/flutter/flutter/pull/134992
- https://github.com/flutter/flutter/pull/134993
- https://github.com/flutter/flutter/pull/134994

## Tests
 - Documentation only change.
2023-09-20 15:44:49 +00:00
Tomasz Gucio
99c7e9f088
Add spaces after flow control statements (#126320) 2023-05-15 11:07:30 +02:00
Zachary Anderson
a84e369bd2
Revert "Allow Flutter golden file tests to be flaky (#114450)" (#114902)
This reverts commit 53e6876226.
2022-11-08 09:26:55 -08:00
Kate Lovett
53e6876226
Allow Flutter golden file tests to be flaky (#114450)
* allow marking a golden check as flaky

* add matchesFlutterGolden to analyze.dart; no tags for flutter_goldens/lib

* Pause

* ++

* ++

* Analyzer therapy

* Once more with feeling

* Nits

* Review feedback

* Silly oops

* Test progress

* More tests

* Finish

* Nits

* Analyzer

* Review feedback

Co-authored-by: Yegor Jbanov <yjbanov@google.com>
2022-11-08 01:14:03 +00:00
Alexandre Ardhuin
56c4e3cdd8
add some exports of public API in foundation/serialization.dart (#104231) 2022-06-08 13:33:12 -07:00
Pierre-Louis
74cfc3db67
Use curly_braces_in_flow_control_structures for non-flutter packages (#104629)
* Use `curly_braces_in_flow_control_structures` for `packages/flutter_driver`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_goldens_client`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_localizations`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_test`

* Use `curly_braces_in_flow_control_structures` for `packages/flutter_web_plugins`

* fix comments

* Use `curly_braces_in_flow_control_structures` for `packages/integration_test`

* fix indentation
2022-05-25 20:01:11 +02:00
Michael Goderbauer
3e406c6781
Prepare packages (minus tools,framework) for use_super_parameters (#100510) 2022-03-30 15:31:59 -07:00
Michael Goderbauer
00f3f2b14f
More beautiful linear_gradient sample (#99298) 2022-03-02 16:41:21 -08:00
Kate Lovett
a288bd5e3f
Re-land Assert golden files use the right extension (#99082) 2022-02-24 21:06:19 -08:00
Harry Terkelsen
735f9abfe1
Revert "Assert golden files use the right extension (#99016)" (#99075)
This reverts commit ee86e61f73.
2022-02-24 10:44:12 -08:00
Kate Lovett
ee86e61f73
Assert golden files use the right extension (#99016) 2022-02-23 19:59:21 -08:00
Kate Lovett
895beb04bb
Initialize the Skia client more efficiently (#95055) 2021-12-10 18:54:10 -08:00
Ian Hickson
f25b833f27
Enable avoid_print lint. (#91444) 2021-10-07 16:48:04 -07:00
Mouad Debbar
c2ea78d231
Revert "Enable avoid_print lint. (#91332)" (#91438)
This reverts commit cb378edc9e.
2021-10-07 16:16:17 -04:00
Ian Hickson
cb378edc9e
Enable avoid_print lint. (#91332) 2021-10-07 09:53:03 -07:00
Alexandre Ardhuin
34059eec2c
enable lint prefer_interpolation_to_compose_strings (#83407) 2021-06-01 11:14:06 -07:00
Kate Lovett
4b65c0582a
Reduce potential collisions from Gold RNG (#81792) 2021-05-07 14:19:03 -07:00
Phil Quitslund
9c0270d960
sort directives (#80901) 2021-04-22 10:14:02 -07:00
Michael Goderbauer
7b251f5f37
Enable use_function_type_syntax_for_parameters lint (#77163) 2021-03-04 08:59:17 -08:00
Sam Rawlins
c6a74e0a5e
Remove "unnecessary" imports. (#76159) 2021-02-19 17:36:02 -08:00
Kate Lovett
085f1daa43
Clean up after large refactor (#67939) 2020-10-13 13:42:02 -07:00
Kate Lovett
72696f77dd
Remove Cirrus support for Gold (#67468) 2020-10-08 14:19:42 -05:00
Jonah Williams
ef6c720d40
[flutter_test] handle breaking change to test main (#67425)
* [flutter_test] handle breaking change to test main . Fixes #67382
2020-10-06 16:52:23 -07:00
Kate Lovett
d1178ae73b
Fix local gold output for flutter/flutter (#66139) 2020-10-01 11:17:03 -07:00
Kate Lovett
51fa704642
Add handling for empty expectation (#66142) 2020-09-19 11:27:04 -07:00
Kate Lovett
ee69eebfbd
Update Gold for new endpoint (#64982) 2020-09-02 16:35:06 -07:00
Jonah Williams
41e553bbfc
[flutter_tools] migrate flutter_goldens, flutter_goldens client to null-safety (#64201) 2020-08-24 15:31:05 -07:00
Jacob MacDonald
efdce3cf72
drop image package dependency for goldens (#54144) 2020-04-09 11:21:23 -07:00
Kate Lovett
ea67a65bde
Re-land Luci Support for Gold (#52760) 2020-03-18 12:56:02 -07:00
Kate Lovett
48fc135003
Revert "Refactoring Gold to enable both Luci & Cirrus support (#49815)" (#52670)
This reverts commit 7edcc92b10.
2020-03-16 10:26:09 -07:00
Kate Lovett
7edcc92b10
Refactoring Gold to enable both Luci & Cirrus support (#49815) 2020-03-13 20:11:01 -07:00
Kate Lovett
aa622fbb26
Switching to Gold Status Check (#51968) 2020-03-13 11:41:01 -07:00
Kate Lovett
1c15cd863b
Fix Gold flake from gsutil fallback (#50149) 2020-02-05 11:03:02 -08:00
Kate Lovett
6397c022bb Adding error handling for SocketExceptions to local comparator (#48517) 2020-01-10 14:43:01 -08:00
Kate Lovett
84aa29ce63 Gold Pre-submit flow for contributors without permissions (#47551) 2020-01-09 08:08:03 -08:00
Alexandre Ardhuin
4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Kate Lovett
ceab1248d0
Use FlutterLocalFileComparator when user permission denied on Cirrus (#46688) 2019-12-11 11:03:21 -08:00
Kate Lovett
9011cece25
Pre-Submit Tryjobs for Flutter Gold (#44474) 2019-12-04 15:43:36 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Kate Lovett
1374a41313
Provide debug output for Gold uploads on post-submit (#45704) 2019-11-27 11:29:53 -08:00
Greg Spencer
a60bf8e23a
Spell check of Flutter docs (#45200)
No code changes, just comments: I spell-checked all the comments in the repo.
2019-11-22 08:43:55 -08:00
Alexandre Ardhuin
1f3ff5ca42
implicit-casts:false in flutter_goldens and flutter_goldens_client (#45249)
* implicit-casts:false in flutter_goldens and flutter_goldens_client

* fix type
2019-11-21 17:46:37 +01:00
Kate Lovett
b1ca7f419e
Update Gold to fallback on skipping comparator when offline (#44619) 2019-11-15 13:04:59 -08:00
Kate Lovett
dfbbfcd390
Fixing local golden output flake (#44307) 2019-11-07 13:01:32 -08:00
Kate Lovett
26d09f1ab4
Gold Performance improvements (#43748) 2019-10-31 11:44:07 -07:00