-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web test reorganization #39984
Web test reorganization #39984
Conversation
94c6ea4
to
35163cf
Compare
``` | ||
|
||
### Optimizing local builds | ||
|
||
Concurrency of various build steps can be configured via environment variables: | ||
|
||
- `FELT_DART2JS_CONCURRENCY` specifies the number of concurrent `dart2js` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure this isn't being used by recipes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are sure, because the web_engine recipes will no longer be used at all after this PR, and we'll be using new fresh and shiny engine_v2 builders
@@ -25,7 +24,6 @@ CommandRunner<bool> runner = CommandRunner<bool>( | |||
..addCommand(CleanCommand()) | |||
..addCommand(GenerateFallbackFontDataCommand()) | |||
..addCommand(LicensesCommand()) | |||
..addCommand(RunCommand()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, this was being used by recipes. Did you remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, the old web_engine recipes are defunct and will no longer be used. Basically all CI is going to be redone and modernized with this change.
Co-authored-by: Mouad Debbar <mouad.debbar@gmail.com>
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
], | ||
"realm": "production" | ||
} | ||
"builds": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content wise the config LGTM, but let's monitor capacity usage. With these many shards a single build will be using 1/4+ of the total capacity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the configs
command via the `--local-web-sdk=wasm_release` command. | ||
|
||
##### Examples | ||
Builds all web engine targets, then runs a Flutter app using it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example for how to specify targets would be helpful too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an example of that directly below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I missed it.
lib/web_ui/dev/felt_config.dart
Outdated
ArtifactDependencies.none() | ||
: canvasKit = false | ||
, canvasKitChromium = false | ||
, skwasm = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: in Dart commas go on the previous line
if (testFiles != null && !testFiles!.contains(testFile)) { | ||
return MapEntry<String, CompileResult>(relativePath, CompileResult.filtered); | ||
} | ||
final bool success = await compiler.compileTest(testFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we communicate failures to LUCI? It seems even success == false
results in a successful completion of the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The compilation actually writes out a json file that contains the result of the compilation of each test. It still will run any of the tests that actually did compile. I did this because it was really irritating debugging dart2wasm stuff and never being able to actually run any tests at all if a single one failed to compile. However, I need to double check that if some tests fail to compile but all the ones that compile succeed that it actually properly fails and LUCI can pick that up. I'm not positive if I actually did that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out we were immediately failing still, despite my best efforts otherwise 😆 . I went ahead and made a change that allows us to fail compilation and continue, and then bubble up that result at the end.
final String directory; | ||
} | ||
|
||
class TestBundle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "bundle" sounds too similar to "set", how about TestCompilation
?
} | ||
} | ||
|
||
class TestSuite { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "suite" is also too close to "set" and "bundle". How about TestRun
?
@@ -0,0 +1,268 @@ | |||
compile-configs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider documenting at the top of the file common update scenarios, such as adding a new test suite. Or do we expect this to mostly stay as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do expect this to possibly change in the future. I think rather than doing a bunch of comments in the .yaml file, I'll just refer to the README.md in this directory which describes the structure of this file. Do you feel like that readme already has enough info? Or is there something more specific you'd like to see in there? I do have examples for each data type (test set, test bundle, test suite, run configuration, compile configuration, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
83c7431
to
d66c188
Compare
Golden file changes are available for triage from new commit, Click here to view. |
Golden file changes are available for triage from new commit, Click here to view. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wait to give this a shot!
@@ -99,7 +116,7 @@ this option is particularly effective for building on low-powered laptops. | |||
### Test browsers | |||
|
|||
Chromium, Firefox, and Safari for iOS are version-locked using the | |||
[browser_lock.yaml][2] configuration file. Safari for macOS is supplied by the | |||
[browser_lock.yaml][3] configuration file. Safari for macOS is supplied by the | |||
computer's operating system. Tests can be run in Edge locally, but Edge is not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to determine the version of safari that's running in CI? I've tried myself and the journey is pretty cryptic :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't know.
This is a major rework of the way we organize, compile, and run unit tests. See
lib/web_ui/README.md
andlib/web_ui/test/README.md
for more details.