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 kubernetes/kubernetes default branch name to main #2853

Open
4 tasks
justaugustus opened this issue Aug 9, 2021 · 14 comments
Open
4 tasks

Changing kubernetes/kubernetes default branch name to main #2853

justaugustus opened this issue Aug 9, 2021 · 14 comments
Assignees
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. wg/naming Categorizes an issue or PR as relevant to WG Naming.
Projects
Milestone

Comments

@justaugustus
Copy link
Member

justaugustus commented Aug 9, 2021

Enhancement Description

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

@justaugustus justaugustus added this to Untriaged in SIG Release via automation Aug 9, 2021
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Aug 9, 2021
@justaugustus
Copy link
Member Author

justaugustus commented Aug 9, 2021

/assign @justaugustus @cpanato
/sig release
/area release-eng
/wg naming
/milestone v1.24

@k8s-ci-robot k8s-ci-robot added sig/release Categorizes an issue or PR as relevant to SIG Release. area/release-eng Issues or PRs related to the Release Engineering subproject wg/naming Categorizes an issue or PR as relevant to WG Naming. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 9, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Aug 9, 2021
@justaugustus justaugustus moved this from Untriaged to Triaged/backlog in SIG Release Aug 9, 2021
@cpanato cpanato moved this from Triaged/backlog to In progress in SIG Release Oct 11, 2021
@liggitt
Copy link
Member

liggitt commented Oct 11, 2021

What's the downstream impact of tools and processes and developers using the master branch? Will GitHub redirect those automatically or will they all need to be modified?

@cpanato
Copy link
Member

cpanato commented Oct 11, 2021

when we make the branch rename, all PRs that point to the master branch will be updated automatically to the main branch

for the local dev the users will need to update the branch to point to the new one, GitHub have a page to explain in how to do that https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch#updating-a-local-clone-after-a-branch-name-changes

@liggitt
Copy link
Member

liggitt commented Oct 11, 2021

what about all CI flows, sync flows, and downstream consumers of the kubernetes/kubernetes repo?

@cpanato
Copy link
Member

cpanato commented Oct 11, 2021

ci/sync flows on our side we will make the changes and we can monitor issues

for downstream consumers will be more tricky, we will communicate the change but not sure how to deal with that

in the GitHub UI when you access the fork GH notifies the branch changed in the upstream, so users can notice that

@liggitt
Copy link
Member

liggitt commented Oct 11, 2021

for downstream consumers will be more tricky, we will communicate the change but not sure how to deal with that

It's important to understand the scope of that impact for the highest-use repo we have. Is there a way to quantify or survey how much would break on this rename?

@cpanato
Copy link
Member

cpanato commented Nov 19, 2021

I don't know how we can do that, maybe we can send an announcement to our mailing list and spread the word via social media?
Also, GitHub give some alerting https://github.com/github/renaming

  • Show a notice to repository contributors, maintainers, and admins on the repository homepage with instructions to update local copies of the repository
  • Show a notice to contributors who git push to the old branch
  • Redirect web requests for the old branch name to the new branch name
  • Return a "Moved Permanently" response in API requests for the old branch name

@BenTheElder
Copy link
Member

BenTheElder commented Nov 19, 2021

Is there a way to quantify or survey how much would break on this rename?

https://github.com/kubernetes/kubernetes/graphs/traffic gives some idea I guess (the git clones metrics), but automation vs manual clones is not clear, and not to which branch etc...

Renaming breaks git workflows that explicitly use master. It's possible to avoid this and detect the default branch but doing so is a bit clunky and not widespread.

For Kubernetes most of our CI jobs are configured such that this requires no changes, because we do the following:

  • presubmit and postsubmit configurations exclude release branches, or target a specific release branch, rather than targeting master
  • periodic jobs largely consume binary builds from the build job, via GCS, without talking to GitHub at all

A handful of periodic jobs will need upating.

Downstream consumers will need to switch over themselves, but most downstreams are likely consuming release branches / tagged releases, for folks consuming HEAD of master I'd expect most of them to be in our developer mailinglists.

For workflows other than git automation, (inbound web links etc.), github will do a redirect from the renamed branch to the new name anyhow, so nothing should really break there. For manual clones this will just be the new default.

For local existing git clones, you just need to get in the habit of referencing main instead of master.

Shell git aliases can be updated to use one of the detection tricks (we can email out guidance, IIRC @cblecker shared a robust one some time back).

EDIT: we actually provide this in the rename issue repo template kubernetes/kubernetes#105601, https://www.kubernetes.dev/resources/rename/#just-before-rename

@BenTheElder
Copy link
Member

BenTheElder commented Nov 19, 2021

Git workflows also could avoid explicitly naming the default branch since a simple git clone will clone and checkout the default branch, we should really update to do this ourselves kubernetes/test-infra#20667 & kubernetes/test-infra#20672

@k8s-triage-robot
Copy link

k8s-triage-robot commented May 10, 2022

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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 May 10, 2022
@jeremyrickard
Copy link
Contributor

jeremyrickard commented May 10, 2022

/remove-lifecycle stale

@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 May 10, 2022
@k8s-triage-robot
Copy link

k8s-triage-robot commented Aug 8, 2022

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/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 Aug 8, 2022
@cpanato
Copy link
Member

cpanato commented Aug 8, 2022

/remove-lifecycle stale

@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 Aug 8, 2022
@BenTheElder
Copy link
Member

BenTheElder commented Sep 22, 2022

something else to consider: staging repos kubernetes/kubernetes#111980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. wg/naming Categorizes an issue or PR as relevant to WG Naming.
Projects
SIG Release
  
In progress
Development

No branches or pull requests

7 participants