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

bloom config is hardcoded to look at master branch new repositories use main as default #721

Open
tfoote opened this issue Jan 13, 2024 · 4 comments

Comments

@tfoote
Copy link
Member

tfoote commented Jan 13, 2024

When people try to add config options such as .ignored files bloom doesn't find them, if they have a more recent repository with main as the default. Legacy repositories work fine because they still default to master as the default branch.

Example problem ros/rosdistro#39536

The branch is hard coded here:

BLOOM_CONFIG_BRANCH = 'master'

It would be good to change this to detect and use the default branch in the repository and allow an override if there's a specific branch desired by the maintainer. The simpler solution would be to allow overriding it on the command line only.

@tfoote
Copy link
Member Author

tfoote commented Jan 13, 2024

Another workaround available to maintainers is to sync main to master.

You can use this action to keep main and master in sync and bloom would use the synced version. https://github.com/zofrex/mirror-branch

I've used it here: https://github.com/osrf/rocker/blob/main/.github/workflows/mirror-main-to-master.yaml

@mjcarroll
Copy link

Another workaround available to maintainers is to sync main to master.

I think this is probably more painful, and we can pretty easily figure out what the default branch is from git.

A command like: git ls-remote --symref origin HEAD should get the ref of origin that corresponds to the "default" branch on github.

@tfoote tfoote added enhancement and removed bug labels Jan 19, 2024
@tfoote
Copy link
Member Author

tfoote commented Jan 19, 2024

We just had a chance to chat about this. We used to use use the bloom branch to be compatible with integration in a source repository but that quickly turned out to be not a good move. We moved to master for better visibility when viewing on github.

We would like to go back to using the bloom branch for clarity the use case. But doing that change is a bigger lift than we actively want to invest in this right now. Especially with supporting migration paths. So for now we are going to keep the standard that bloom relies on using the master branch.

When we deploy new ros2-gbp repositories via terraform it creates an empty repository that bloom will eventually push to. Github won't let us set the default branch until the branch is created. The default branch defaults to the first one pushed, which if bloom does it, will be master. If an individual pushes a branch such as main first it will become the default.

For now we should stick with the expectation that the default branch in a release repo should be master and if there's one created manually otherwise we will recommend manually changing it to master.

@tfoote
Copy link
Member Author

tfoote commented Jan 19, 2024

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

2 participants