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

Fix Update Kubernetes Procedure + Docs #2136

Closed
wants to merge 1 commit into from
Closed

Fix Update Kubernetes Procedure + Docs #2136

wants to merge 1 commit into from

Conversation

stefanmb
Copy link

Problem

The contributor guide instructions for updating k8s do not work out of the box. Step 2 is broken:

cd minikube
./hack/godeps/godep-restore.sh

This step cannot work because the commits referenced in Godeps.json do not actually exist in upstream repositories. They are generated on the local disk of the maintainer by the utility script.

If you try to run Minikube's godep-restore.sh you will get similar errors:

# cd /go/src/k8s.io/api; git pull --ff-only
fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.
# cd /go/src/k8s.io/client-go; git checkout fd59f93b7574e389d897810805348182e136776a
fatal: reference is not a tree: fd59f93b7574e389d897810805348182e136776a

Solution

  1. Remove staging dependencies from Godeps.json during godep-restore.sh
  2. Update docs to reference the correct path to Kubernetes' godep-restore.sh script.

Update k8s instructions
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please email the CNCF helpdesk: [email protected]

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 30, 2017
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@@ -44,7 +44,7 @@ Make sure to also fetch tags, as Godep relies on these.

```shell
git checkout $DESIREDTAG
./hack/godeps/godep-restore.sh
./hack/godep-restore.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like ./hack/godeps/godep-restore.sh is actually the right path? ./hack/godep-restore.sh is the path in kubernetes/kubernetes

We have a script at ./hack/godeps/godep-update-k8s.sh that this doc should probably point to instead.

The right usage for that is KUBE_VERSION=v1.8.1 ./hack/godeps/godep-update-k8s.sh

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reading of those instructions is that they refer to restoring Kubernetes' dependencies (hack/godep-restore.sh) and not Minikube's. Is that incorrect?

@@ -33,6 +33,7 @@ if [ ! -d "${KUBE_ROOT}" ]; then
fi

godep::restore_kubernetes
godep::remove_staging_from_json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, a "restore" shouldn't make your repo dirty.

However, I understand this will break if you have some of the staging libraries cloned from their bot-pushed downstream repos. We have to do this since localkube vendors kubernetes code which references the staging/ libraries directly, rather than the split out repos - and the downstream repos are not synced regularly enough. The contributing doc should note this.

If you remove the staging entries from the godep json, you won't get the right versions of the staging libraries.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So as-is this script will not work with a clean checkout and new GOPATH following the instructions. What is the suggested approach?

@stefanmb
Copy link
Author

Given #2134 I am going to close this issue - I believe the existing documentation is incomplete/broken but there's no point in fixing it if localkube is being deprecated.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 30, 2017
@stefanmb stefanmb closed this Oct 30, 2017
@codecov-io
Copy link

Codecov Report

Merging #2136 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2136      +/-   ##
==========================================
+ Coverage   28.76%   28.78%   +0.01%     
==========================================
  Files          81       81              
  Lines        5322     5322              
==========================================
+ Hits         1531     1532       +1     
+ Misses       3598     3597       -1     
  Partials      193      193
Impacted Files Coverage Δ
pkg/util/kubeconfig/config.go 47.61% <0%> (+0.68%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0175adf...83c853b. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants