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

Change default branch to "main" #1026

Closed
vincepri opened this issue Jul 2, 2020 · 17 comments
Closed

Change default branch to "main" #1026

vincepri opened this issue Jul 2, 2020 · 17 comments
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. wg/naming Categorizes an issue or PR as relevant to WG Naming.
Milestone

Comments

@vincepri
Copy link
Member

vincepri commented Jul 2, 2020

Once the community agrees on the naming, we need to change our default development branch to main, and check that any tools or references to it are changed as well.

This includes the container image tag used in development.

/kind cleanup
/wg naming
/milestone Next

@k8s-ci-robot k8s-ci-robot added this to the Next milestone Jul 2, 2020
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. wg/naming Categorizes an issue or PR as relevant to WG Naming. labels Jul 2, 2020
@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 Sep 30, 2020
@vincepri
Copy link
Member Author

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 30, 2020
@sbueringer
Copy link
Member

I unfortunately don't really have time to do it myself, but is this something that we might want to tackle soon @vincepri?

@sbueringer
Copy link
Member

sbueringer commented Feb 12, 2023

https://www.kubernetes.dev/resources/rename/

Steps:

Prerequisites

  • Create an issue in your repo to track the branch rename.
    You can paste this checklist in the issue body.

  • If you are not a root approver for the repo, assign a root
    approver for approval.

  • Once the issue has been approved, send a notice to your SIG's
    mailing list about the potential branch rename.

Changes pre-rename

Make the following changes before renaming the branch the master branch.

Note: There might be additional changes required that have not been
covered in this checklist.

Anytime

These changes are non-disruptive and can be made anytime before renaming
the branch.

  • If a presubmit or postsubmit prowjob triggers on the master branch
    (branches field of the prowjob), add the main branch to the list

  • If the [milestone_applier] prow config references the master branch => milestone applier not used by CR

  • If the [branch_protection] prow config references the master branch => not configured for CR

Just before rename

These changes are disruptive and should be made just before renaming the
branch.

  • For periodic prowjobs, or any prowjob that mentions the master branch
    in base_ref, update them to the main branch. Ensure that these changes
    happen in lock-step with the branch rename (jobs triggered in between landing
    these changes and renaming the branch will fail).

  • If a prowjob mentions master in its name, rename the job to not include
    the branch name, e.g. pull-repo-verify-master -> pull-repo-verify.
    [status-reconciler] should automatically migrate PR status contexts to the
    new job name, and retrigger accordingly, but we have anecdotally found it
    sometimes misses changes.

    • NOTE: our infrastructure doesn't understand the concept of job renames, so
      from the perspective of e.g. https://testgrid.k8s.io the job will appear to
      have lost history and start from scratch.
  • If a prowjob calls scripts or code in your repo that explicitly
    reference master, update all references to use main, or auto-detect the
    remote branch => does not apply

  • If the repo has netlify configured for it, ask a member of the GitHub => Netlify is not used

Approval

  • Once all non-disruptive tasks have been completed and disruptive tasks
    have been identified, assign the GitHub Management team (@kubernetes/owners)
    for approval.

Rename the default branch

  • Rename the default branch from master to main using the GitHub UI
    by following the official instructions.

Changes post-rename

After the default branch has been renamed to main, make the following
changes.

Note: There might be additional changes required that have not been
covered in this checklist.

Prowjobs

Prow config

  • If the [milestone_applier] prow config references the master branch,
    remove it from the config. => does not apply

  • If the [branch_protection] prow config references the master branch,
    remove it from the config. => does not apply

Other

@sbueringer
Copy link
Member

/assign

@sbueringer
Copy link
Member

sbueringer commented Feb 12, 2023

Once the issue has been approved, send a notice to your SIG's mailing list about the potential branch rename.

@vincepri @joelanford @alvaroaleman @FillZpp Any objections?

Also WDYT should we send a mail out before the rename or just afterwards (something like this https://groups.google.com/g/kubernetes-sig-cluster-lifecycle/c/b8B-VKk2LUQ/m/v5_6soszAAAJ)

@vincepri
Copy link
Member Author

Sounds good! Thank you for taking care of this

@FillZpp
Copy link
Contributor

FillZpp commented Feb 13, 2023

+1 for my part. Looks like we should we send a mail first according to the prerequisites?

@sbueringer
Copy link
Member

+1 for my part. Looks like we should we send a mail first according to the prerequisites?

Not sure, that's why I was asking 🙂

@joelanford
Copy link
Member

+1 from me as well. I'd suggest message to the mailing list before and after, I think.

@sbueringer
Copy link
Member

@sbueringer
Copy link
Member

PR with all the necessary changes before we can actually rename the branch in the repo: kubernetes/test-infra#28742

@sbueringer
Copy link
Member

sbueringer commented Feb 14, 2023

Once all non-disruptive tasks have been completed and disruptive tasks
have been identified, assign the GitHub Management team (@kubernetes/owners)
for approval.

@nikhita Would be great if you can take a look. Thank you :)

Right now we're waiting to see if there are any objections on the mail: https://groups.google.com/g/kubernetes-sig-api-machinery/c/KfSVRcA_JC4 (which seems very very unlikely)

Then we merge this PR: kubernetes/test-infra#28742

And would go ahead with actually renaming the branch in the repo early next week.

@nikhita
Copy link
Member

nikhita commented Feb 15, 2023

Once all non-disruptive tasks have been completed and disruptive tasks
have been identified, assign the GitHub Management team (@kubernetes/owners)
for approval.

@nikhita Would be great if you can take a look. Thank you :)

Looks great! Let's :shipit: when lazy consensus is achieved!

@vincepri
Copy link
Member Author

For folks trying to update local environments:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

@sbueringer
Copy link
Member

All done

Let us know if any issues occur, but looks all good from my side.

/close

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closing this issue.

In response to this:

All done

Let us know if any issues occur, but looks all good from my side.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. wg/naming Categorizes an issue or PR as relevant to WG Naming.
Projects
None yet
Development

No branches or pull requests

7 participants