Skip to content

Conversation

@christopherfujino
Copy link
Contributor

@christopherfujino christopherfujino commented Jan 11, 2022

When cloning the framework and engine repos as part of the conductor start flow, explicitly checkout the candidate branch from the upstream remote, in case both the upstream AND mirror repo have the branch and then git cannot disambiguate.

Fixes #96425

Remove code to have the conductor update .ci.yaml with the candidate branch name; this is no longer needed after flutter/cocoon#1468

Fixes #96437

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Jan 11, 2022
@christopherfujino christopherfujino changed the title fix initialref to explicitly include remote name [flutter_conductor] fix initialref to explicitly include remote name Jan 11, 2022
engine = EngineRepository(
checkouts,
initialRef: candidateBranch,
initialRef: 'upstream/$candidateBranch',
Copy link
Contributor

Choose a reason for hiding this comment

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

Will we get an error during the checkout if the branch already exists in the fork?

Copy link
Contributor Author

@christopherfujino christopherfujino Jan 12, 2022

Choose a reason for hiding this comment

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

By namespacing by the upstream remote name, git will disregard the fork's branches. This is an unambiguous reference, and will only error if the git cannot fetch the given branch from the upstream remote (either because the branch name that was input was wrong or because it couldn't reach the server).

if you only provide the branch name, git will check all remotes and find which has the branch in question, which was what happened in #96425.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thanks for the explanation.

@fluttergithubbot fluttergithubbot merged commit 4575a69 into flutter:master Jan 13, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

3 participants