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

Rename repo and default branch #424

Closed
28 tasks done
justaugustus opened this issue Sep 13, 2021 · 5 comments · Fixed by kubernetes/kops#12386
Closed
28 tasks done

Rename repo and default branch #424

justaugustus opened this issue Sep 13, 2021 · 5 comments · Fixed by kubernetes/kops#12386
Assignees
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject kind/feature Categorizes issue or PR as related to a new feature. sig/release Categorizes an issue or PR as relevant to SIG Release.

Comments

@justaugustus
Copy link
Member

justaugustus commented Sep 13, 2021

What would you like to be added:

As we start to integrate promotion tools back into the image promoter repo, I'd like to take the opportunity to:

  • Rename the repo
  • Change the default branch name to main

As both of those touch roughly the same files, I'd like to handle them together.

I have two ideas for repo names, so let's vote!

  1. sigs.k8s.io/kpromo (the name of the artifact promotion CLI tool)
  2. sigs.k8s.io/promo-tools

For other name suggestions, comment here or on this thread: https://kubernetes.slack.com/archives/CJH2GBF7Y/p1631538346069100

Why is this needed

  1. The repo name is unnecessarily long and no longer effectively represents all of the content contained therein
  2. Community-wide effort around Inclusive Naming: Changing default branch names to main kubernetes/org#2222

Default Branch Migration

(Copied from https://k8s.dev/rename)

This document outlines steps needed to migrate the default branch
of your repo from master to main.

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

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.

  • (N/A) 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).

    • For bootstrap-based jobs, ensure the branch is explicitly specified,
      e.g. kubernetes/foo=main. kubernetes/test-infra#20667 may eventually
      allow for non-disruptive changes.
    • For pod-utils based jobs, ensure the branch is explicitly specified,
      e.g. base_ref: main. kubernetes/test-infra#20672 may eventually allow
      for non-disruptive changes.
  • (N/A) 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.
  • (N/A) 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
  • (N/A) 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

  • (N/A) If the milestone_applier prow config references the master branch,
    remove it from the config.

  • (N/A) If the branch_protection prow config references the master branch,
    remove it from the config.

Other

/assign
cc: @kubernetes-sigs/release-engineering

@justaugustus justaugustus added kind/feature Categorizes issue or PR as related to a new feature. wg/k8s-infra sig/release Categorizes an issue or PR as relevant to SIG Release. area/release-eng Issues or PRs related to the Release Engineering subproject labels Sep 13, 2021
@justaugustus justaugustus added this to Backlog in Container Image Promoter via automation Sep 13, 2021
@justaugustus justaugustus added this to Backlog in Release Engineering (k-sigs) via automation Sep 13, 2021
@justaugustus justaugustus moved this from Backlog to In progress in Container Image Promoter Sep 13, 2021
@justaugustus justaugustus moved this from Backlog to In progress in Release Engineering (k-sigs) Sep 13, 2021
@justaugustus
Copy link
Member Author

justaugustus commented Sep 13, 2021

Votes so far:

@justaugustus
Copy link
Member Author

@justaugustus
Copy link
Member Author

Opened a PR for the repo rename: kubernetes/test-infra#23605

@justaugustus
Copy link
Member Author

Will be completed via kubernetes/k8s.io#2752.
/close

@k8s-ci-robot
Copy link
Contributor

@justaugustus: Closing this issue.

In response to this:

Will be completed via kubernetes/k8s.io#2752.
/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.

Container Image Promoter automation moved this from In progress to Done Sep 22, 2021
Release Engineering (k-sigs) automation moved this from In progress to Done Sep 22, 2021
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 kind/feature Categorizes issue or PR as related to a new feature. sig/release Categorizes an issue or PR as relevant to SIG Release.
Development

Successfully merging a pull request may close this issue.

2 participants