-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[tool] Only run postsubmit on changed packages #6516
[tool] Only run postsubmit on changed packages #6516
Conversation
Per discussion in flutter/flutter#111885, we can use the auto-roller as a mechanism to find out-of-band issues, rather than having them found by post-submit tests. This will make post-submit much faster and much less compute-intensive for most changes. Fixes flutter/flutter#111885
@@ -1,5 +1,9 @@ | |||
## 0.11.1 |
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 I forgot to bump the version when I added this, and the repo tooling doesn't validate the tool's metadata the way it does for packages. It wasn't important to have fix
be its own version, so I'm just fixing the changelog rather than doing a separate PR to add the missed version bump.
@@ -763,19 +776,27 @@ packages/b_package/lib/src/foo.dart | |||
]; | |||
final RepositoryPackage plugin1 = | |||
createFakePlugin('plugin1', packagesDir); | |||
final RepositoryPackage plugin2 = | |||
createFakePlugin('plugin2', packagesDir); | |||
createFakePlugin('plugin2', packagesDir); |
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.
Does this do anything?
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 makes a plugin in the mock in-memory filesystem; it's what makes
expect(command.plugins, unorderedEquals(<String>[plugin1.path]));
A little later actually useful, because we're asserting that even though there were other packages, they weren't included in the iteration (because the fake diff didn't include any files in them).
The change here is because we are no longer expecting to see plugin2
in that line, so we don't need a variable containing its path, making it an used variable now (which fails one of our lints).
(Setting up fake plugins/packages before running commands is the common pattern for pretty much all of the tooling tests.)
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.
Great, thank you for clarifying
@@ -787,19 +808,27 @@ packages/b_package/lib/src/foo.dart | |||
]; | |||
final RepositoryPackage plugin1 = | |||
createFakePlugin('plugin1', packagesDir); | |||
final RepositoryPackage plugin2 = | |||
createFakePlugin('plugin2', packagesDir); | |||
createFakePlugin('plugin2', packagesDir); |
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.
Here as well.
Per discussion in flutter/flutter#111885, we can use the auto-roller as a mechanism to find out-of-band issues, rather than having them found by post-submit tests. This will make post-submit much faster and much less compute-intensive for most changes.
Fixes flutter/flutter#111885
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).