Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-803

Git default branch master->main

    XMLWordPrintable

    Details

    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None

      Description

      A number of developers have asked that we follow the new git and Github conventions and switch our default branch from master to main. 

      Background:

      https://sfconservancy.org/news/2020/jun/23/gitbranchname/

      Github has already switched:

      https://github.com/github/renaming

      and we now have new repos created with the new default name, thus now introducing a level of inconsistency that will only get worse. 

      RFC to:

      1. Change the dev guide https://developer.lsst.io/work/flow.html#the-master-branch
      2. Propose we ask TCAMs to organize a day (it's the kind of thing we used to do at team all-hands) to switch existing repos and other documentation references.

       

      (Indigenous People day is Oct 12, just saying and many (most?) of us don't have employers who observe it so there's an idea)

       

       

        Attachments

          Issue Links

            Activity

            No builds found.
            frossie Frossie Economou created issue -
            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            Definitely +1 on this.

            SPHEREx has already adopted this convention, just as a point of context.

            Show
            gpdf Gregory Dubois-Felsmann added a comment - Definitely +1 on this. SPHEREx has already adopted this convention, just as a point of context.
            Hide
            ktl Kian-Tat Lim added a comment -

            You beat me to it. I was going to work on some automated tools and Jenkins support, followed by a changeover maybe in the December holiday timeframe.

            Show
            ktl Kian-Tat Lim added a comment - You beat me to it. I was going to work on some automated tools and Jenkins support, followed by a changeover maybe in the December holiday timeframe.
            Hide
            ktl Kian-Tat Lim added a comment -

            The problem is not the repos or the docs, it's the build tooling that assumes the name (96 hits in jenkins-dm-jobs, 3 in lsstsw, 1 in lsst_build, need to check all GitHub actions, etc.).

            Show
            ktl Kian-Tat Lim added a comment - The problem is not the repos or the docs, it's the build tooling that assumes the name (96 hits in jenkins-dm-jobs, 3 in lsstsw, 1 in lsst_build, need to check all GitHub actions, etc.).
            Hide
            ebellm Eric Bellm added a comment -

            I support this.

            Show
            ebellm Eric Bellm added a comment - I support this.
            Hide
            frossie Frossie Economou added a comment -

            Kian-Tat Lim Ah, my apologies for jumping the gun. December sounds good. 

            Show
            frossie Frossie Economou added a comment - Kian-Tat Lim  Ah, my apologies for jumping the gun. December sounds good. 
            Hide
            frossie Frossie Economou added a comment -

            Kian-Tat Lim I believe Github states that it redirects requests for master to main? Not sure whether that helps with the builds. 

            Show
            frossie Frossie Economou added a comment - Kian-Tat Lim  I believe Github states that it redirects requests for master to main? Not sure whether that helps with the builds. 
            Hide
            ktl Kian-Tat Lim added a comment -

            Yes, it looks like that will help, except for this:

            raw file URLs are not redirected.

            which is I think relevant to newinstall.sh in particular.

            Show
            ktl Kian-Tat Lim added a comment - Yes, it looks like that will help, except for this: raw file URLs are not redirected. which is I think relevant to newinstall.sh in particular.
            Hide
            mrawls Meredith Rawls added a comment -

            Yes please!

            Show
            mrawls Meredith Rawls added a comment - Yes please!
            Hide
            rowen Russell Owen added a comment -

            I'm strongly in favor.

            Show
            rowen Russell Owen added a comment - I'm strongly in favor.
            Hide
            rra Russ Allbery added a comment - - edited

            The problem at the moment is that we are developing a mix of repositories with master and repositories with main as people create new repositories, and the newly-created repositories do not do branch redirection because they never had an old master branch. I think this has some potential for confusion and, depending on the nature of the build system issues, possibly some difficulties there.

            Given that, perhaps we should configure our GitHub orgs to use master by default for new repositories for now so that we don't proliferate two naming schemes until such time as we're ready to do the conversion, and then change the default branch for new repositories to main when we've cut over existing repositories?

            Show
            rra Russ Allbery added a comment - - edited The problem at the moment is that we are developing a mix of repositories with master and repositories with main as people create new repositories, and the newly-created repositories do not do branch redirection because they never had an old master branch. I think this has some potential for confusion and, depending on the nature of the build system issues, possibly some difficulties there. Given that, perhaps we should configure our GitHub orgs to use master by default for new repositories for now so that we don't proliferate two naming schemes until such time as we're ready to do the conversion, and then change the default branch for new repositories to main when we've cut over existing repositories?
            tjenness Tim Jenness made changes -
            Field Original Value New Value
            Remote Link This issue links to "Page (Confluence)" [ 31035 ]
            Hide
            ktl Kian-Tat Lim added a comment -

            The build system issues I'm worried about are around Science Pipelines, not other services or even trying-to-be-independent packages. For those, the default in both the lsst and lsst-dm orgs is still master.

            I trust lsst-sqre can come up with its own transition plan (e.g. I can't [and don't particularly want to] look at the current default setting).

            I don't think a DM RFC is binding on lsst-ts or lsst-ops. I think there may be fewer build system issues in those orgs as they're mostly using more modern tooling.

            Show
            ktl Kian-Tat Lim added a comment - The build system issues I'm worried about are around Science Pipelines, not other services or even trying-to-be-independent packages. For those, the default in both the lsst and lsst-dm orgs is still master . I trust lsst-sqre can come up with its own transition plan (e.g. I can't [and don't particularly want to] look at the current default setting). I don't think a DM RFC is binding on lsst-ts or lsst-ops. I think there may be fewer build system issues in those orgs as they're mostly using more modern tooling.
            Hide
            rra Russ Allbery added a comment -

            Ah, thank you, I had not realized the default branch was already set on those organizations (I should have checked). That resolves my concern.

            Show
            rra Russ Allbery added a comment - Ah, thank you, I had not realized the default branch was already set on those organizations (I should have checked). That resolves my concern.
            Hide
            frossie Frossie Economou added a comment -

            As things stand right now:

            • This has been discussed in various forums, I think it's clear there's support for the principle.
            • Given the disruption of the implementation and various other timescales, implementation may not actually happen until December timeframe but that's the way with RFCs anyway
            • Orgs that manage their own build chains (like lsst-sqre) can transition ahead of time if they wish. 

            Comments at variance with the above still welcome until RFC closes. 

            Show
            frossie Frossie Economou added a comment - As things stand right now: This has been discussed in various forums, I think it's clear there's support for the principle. Given the disruption of the implementation and various other timescales, implementation may not actually happen until December timeframe but that's the way with RFCs anyway Orgs that manage their own build chains (like lsst-sqre) can transition ahead of time if they wish.  Comments at variance with the above still welcome until RFC closes. 
            Hide
            erykoff Eli Rykoff added a comment -

            I support this, and I think that asking all the DM developers to help out on a concentrated day of action (if helpful) is reasonable. If conda-forge can make the mega-migration then we can too! (see recent updates at https://github.com/conda-forge/conda-forge.github.io/issues/1162 ).

            Show
            erykoff Eli Rykoff added a comment - I support this, and I think that asking all the DM developers to help out on a concentrated day of action (if helpful) is reasonable. If conda-forge can make the mega-migration then we can too! (see recent updates at https://github.com/conda-forge/conda-forge.github.io/issues/1162 ).
            Hide
            kannawad Arun Kannawadi added a comment -

            Can I request for a transition period, say a month or two, where both `master` and `main` branch names co-exist and the change of the default branch happens around the middle of this period? By this, I don't mean two different branches, but one single branch with an alias. I'm thinking along the lines of this Stack Overflow answer: https://stackoverflow.com/a/17236679

            Show
            kannawad Arun Kannawadi added a comment - Can I request for a transition period, say a month or two, where both `master` and `main` branch names co-exist and the change of the default branch happens around the middle of this period? By this, I don't mean two different branches, but one single branch with an alias. I'm thinking along the lines of this Stack Overflow answer:  https://stackoverflow.com/a/17236679
            Hide
            ktl Kian-Tat Lim added a comment -

            Unfortunately, git symbolic-ref main refs/heads/main may allow master to stay pointing to where main does, but my experiments seem to show that it is not the equivalent of a real branch, and commands do not work identically: e.g. git checkout master gives "detached HEAD" state, and I suspect merges will also be problematic. Also, I believe that the symbolic ref is only local to a clone; it does not seem possible to make it mandatory for all new clones.

            If you are concerned about muscle memory typing the wrong branch name, you might try to use git checkout - or git switch - instead. It's shorter, and quite often what you want.

            Show
            ktl Kian-Tat Lim added a comment - Unfortunately, git symbolic-ref main refs/heads/main may allow master to stay pointing to where main does, but my experiments seem to show that it is not the equivalent of a real branch, and commands do not work identically: e.g. git checkout master gives "detached HEAD" state, and I suspect merges will also be problematic. Also, I believe that the symbolic ref is only local to a clone; it does not seem possible to make it mandatory for all new clones. If you are concerned about muscle memory typing the wrong branch name, you might try to use git checkout - or git switch - instead. It's shorter, and quite often what you want.
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 31079 ]
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 31146 ]
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 31373 ]
            ktl Kian-Tat Lim made changes -
            Status Proposed [ 10805 ] Flagged [ 10606 ]
            ktl Kian-Tat Lim made changes -
            Status Flagged [ 10606 ] Board Recommended [ 11405 ]
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 31434 ]
            ktl Kian-Tat Lim made changes -
            Status Board Recommended [ 11405 ] Adopted [ 10806 ]
            ktl Kian-Tat Lim made changes -
            Link This issue is triggering DM-32648 [ DM-32648 ]
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 31545 ]
            jsick Jonathan Sick made changes -
            Link This issue relates to DM-32710 [ DM-32710 ]
            ktl Kian-Tat Lim made changes -
            Resolution Done [ 10000 ]
            Status Adopted [ 10806 ] Implemented [ 11105 ]
            tjenness Tim Jenness made changes -
            Remote Link This issue links to "Page (Confluence)" [ 31661 ]

              People

              Assignee:
              frossie Frossie Economou
              Reporter:
              frossie Frossie Economou
              Watchers:
              Andy Clements, Arun Kannawadi, Eli Rykoff, Eric Bellm, Frossie Economou, Gregory Dubois-Felsmann, John Parejko, Kian-Tat Lim, Lee Kelvin, Meredith Rawls, Russ Allbery, Russell Owen, Tim Jenness, Wouter van Reeven
              Votes:
              1 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Planned End:

                  Jenkins Builds

                  No builds found.