kubernetes / org

Meta configuration for Kubernetes Github Org
Apache License 2.0
240 stars 687 forks source link

Rename default branch for kubernetes/org #2466

Closed spiffxp closed 3 years ago

spiffxp commented 3 years ago

Part of umbrella issue https://github.com/kubernetes/org/issues/2222

Issue to spec out and then run through renaming the default branch for this repository

/sig contributor-experience /area github-management owns the repo /sig testing to discover any prow issues /milestone v1.21 /priority important-soon /assign @spiffxp I plan on working through this

k8s-ci-robot commented 3 years ago

@spiffxp: The provided milestone is not valid for this repository. Milestones in this repository: [v1.19, v1.20]

Use /milestone clear to clear the milestone.

In response to [this](https://github.com/kubernetes/org/issues/2466): >Issue to spec out and then run through renaming the default branch for this repository > >- update pre/postsubmits to trigger on old branch name and new branch name >- determine whether periodics use default branch or have name hardcoded in git commands > - if hardcoded, does attempting to checkout old name break? >- determine whether branch name is part of any job names >- determine if any docs need to be updated >- send notice >- rename branch (ref: https://github.com/github/renaming#renaming-existing-branches) >- if necessary, update periodics to refer to new branch name >- if necessary, rename jobs >- update branch protection config >- update jobs to only trigger on new branch name >- make sure things still work > - keep an eye on ci and prs for a bit > - trial the local development experience with pre-rename clone >- send notice > >/sig contributor-experience >/area github-management >owns the repo >/sig testing >to discover any prow issues >/milestone v1.21 >/priority important-soon >/assign @spiffxp >I plan on working through this Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
spiffxp commented 3 years ago

/milestone v1.21

spiffxp commented 3 years ago

prowjob configs:

prowjob names:

prowjob contents:

prow configs:

docs:

spiffxp commented 3 years ago

OK I'm going to click the button... Screen Shot 2021-01-29 at 2 31 22 PM

justaugustus commented 3 years ago

Do itttttt 🎉 ✨ /pony party

k8s-ci-robot commented 3 years ago

@justaugustus: pony image

In response to [this](https://github.com/kubernetes/org/issues/2466#issuecomment-770006709): >Do itttttt 🎉 ✨ >/pony party Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
spiffxp commented 3 years ago

Pushed the button.

Slack alerter fired:

Screen Shot 2021-01-29 at 2 40 19 PM

presubmits for open PRs and postsubmits were retriggered: Screen Shot 2021-01-29 at 2 40 50 PM

visiting the repo via the website now shows a popup Screen Shot 2021-01-29 at 2 41 46 PM

spiffxp commented 3 years ago

Doing a PR via the UI already uses the correct branch name. I happen to use hub pull-request a lot locally, let me see what that experience is like...

trying hub pull-request from a local copy of the repo that hasn't been updated at all:

$ hub pull-request
Error creating pull request: Unprocessable Entity (HTTP 422)
Invalid value for "base"

trying git fetch from a local copy of the repo that hasn't been updated at all

$ git fetch origin master
fatal: couldn't find remote ref master

updated per their instructions

git branch -m master main
git fetch origin
git branch -u origin/main main

hub pull-request still not working...

Fetch origin as I usually do...

$ git fetch --prune origin
From github.com:kubernetes/org
 - [deleted]           (none)     -> origin/master
   (refs/remotes/origin/HEAD has become dangling)

dangling you say?

$ cat .git/refs/remotes/origin/HEAD
ref: refs/remotes/origin/master

let's update that

$ git remote set-head origin -a
origin/HEAD set to main

hub pull-request works now, yay

spiffxp commented 3 years ago

Sample PR to confirm things still work (without a post-rename PR yet): https://github.com/kubernetes/org/pull/2473

mrbobbytables commented 3 years ago

The pre/post submits getting re-triggered for smaller repos will probably be fine, but I fear what it'd do for k/k 😬

spiffxp commented 3 years ago

Yeah once I wrap this up I'd like to writeup where we got lucky and what we should watch out for to help choose other candidates and identify blockers/mitigations

spiffxp commented 3 years ago

Post-rename cleanup PR merged: https://github.com/kubernetes/test-infra/pull/20669

spiffxp commented 3 years ago

Notice sent to https://groups.google.com/g/kubernetes-dev/c/mKwxJW5z2Lk

spiffxp commented 3 years ago

Where we got lucky:

Lessons learned:

Some mitigations to consider:

spiffxp commented 3 years ago

I'm holding this open until we see the next run of https://testgrid.k8s.io/sig-contribex-org#ci-peribolos to confirm it's using the new branch

spiffxp commented 3 years ago

/close Next run passed, confirmed using main https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs/ci-org-peribolos/1355356401299361792

k8s-ci-robot commented 3 years ago

@spiffxp: Closing this issue.

In response to [this](https://github.com/kubernetes/org/issues/2466#issuecomment-770245483): >/close >Next run passed, confirmed using main https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs/ci-org-peribolos/1355356401299361792 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.