Repository navigation
[web] enable CanvasKit tests using a local bundle fetched from CIPD - #92134
Conversation
e5a82ca to
371987b
Compare
There was a problem hiding this comment.
nit: update comment
There was a problem hiding this comment.
What's the reasoning for these being strings instead of numbers?
There was a problem hiding this comment.
Technically all subshard names are strings, but some shards have a custom convention. Web shards use the numeric convention that uses subshard number ("0", "1", etc) for all subshards except the last one, which uses "_last" suffix (e.g. 7_last).
Having said that I totally botched the convention and now I fixed it. Unfortunately, because .ci.yaml changes do not take effect immediately it's easy to make mistakes like that..
There was a problem hiding this comment.
Avoid adding new calls to globals in tests. I suggest doing something like:
for (final FileSystemStyle style in <FileSystemStyle>[FileSystemStyle.posix, FileSystemStyle.windows]) {
test('WebServiceWorker generates a service_worker for a web resource folder for ${style == FileSystemStyle.posix ? 'posix' : 'windows'}', () {
final FileSystem fileSystem = MemoryFileSystem(style: style);
...
});
}
There was a problem hiding this comment.
After an offline discussion, reverted to globals.fs. The test is using TestBed and Environment which are setup to use globals.fs. This file overall needs a separate clean-ups to stop depending on globals.
There was a problem hiding this comment.
avoid adding globals to tests
christopherfujino
left a comment
There was a problem hiding this comment.
Some nits about the tests, but otherwise the tools change LGTM
keyonghan
left a comment
There was a problem hiding this comment.
LGTM with test ownership.
Piinks
left a comment
There was a problem hiding this comment.
Should the test shards that are being added show up in CI here? They do not appear to be listed as checks, and without running them, Gold is not seeing this new info.
Piinks
left a comment
There was a problem hiding this comment.
According to https://flutter-gold.skia.org/search?crs=github&issue=92134&patchsets=1&positive=true
these are the only builds that are sending info to Gold:
- Windows framework_tests_widgets
- Windows framework_tests_libraries
- Linux web_tests_5
- Linux web_tests_4
- Linux web_tests_3
- Linux web_tests_2
- Mac framework_tests_widgets
- Linux web_tests_1
- Linux web_tests_7_last
- Linux web_tests_6
- Linux framework_tests_widgets
- Linux web_tests_0
- Linux framework_tests_libraries
- Mac framework_tests_libraries
|
@Piinks good question. Unfortunately, the new shards do not show up right away. More details here, but the tl;dr is that new test shards are added as |
1 similar comment
|
@Piinks good question. Unfortunately, the new shards do not show up right away. More details here, but the tl;dr is that new test shards are added as |
|
(sorry for duplicate posts; Github is giving me errors when I post but is actually posting my comments) |
|
Ah I see, ok! In that case it sounds like we would validate later that Gold is receiving the data correctly. Would that testing happen in post submit then? Currently the Gold flow checks images in during presubmit. It may cause some issues temporarily if these are run in post submit first, not sure though since we haven't done that before. 🙃 |
Oh no! Catch-22. @CaseyHillers save us! |
@Piinks if we're not running in presubmit, I don't think there would be a way for gold to block PRs. This should be safe to land. If there's a breakage, that's a bug and we'll need to fix the process to adhere with the tree's flaky test policy. |
There was a problem hiding this comment.
Suggestion: There's no need for async/await here.
| Future<void> _runWebHtmlUnitTests() async { | |
| await _runWebUnitTests('html'); | |
| } | |
| Future<void> _runWebCanvasKitUnitTests() async { | |
| await _runWebUnitTests('canvaskit'); | |
| } | |
| Future<void> _runWebHtmlUnitTests() { | |
| return _runWebUnitTests('html'); | |
| } | |
| Future<void> _runWebCanvasKitUnitTests() { | |
| return _runWebUnitTests('canvaskit'); | |
| } |
There was a problem hiding this comment.
Just curious, why not:
final File target = environment.outputDir.childDirectory('canvaskit').childFile(relativePath);
await file.copy(target.path);There was a problem hiding this comment.
childFile takes a basename, not a sub-path.
There was a problem hiding this comment.
s/directory directory/directory
SGTM! |
Piinks
left a comment
There was a problem hiding this comment.
LGTM - Gold changes look fine, but will need to confirm and triage all of the images with the new key set once these shards are actually running.
Thanks! I might need some handholding to see it through. Might need help from you, @Piinks, and from @CaseyHillers. |
|
Could you explain me please how exactly does this solve #70101? |
|
I think this command will use bundled canvaskit from your build folder. |
Part of flutter/flutter#92134 It seems the issue is already closed and fixed, so I'm attempting to remove this TODO ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Part of flutter/flutter#92134 It seems the issue is already closed and fixed, so I'm attempting to remove this TODO ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Part of flutter/flutter#92134 It seems the issue is already closed and fixed, so I'm attempting to remove this TODO ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
build/web/canvaskitduringflutter build web.Fixes #71604
Fixes #70101