OpenAstronomy/azure-pipelines-templates

Future of default branch naming

Opened this issue · 7 comments

pllim commented

Do you have plans to rename the default branch here? I see that it is hardcoded in https://github.com/astropy/astropy/blob/0a29184ea1d5fdc2876e9dd3294c56e32287e0a5/azure-pipelines.yml#L11 . So if you change it, please open PR downstream. Thanks!

Would Azure Pipelines follow GitHub's redirect to the new default branch name, or would jobs fail for all downstream projects still using the old default name as a ref?

I don't think it would, so I have no intention to change the default branch here as it would require patching every downstream project.

The only thing I can think of would be to maintain a "master" branch on this repo which is automatically synced with the default branch, so that not updated repositories would continue to work. If someone wanted to do this then I would be willing to test it out.

I am going to close this as wont-fix due to the compatibility issues it would cause.

The Azure docs says it'll use the default branch if a ref isn't specified so we could probably remove the recommendation in the docs to specify a ref.

I'd be happy to look into the separate branch option. Instead of syncing, it should be possible to create templates in a "master" branch that call the templates in a default "main" branch we could just copy the current tox and publish templates to a new "master" branch and append a job to them to show a deprecation warning in the azure gui saying that people need to remove the ref or update it to "main" to receive updates.

The Azure docs says it'll use the default branch if a ref isn't specified so we could probably remove the recommendation in the docs to specify a ref.

👍 Seems sensible.

show a deprecation warning in the azure gui saying that people need to remove the ref or update it to "main" to receive updates

This concerns me a little, because I am not sure if people would see them. I wonder if we could generate something a little more visible.

If we were to do this, we should really use some of the astropy batch PR/issue scripts to try and fix / warn all the 60 repos using these templates.

pllim commented

Re: batch PR -- Theoretically possible but if you want to do due diligence, someone still needs to vet the PR diffs after they are open.