Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lando init Pantheon recipe default to "main" branch but Pantheon build pipeline only works on "master" #134

Open
mrspiderbrain opened this issue Jul 8, 2022 · 7 comments

Comments

@mrspiderbrain
Copy link

Currently lando init pantheon recipe fails. Default to main branch which does not connect to the cloud build process. Pantheon are planning to move to "main" but not yet.

@rtfm-47 rtfm-47 transferred this issue from lando/lando Jul 8, 2022
@mrspiderbrain mrspiderbrain changed the title Lando init Pantheon recipe default to "main" branch but Pantheon build pipeline on works on "master" Lando init Pantheon recipe default to "main" branch but Pantheon build pipeline only works on "master" Jul 27, 2022
@ethangeorgi
Copy link
Collaborator

Assuming you've resolved this issue by now. If the issue persists, and updating Lando does not resolve it, please re-open this issue and provide more details.

@mrspiderbrain
Copy link
Author

I just initiated a new D10 project and the same problem is still there.

Steps to reproduce

  1. Create new D10 site on pantheon
  2. Do a lando init locally, make changes and commit
  3. Push to origin.
  4. No workflow occurs on pantheon because lando init is defaulting to a "main" branch which isn't recognised by the pantheon UI. Workflow is linked to master branch. There is no option to create a multidev from the git branch "main" that does actually exist in the repo.

Current workaround - switch to master branch immediately after the lando init.
If changes get lost - switch to master branch on local, merge main into master and then push.

@mrspiderbrain
Copy link
Author

@ethangeorgi it doesn't look like I have permission to reopen this issue.

@AaronFeledy AaronFeledy reopened this Jun 24, 2024
@reynoldsalec
Copy link
Member

I did replicate this and took a look into the code. AFAIK, Lando doesn't do anything "extra" to set the default remote branch when initializing a project.

Instead, the problem seems to be that Pantheon has chosen main as the default branch for its Drupal 10 upstream (see https://github.com/pantheon-upstreams/drupal-10-composer-managed for example), but is still using master to drive its workflows. Most of the other (older) upstreams seem to use master. This is reinforced by Pantheon's cut-and-paste git clone command for Drupal 10 sites specifying -b master.

Lando's lando pull/push commands do use master by default. A potential solution could be having Lando checkout master and set it as the default after cloning the repo or possibly passing in the -b master option to get-remote-url.sh, which I think accepts options. I'm a little conflicted on whether that's appropriate or not considering we're basically handling an inconsistency of the Pantheon platform, would definitely entertain the PR though.

@mrspiderbrain
Copy link
Author

@reynoldsalec I agree that Pantheon should fix this given your analysis. I'll open a pantheon support ticket and point to this ticket for reference so they get the chance to fix it their end.

@mrspiderbrain
Copy link
Author

I've made a customer support ticket, not public but the ID is 925842 for general reference. It would be good if we could leave this ticket open until we get some info from Pantheon on what they intend to do.

@reynoldsalec
Copy link
Member

Sounds good, thanks for following up on it @mrspiderbrain!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants