Skip to content

Web subsharding#112505

Merged
auto-submit[bot] merged 5 commits intoflutter:masterfrom
Jasguerrero:web_sub_sharding
Sep 28, 2022
Merged

Web subsharding#112505
auto-submit[bot] merged 5 commits intoflutter:masterfrom
Jasguerrero:web_sub_sharding

Conversation

@Jasguerrero
Copy link
Contributor

@Jasguerrero Jasguerrero commented Sep 27, 2022

Fixes: #112440

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Sep 27, 2022
]
shard: web_tool_tests
subshard: web
subshard: "1_2"
Copy link
Contributor

Choose a reason for hiding this comment

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

uh oh, is this going to work? I'm guessing the test runner is expecting this value to be "web"?

Copy link
Contributor Author

@Jasguerrero Jasguerrero Sep 28, 2022

Choose a reason for hiding this comment

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

Looking at this logs https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8801824234378758625/+/u/run_test.dart_for_web_tool_tests_shard_and_subshard_web/test_stdout from a previous run I see Invalid subshard name "web". Expected format "[int]_[int]" ex. "1_3" So I think is the other way around; for linux and mac it expects I think 1_1 but since it fails it is running it in a single shard anyways. I can make the change to linux and mac to be 1_1 and avoid that error.

Edit: that is happening because now I am using _selectIndexOfTotalSubshard which expect subshard keys

Copy link
Contributor

Choose a reason for hiding this comment

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

lol, good catch. i think it's expecting an empty subshard if there's only one. i wonder why we don't fail the build on an invalid subshard value. Anyway, looks good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree I think we should fail if invalid subshard name, I spent some time debugging why my shard was running integration tests and turns out that if you make this mistake _selectIndexOfTotalSubshard returns an empty array which then on _runDartTest if you pass an empty array you end up with a command like this run test --flags and then it runs every single test on your workingDirectory. I will make an issue to fix this

@Jasguerrero Jasguerrero marked this pull request as ready for review September 28, 2022 18:21
]
shard: web_tool_tests
subshard: web
subshard: "1_1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Target name Linux web_tool_tests => Linux web_tool_tests_1_2.
Same for the Mac one.
Seems the Windows one has been updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linux web_tool_tests_1_1 right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, this only has one shard. Then it should be good.

Copy link
Contributor

Choose a reason for hiding this comment

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

question: should we just leave this field empty then?

Copy link
Contributor Author

@Jasguerrero Jasguerrero Sep 28, 2022

Choose a reason for hiding this comment

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

From a practical perspective it's fine to remove it

if (subshardName == null) {
  print('$kSubshardKey environment variable is missing, skipping sharding');
  return tests;
}

@keyonghan

Copy link
Contributor

Choose a reason for hiding this comment

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

Either LGTM. I don't have strong preference on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But then again if in the future we want to further subshard linux/mac I think it will help to remember that this are already "subshard" ready?

Copy link
Contributor

@keyonghan keyonghan left a comment

Choose a reason for hiding this comment

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

LGTM

]
shard: web_tool_tests
subshard: web
subshard: "1_1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, this only has one shard. Then it should be good.

@keyonghan
Copy link
Contributor

/cc @CaseyHillers this may need a CP from release branches.

@Jasguerrero Jasguerrero added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 28, 2022
@auto-submit auto-submit bot merged commit 45584b2 into flutter:master Sep 28, 2022
@CaseyHillers
Copy link
Contributor

/cc @CaseyHillers this may need a CP from release branches.

Thanks, since this doesn't change any existing target names it looks fine. I'll monitor when we ship the next release to make sure it didn't cause any breakages.

@keyonghan
Copy link
Contributor

Thanks, since this doesn't change any existing target names it looks fine. I'll monitor when we ship the next release to make sure it didn't cause any breakages.

Windows web_tool_tests => Windows web_tool_tests_1_2 and Windows web_tool_tests_2_2

@CaseyHillers
Copy link
Contributor

Windows web_tool_tests => Windows web_tool_tests_1_2 and Windows web_tool_tests_2_2

Ah, I missed that. We'll likely ack this as not running since it's covered on other platforms

hannah-hyj pushed a commit to hannah-hyj/flutter that referenced this pull request Sep 28, 2022
@Jasguerrero Jasguerrero deleted the web_sub_sharding branch September 28, 2022 23:07
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows web_tool_tests is flaky on execution timeout over 30 mins threshold

4 participants