-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Default branch migration #1554
Comments
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
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:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
This is scheduled for Friday 9th Dec. |
Default Branch Migration
This document outlines steps needed to migrate the default branch
of your repo from
master
tomain
.Note: This document is currently a work in progress.
If you have questions about the process, reach out to the GitHub Management Team
on the #github-management channel on slack or open an issue in the kubernetes/org repo.
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 themain
branch to the list(see kubernetes/test-infra#20665 for an example).
If the
milestone_applier
prow config references themaster
branch,add the
main
branch to the config (see kubernetes/test-infra#20675 for an example).If the
branch_protection
prow config references themaster
branch,add the
main
branch to the config.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
branchin
base_ref
, update them to themain
branch. Ensure that these changeshappen in lock-step with the branch rename (jobs triggered in between landing
these changes and renaming the branch will fail).
e.g.
kubernetes/foo=main
. kubernetes/test-infra#20667 may eventuallyallow for non-disruptive changes.
e.g.
base_ref: main
. kubernetes/test-infra#20672 may eventually allowfor non-disruptive changes.
If a prowjob mentions
master
in its name, rename the job to not includethe branch name, e.g.
pull-repo-verify-master
->pull-repo-verify
.status-reconciler
should automatically migrate PR status contexts to thenew job name, and retrigger accordingly, but we have anecdotally found it
sometimes misses changes.
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 usemain
, or auto-detect theremote branch
If the repo has netlify configured for it, ask a member of the GitHub
Management Team to rename the
master
branch tomain
in the netlify site config.It can't be controlled through the netlify config in the repo.
Approval
have been identified, assign the GitHub Management team (@kubernetes/owners)
for approval.
Rename the default branch
master
tomain
using the GitHub UIby following the official instructions.
Changes post-rename
After the default branch has been renamed to
main
, make the followingchanges.
Note: There might be additional changes required that have not been
covered in this checklist.
Prowjobs
master
branch in thebranches
field,remove the
master
branch (see kubernetes/test-infra#20669 for an example).Prow config
If the
milestone_applier
prow config references themaster
branch,remove it from the config.
If the
branch_protection
prow config references themaster
branch,remove it from the config.
Other
If any docs reference the
master
branch, update tomain
(URLs will be automatically redirected).
Ensure that CI and PR tests work fine.
that presubmits and postsubmits work as expected
Trial the local development experience with a pre-rename clone.
have git autocompletion enabled, typing
ma<tab>
will autocomplete tomain
Send a notice about the branch rename to your SIG's mailing list.
Include the link to the GitHub instructions to rename your local branch.
Cross-ref: kubernetes/org#2222
The text was updated successfully, but these errors were encountered: