[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[tool] Only run postsubmit on changed packages #6516

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

stuartmorgan
Copy link
Contributor

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

  • 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 relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • 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.

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
Copy link
Contributor Author

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this do anything?

Copy link
Contributor Author

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.)

Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here as well.

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 30, 2022
@auto-submit auto-submit bot merged commit e8f19ed into flutter:main Sep 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 30, 2022
adam-harwood pushed a commit to adam-harwood/flutter_plugins that referenced this pull request Nov 3, 2022
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
2 participants