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

Changing default branch names to main #2222

Open
justaugustus opened this issue Sep 24, 2020 · 40 comments
Open

Changing default branch names to main #2222

justaugustus opened this issue Sep 24, 2020 · 40 comments
Assignees
Labels
area/github-management Issues or PRs related to GitHub Management subproject lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/testing Categorizes an issue or PR as relevant to SIG Testing. wg/naming Categorizes an issue or PR as relevant to WG Naming.
Milestone

Comments

@justaugustus
Copy link
Member

justaugustus commented Sep 24, 2020

Organization or repository

All

Users affected

Global

Describe the issue

This is a long-term tracking issue for renaming the default branch on repositories from master to main. Consider this community tracking for the discussion in https://github.com/github/renaming.

As of today (9/24):

cc: @kubernetes/owners @kubernetes/wg-naming
/area github-admin
/sig contributor-experience
/wg naming


EDIT(@spiffxp 2021-06-30): Here's an attempt at surveying the state of things today. There are currently 17/243 repos (~7%) that have had their branches renamed.

We need to regroup on the easiest way to track and delegate this. Manually updating a GitHub issue description isn't it, but I thought it would help to see the info here.

#!/usr/bin/env bash
readonly orgs=(
    kubernetes
    kubernetes-sigs
    kubernetes-client
    kubernetes-csi
)

readonly gh_api_cmd=(
    gh api
    --field=per_page=100
    --paginate
    --method=GET
)

for org in "${orgs[@]}"; do
    echo "* ${org}"
    "${gh_api_cmd[@]}" "/orgs/${org}/repos" \
        --field=sort=full_name \
        --template \
        '{{range .}}  * [{{if eq .default_branch "master"}} {{else}}X{{end}}] [{{.full_name}}]({{.html_url}}) {{"\n"}}{{end}}'
done
@k8s-ci-robot k8s-ci-robot added the sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. label Sep 24, 2020
@justaugustus
Copy link
Member Author

/wg naming

@k8s-ci-robot k8s-ci-robot added the wg/naming Categorizes an issue or PR as relevant to WG Naming. label Sep 24, 2020
@cblecker cblecker added the area/github-management Issues or PRs related to GitHub Management subproject label Sep 24, 2020
@spiffxp
Copy link
Member

spiffxp commented Sep 24, 2020

/sig testing

@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Sep 24, 2020
@celestehorgan
Copy link
Contributor

@justaugustus – Do you think this merits a communication to k/dev?

@kubernetes kubernetes deleted a comment from k8s-ci-robot Sep 25, 2020
@justaugustus
Copy link
Member Author

/assign
cc: @liggitt

@justaugustus
Copy link
Member Author

@justaugustus – Do you think this merits a communication to k/dev?

@nikhita's initial note to k-dev should suffice at this stage: https://groups.google.com/g/kubernetes-dev/c/jvRPIscaDek/m/1KWEUYXDBQAJ.

@liggitt
Copy link
Member

liggitt commented Sep 30, 2020

