[go: nahoru, domu]

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

[tool] Improve main-branch detection #7038

Merged

Conversation

stuartmorgan
Copy link
Contributor

Currently main-branch detection for --packages-for-branch looks at branch names, but this no longer works on LUCI which now seems to be checking out specific hashes rather than branches. This updates the behavior so that it will treat any hash that is an ancestor of main as being part of main, which should allow post-submit detection to work under LUCI.

Fixes flutter/flutter#119330

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.

Currently main-branch detection for `--packages-for-branch` looks at
branch names, but this no longer works on LUCI which now seems to be
checking out specific hashes rather than branches. This updates the
behavior so that it will treat any hash that is an ancestor of `main` as
being part of `main`, which should allow post-submit detection to work
under LUCI.

Fixes flutter/flutter#119330
Copy link
Contributor
@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

just a couple typos

script/tool/CHANGELOG.md Outdated Show resolved Hide resolved
script/tool/lib/src/common/package_command.dart Outdated Show resolved Hide resolved
@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 30, 2023
@auto-submit auto-submit bot merged commit 3843b38 into flutter:main Jan 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 31, 2023
@stuartmorgan stuartmorgan deleted the tool-main-branch-detection-improvement branch January 31, 2023 15:13
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 31, 2023
* 90f447313 [ci] Increase timeouts for platform_tests (flutter/plugins#7036)

* f5568e4b1 [google_sign_in] Add doc for iOS auth with SERVER_CLIENT_ID (flutter/plugins#4747)

* 0c05e8d91 Roll Flutter from a815ee6 to 75680ae (58 revisions) (flutter/plugins#7048)

* a4c320902 [camera]: Bump camerax_version from 1.3.0-alpha02 to 1.3.0-alpha03 in /packages/camera/camera_android_camerax/android (flutter/plugins#7061)

* 8f12b27b6 [ci] Add LUCI versions of macOS ARM tests (flutter/plugins#6984)

* 3843b38e2 [tool] Improve main-branch detection (flutter/plugins#7038)

* d39e7569c [in_app_purchase] Prep for more const widgets (flutter/plugins#7030)

* ddb9777ee [ci] Switch remaining macOS host tests to LUCI (flutter/plugins#7063)

* 2edf56324 [ci] Part 1 of swapping iOS platform test arch (flutter/plugins#7064)

* 35f0b1a49 [camerax] Add system services to plugin (flutter/plugins#6986)

* 5dd0f41a2 [webview]: Bump mockito-inline (flutter/plugins#7056)

* 1896f10ca [webview_flutter_wkwebview][webview_flutter_android] Fixes bug where the `WebView`s could not be released (flutter/plugins#6996)

* a494825fa [camerax] Allow instance manager to create identical objects (flutter/plugins#7034)

* 6ef73da26 [ci] Increase heavy workload memory (flutter/plugins#7065)

* 9da327ca3 [various] Update to use sharedDarwinSource (flutter/plugins#7027)
stuartmorgan added a commit that referenced this pull request Feb 1, 2023
Follow-up to #7038 to try to make
it work on LUCI. Looking at the checkout steps of a LUCI run, it looks
like we do a full `fetch` of `origin`, but likely only have a `master`
branch locally. Rather than rely on a specific local branch name
existing, this allows for checking `origin` (and just in case, since
it's another common remote name, `upstream`).

Hopefully fixes flutter/flutter#119330
stuartmorgan added a commit to flutter/packages that referenced this pull request Feb 13, 2023
Follow-up to flutter/plugins#7038 to try to make
it work on LUCI. Looking at the checkout steps of a LUCI run, it looks
like we do a full `fetch` of `origin`, but likely only have a `master`
branch locally. Rather than rely on a specific local branch name
existing, this allows for checking `origin` (and just in case, since
it's another common remote name, `upstream`).

Hopefully fixes flutter/flutter#119330
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