Skip to content

[tool] Fix package matching logic for --package-tags filter - #13472

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
elliette:fix-web-test-suite-timeouts
Oct 28, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:mainfrom
elliette:fix-web-test-suite-timeouts

Conversation

@elliette

Copy link
Copy Markdown
Member

#12763 introduced a new --package-tags flag that can be used to specify which flags to filter a package's tests with. After some investigation, I realized it wasn't working on CI.

This is because we were trying to match the package key set in the YAML file (in this case material_ui) to RepositoryPackage.displayName which removes everything in the path up to the first path component named packages. On CI, the repository is checked out into a directory named packages, so RepositoryPackage.displayName returned the package's path with a leading packages/ (e.g. packages/material_ui). As a result, it never matched in CI. Tag lookup now uses _packageTagKey, which returns the package's path relative to the packages/ directory that contains it (e.g. material_ui), regardless of where the repository is checked out.

Work towards flutter/flutter#192308

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. 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.

Footnotes

  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. ↩ ↩2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 28, 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 dart-test command to identify packages by their relative path from the packages directory rather than their display name, fixing a bug where package tag matching fails when the repository is checked out in a directory named "packages". The review feedback suggests filtering out null values when resolving package tag keys to ensure the candidates set is typed as Set<String> instead of Set<String?> for better type safety.

@Piinks Piinks 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

@elliette elliette added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 28, 2026
@auto-submit
auto-submit Bot merged commit 0f3656e into flutter:main Oct 28, 2026
13 checks passed
Rheoz pushed a commit to Rheoz/flutter that referenced this pull request Oct 29, 2026
flutter/packages@13d38e0...0b72e92

2026-10-29 [email protected] [material_ui]
Mirror the GappedSliderTrackShape secondary track correctly in RTL
(flutter/packages#13226)
2026-10-29 [email protected] [pigeon] update jni dependency to ^1.1.1
and remove workaround proguard rules (flutter/packages#13464)
2026-10-28 [email protected] [cupertino_ui]
Document translucent default background of
CupertinoSlidingSegmentedControl (flutter/packages#13178)
2026-10-28 [email protected] [flutter_svg] Throw on non-2xx responses in
SvgNetworkLoader (flutter/packages#13403)
2026-10-28 [email protected] [tool] Fix package
matching logic for `--package-tags` filter (flutter/packages#13472)
2026-10-28 [email protected] Roll Flutter from
d4c8577 to 0c2473c (21 revisions) (flutter/packages#13470)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants