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" #749

Closed
10 of 19 tasks
vincepri opened this issue Jul 2, 2020 · 17 comments
Closed
10 of 19 tasks

Change default branch to "main" #749

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/active Indicates that an issue or PR is actively being worked on by a contributor. 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

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.

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

    • e.g. using git to auto-detect
    # for existing clones, update their view of the remote
    git fetch origin
    git remote set-head origin -a
    # for new clones, or those updated as above, this prints "main" post-rename
    echo $(git symbolic-ref refs/remotes/origin/HEAD)
    • e.g. using github's api to auto-detect
    # gh is https://github.com/cli/cli, this will print "main" post-rename
    gh api /repos/kubernetes-sigs/slack-infra | jq -r .default_branch
  • If the repo has netlify configured for it, ask a member of the GitHub
    Management Team to rename the master branch to main in the netlify site config.
    It can't be controlled through the netlify config in the repo.

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.

  • If the [branch_protection] prow config references the master branch,
    remove it from the config.

Other

  • If any docs reference the master branch, update to main
    (URLs will be automatically redirected).

  • Ensure that CI and PR tests work fine.

    • If there are any outstanding PRs you can /approve to merge, do so to verify
      that presubmits and postsubmits work as expected
  • Trial the local development experience with a pre-rename clone.

    • ensure [Github instructions to rename your local branch] work
    • consider updating your fork's default remote branch name such that if you
      have git autocompletion enabled, typing ma<tab> will autocomplete to main
  • 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].

@k8s-ci-robot
Copy link
Contributor

@vincepri: You must be a member of the kubernetes-sigs/cluster-api-provider-azure-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Cluster API Provider Azure Maintainers and have them propose you as an additional delegate for this responsibility.

In response to this:

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

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.

@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
@CecileRobertMichon CecileRobertMichon modified the milestones: next, v0.4.x Jul 10, 2020
@CecileRobertMichon
Copy link
Contributor

ref https://github.com/github/renaming/

@CecileRobertMichon CecileRobertMichon modified the milestones: v0.4.7, next Jul 22, 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 Oct 20, 2020
@CecileRobertMichon
Copy link
Contributor

/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 Oct 20, 2020
@vincepri
Copy link
Member Author

/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 Oct 21, 2020
@nader-ziada
Copy link
Contributor

this is a guide with the required steps: https://www.kubernetes.dev/resources/rename/

It is recommended to do with when is a small number of PRs since all the prow jobs will be re-triggered for active PRs

@CecileRobertMichon CecileRobertMichon modified the milestones: next, v0.5.x Mar 18, 2021
@CecileRobertMichon
Copy link
Contributor

/assign
/assign @mboersma
/lifecycle active

@k8s-ci-robot k8s-ci-robot added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. and removed lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. labels Aug 12, 2021
@CecileRobertMichon
Copy link
Contributor

CecileRobertMichon commented Aug 13, 2021

Added checklist in issue description above. I will start making the changes in "anytime".

@CecileRobertMichon
Copy link
Contributor

@mboersma would you be able to take the "just before rename" steps?

@mboersma
Copy link
Contributor

@CecileRobertMichon sure, I'll get on that now.

@mboersma
Copy link
Contributor

@CecileRobertMichon
Copy link
Contributor

CecileRobertMichon commented Aug 16, 2021

@nader-ziada @devigned @alexeldeib @shysank FYI planning on doing the rename tomorrow around 11 am (PT)

All contributors will need to follow these instructions for renaming their local branch.

@CecileRobertMichon
Copy link
Contributor

@mboersma we also need to change the CAPI quickstart instructions for installing Calico after the branch has been renamed https://cluster-api.sigs.k8s.io/user/quick-start.html#deploy-a-cni-solution

@CecileRobertMichon
Copy link
Contributor

another one: we need to change any GitHub action referring to "master" to use "main"

I'll take this

@mboersma
Copy link
Contributor

mboersma commented Aug 17, 2021

we also need to change the CAPI quickstart instructions

Yes, I hadn't pounced on that yet since it's a post-rename activity, but I'll make a docs change PR now.

@mboersma
Copy link
Contributor

/close

The switch to main branch was completed a few weeks ago.

@k8s-ci-robot
Copy link
Contributor

@mboersma: Closing this issue.

In response to this:

/close

The switch to main branch was completed a few weeks ago.

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/active Indicates that an issue or PR is actively being worked on by a contributor. wg/naming Categorizes an issue or PR as relevant to WG Naming.
Projects
None yet
Development

No branches or pull requests

6 participants