Skip to content

Make web test subshards dynamically determined by .ci.yaml - #191003

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
mdebbar:dynamic-web-subshards
Sep 24, 2026
Merged

auto-submit[bot] merged 5 commits into
flutter:masterfrom
mdebbar:dynamic-web-subshards

Conversation

@mdebbar

@mdebbar mdebbar commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR refactors web unit test subsharding (web_canvaskit_tests and web_skwasm_tests) so that the subshard count is dynamically dictated by what is specified in .ci.yaml using the standard {index}_{total} format (e.g. 1_8, 1_2, 2_2).

  • dev/bots/suite_runners/run_web_tests.dart: Refactored _runWebUnitTests to parse the SUBSHARD environment variable via selectIndexOfTotalSubshard<String>(allTests) when formatted as {index}_{total}. Automatically executes the extra flutter_web_plugins and flutter_driver web extension tests on the last subshard (index == total). Retains fallback support for legacy single-number and _last subshard names.
  • .ci.yaml: Preserved target name: fields unchanged (Linux web_canvaskit_tests_0 .. 7_last, Linux web_skwasm_tests_0 & 1), while updating subshard: properties to "1_8" .. "8_8" and "1_2" / "2_2".

Verification

  • dart analyze --fatal-infos dev/bots/suite_runners/run_web_tests.dart
  • dart format dev/bots/suite_runners/run_web_tests.dart
  • bin/cache/dart-sdk/bin/dart dev/bots/test/ci_yaml_validation_test.dart

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 12, 2026
@github-actions github-actions Bot added the team-web Owned by Web platform team label Aug 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the subshard naming convention in .ci.yaml and refactors _runWebUnitTests in run_web_tests.dart to dynamically parse subshard indices and totals from the environment. Feedback highlights a bug in the legacy fallback logic where legacyShardCount is hardcoded to 8, which would cause issues for web_skwasm_tests that historically used 2 shards.

Comment thread dev/bots/suite_runners/run_web_tests.dart Outdated
@Piinks Piinks added the platform-web Web applications specifically label Aug 17, 2026
@github-actions github-actions Bot removed the platform-web Web applications specifically label Sep 21, 2026
@Piinks Piinks added platform-web Web applications specifically team-infra Owned by Infrastructure team and removed team-web Owned by Web platform team labels Sep 21, 2026
@Piinks

Piinks commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

FYI @eyebrowsoffire

harryterkelsen
harryterkelsen previously approved these changes Sep 23, 2026

@harryterkelsen harryterkelsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with nit about comment

Comment thread dev/bots/suite_runners/run_web_tests.dart
@github-actions github-actions Bot added team-web Owned by Web platform team and removed platform-web Web applications specifically team-infra Owned by Infrastructure team labels Sep 24, 2026
@harryterkelsen harryterkelsen added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 24, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Sep 24, 2026
Merged via the queue into flutter:master with commit 894624e Sep 24, 2026
23 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD team-web Owned by Web platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants