Page MenuHomePhabricator

Rename mainline Git branch from "master" to "main" on all WMF-hosted repositories during GitLab migration
Open, Needs TriagePublic6 Estimated Story Points

Description

As part of the effort described in T254646: Reconsidering how we name things, Release Engineering plans to change the mainline branch name on all WMF (and WMF-hosted) Git repositories from "master" to "main". This accords with changes made by platforms such as GitHub and GitLab, as well as work underway on the Git project itself.

Because this entails quite a bit of work and potential breakage in many overlapping systems, we are going to make this change as we migrate projects to GitLab, and not before.

This will enable us to combine the considerable effort of changing Git remotes for both projects in tooling, documentation, and the developer community's local checkouts of repos, and verify changes as we go.

In general it's hoped that the migration to new GitLab remotes and an entirely new CI system will account for most of this work, but there are bound to be some naming-specific problems. We can use this task to track issues arising from the rename, hard-coded branch names, etc., as they arise.

Do not pre-emptively change the branch name on any repositories in the mediawiki/ namespace. We understand the urgency of efforts to deal with these issues, and appreciate the community's patience as we tackle them systematically in a setting where they impinge on a lot of complexity and technical debt.

Event Timeline

brennen set the point value for this task to 6.Sep 8 2021, 6:55 PM

Are projects currently stored (and not just mirrored) on GitHub in scope here? E.g. https://github.com/wikimedia/ores and https://github.com/wikimedia/jquery.uls also default to master, and they have no warning about being mirrored.

Are projects currently stored (and not just mirrored) on GitHub in scope here? E.g. https://github.com/wikimedia/ores and https://github.com/wikimedia/jquery.uls also default to master, and they have no warning about being mirrored.

There's T305039: Migrate active Wikimedia repositories in GitHub to GitLab but that seems speculative about whether that work is going to happen; it'd probably be best to file a distinct task to make this move now, rather than wait around in case.

Change 902371 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions@refs/meta/config] Block access to the main branch

https://gerrit.wikimedia.org/r/902371

Change 902371 merged by Reedy:

[mediawiki/extensions@refs/meta/config] Block access to the main branch

https://gerrit.wikimedia.org/r/902371

Change 902372 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions@refs/meta/config] Properly block pushes to 'main' branch

https://gerrit.wikimedia.org/r/902372

Change 902373 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/skins@refs/meta/config] Block access to the main branch

https://gerrit.wikimedia.org/r/902373

Change 902372 merged by Reedy:

[mediawiki/extensions@refs/meta/config] Properly block pushes to 'main' branch

https://gerrit.wikimedia.org/r/902372

Change 902373 merged by Jforrester:

[mediawiki/skins@refs/meta/config] Block access to the main branch

https://gerrit.wikimedia.org/r/902373

Change 902589 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions@refs/meta/config] Block access to the main branch (take 2)

https://gerrit.wikimedia.org/r/902589

Change 907732 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/skins@refs/meta/config] Block access to the main branch (take 2)

https://gerrit.wikimedia.org/r/907732

Change 902589 merged by Hashar:

[mediawiki/extensions@refs/meta/config] Block access to the main branch (take 2)

https://gerrit.wikimedia.org/r/902589

Change 907732 merged by Hashar:

[mediawiki/skins@refs/meta/config] Block access to the main branch (take 2)

https://gerrit.wikimedia.org/r/907732

Based on this message to the list, it doesn't look like the migration to Gitlab is going to happen any time soon. Can we make this change independent of that migration?

Based on this message to the list, it doesn't look like the migration to Gitlab is going to happen any time soon. Can we make this change independent of that migration?

That change would be us re-opening T279612: Gerrit: default branch for new projects should be "main", I think.