The only impact I can think of for new repos would be that the git.k8s.io redirector (http://git.k8s.io/$repo/$path going to https://github.com/kubernetes/$repo/tree/master/$path, e.g. http://git.k8s.io/community/sig-apps) would not work properly.

@nikhita
Copy link
Member

nikhita commented Sep 30, 2020

Starting on October 1, 2020: newly-created repositories will default to main: https://github.com/github/renaming#on-october-1-2020-newly-created-repositories-will-default-to-main

Just to ensure we are on the same page - when we create a new repo in a Kubernetes org after Oct 1, we will set the default branch to master for now, correct? IIUC we'll move all our repos to the main default branch once GitHub solves the issues listed here - https://github.com/github/renaming#later-this-year-seamless-move-for-existing-repositories-

@nikhita
Copy link
Member

nikhita commented Sep 30, 2020

xref kubernetes/website#21749 - k/website issue about changing their default branch to live

@mrbobbytables
Copy link
Member

The only impact I can think of for new repos would be that the git.k8s.io redirector (http://git.k8s.io/$repo/$path going to https://github.com/kubernetes/$repo/tree/master/$path, e.g. http://git.k8s.io/community/sig-apps) would not work properly.

I think this has been handled by their default redirect: https://github.blog/changelog/2020-07-17-links-to-deleted-branches-now-redirect-to-the-default-branch/

It does mean things would be redirected twice, but that's probably the best scenario for the interim till everything has been switched over.

@liggitt
Copy link
Member

liggitt commented Sep 30, 2020

I think this has been handled by their default redirect: https://github.blog/changelog/2020-07-17-links-to-deleted-branches-now-redirect-to-the-default-branch/

I'm not sure... that seems to only apply to deleted branches. A new repo that only had a main branch would not have a deleted master branch that would trigger that, right?

@nikhita
Copy link
Member

nikhita commented Sep 30, 2020

The only impact I can think of for new repos would be that the git.k8s.io redirector (http://git.k8s.io/$repo/$path going to https://github.com/kubernetes/$repo/tree/master/$path, e.g. http://git.k8s.io/community/sig-apps) would not work properly.

I think we should flip the default branch for all repos at once. We'll also need to update our automation (prow, etc). For git.k8s.io specifically, we'll need to update:

https://github.com/kubernetes/k8s.io/blob/08581c1cd0937d893f0d1ffdfec8ceb8d7aa8356/k8s.io/configmap-nginx.yaml#L215-L223

@mrbobbytables
Copy link
Member

I'm not sure... that seems to only apply to deleted branches. A new repo that only had a main branch would not have a deleted master branch that would trigger that, right?

You're right. GitHub has confirmed it as well 👍

As just about all our repos are generated off the kubernetes-template-project, they will have a default branch name of master unless we change it there.

I think we should flip the default branch for all repos at once. We'll also need to update our automation (prow, etc). For git.k8s.io specifically, we'll need to update:

Before flipping I do think we should test. It will mean the redirector won't work for the ones we do decide to test, but I think thats an acceptable trade-off for now.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 29, 2020
@nikhita
Copy link
Member

nikhita commented Dec 30, 2020 via email

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 30, 2020
@spiffxp
Copy link
Member

spiffxp commented Jan 28, 2021

/priority important-longterm
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Jan 28, 2021
@spiffxp
Copy link
Member

spiffxp commented Jun 30, 2021

Pulling down from the description edit I just made:

There are currently 17/243 repos (~7%) that have had their branches renamed.

We need to regroup on the easiest way to track and delegate this. Manually updating a GitHub issue description isn't it, but I thought it would help to see the info here.

@rikatz
Copy link
Contributor

rikatz commented Aug 2, 2021

ingress-nginx is already using main and dev-v1 as the branches.

@justaugustus
Copy link
Member Author

Placeholder enhancement tracking issue for kubernetes/kubernetes repo: kubernetes/enhancements#2853

@spiffxp
Copy link
Member

spiffxp commented Aug 17, 2021

/milestone v1.23

@spiffxp
Copy link
Member

spiffxp commented Sep 24, 2021

FYI: we finally wrapped kubernetes/k8s.io#1597 for kubernetes/k8s.io. There were lots of links to the old branch name littered throughout project repos

@fabriziopandini
Copy link
Member

fabriziopandini commented Nov 9, 2021

quick update from the cluster-api land

@elmiko
Copy link
Contributor

elmiko commented Nov 9, 2021

hey @fabriziopandini , here is the issue where we tracked the change for kubemark, we did not have a pull request though.

kubernetes-sigs/cluster-api-provider-kubemark#6

@BenTheElder
Copy link
Member

This should probably have a different milestone, if any.

This issue seems out of sync / out of date with work tracked elsewhere.
For anyone else interested, see e.g. https://k8s.dev/rename in particular / kubernetes/community#5636

@mrueg
Copy link
Member

mrueg commented Dec 12, 2022

Quick update here: Kubernetes/kube-state-metrics is done as per kubernetes/kube-state-metrics#1554

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/github-management Issues or PRs related to GitHub Management subproject lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/contributor-experience Categorizes an issue or PR as relevant to SIG Contributor Experience. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/testing Categorizes an issue or PR as relevant to SIG Testing. wg/naming Categorizes an issue or PR as relevant to WG Naming.
Projects
None yet
Development

No branches or pull requests