question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate ALL providers to expecting main branch, not just GitHub, and announce the change

See original GitHub issue

The work done in https://github.com/jupyterhub/binderhub/pull/1172 means that binderhub now looks for the main branch if a ref isn’t provided, rather than master. This is probably a change we should roll out across all providers but I, at least, am unfamiliar with where these other communities are in this process and this change will be breaking previously established behaviour, possibly disrupting a lot of users. Therefore, I think we should have some form of “announcement” (blog post, twitter thread…) ready to go when we do make this change, just so users aren’t blind-sided and they can find information on how to fix their links.

Note: This change does not affect gists over which the user has no control of the ref naming.

TODOs

  • Draft a blog post/twitter thread to announce the change
  • Change the behaviour of the placeholder variable added in PR #1172
placeholder = "main";
if (provider === "gist") {
    placeholder = "master";
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
betatimcommented, Oct 29, 2020

Take a look at #843 which was closed by #895. Maybe we can hoist this out of the Git repo provider and use it for GitHub and GitLab as well?

1reaction
minrkcommented, Oct 30, 2020

Yes, this is related to #895 which also uses ls-remote to resolve refs. The addition of --symref HEAD is what lets us find the branch name associated with HEAD.

But this is even easier than I thought! HEAD is already a valid ref, so it’s working already and we should just make our default ref HEAD instead of a branch name, and our existing APIs already work:

https://mybinder.org/v2/gh/binderhub-ci-repos/requirements/HEAD

This is strictly better than resolving the default branch name and using that in the URL, because it allows creating a stable link that will work across default branch changes without changes to the link.

Need to test with all providers, but I think it’ll work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with migrating master -> main #1145 - GitHub
We have recently moved the master branch to main on all the Bokeh repos ... Migrate ALL providers to expecting main branch, not...
Read more >
GitHub to replace master with main starting in October
As GitHub does its thing, the most important steps you can take is migrate the default branch of all your projects from “master”...
Read more >
Git: Moving from Master to Main | R-bloggers
In June 2020, GitHub announced that is was moving the default branch name from master to the more neutral name, main.
Read more >
The new Git default branch name - GitLab
Every Git repository has an initial branch, which is the first branch to be ... via the GitLab GUI will use main as...
Read more >
Sunsetting Atom - The GitHub Blog
We are archiving Atom and all projects under the Atom organization for an official sunset on December 15, 2022.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found