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

PROOF OF CONCEPT: Make go-get fetch client-go release-1.5 branch #49

Closed
wants to merge 1 commit into from

Conversation

sttts
Copy link
Contributor

@sttts sttts commented Feb 4, 2017

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 4, 2017
@sttts
Copy link
Contributor Author

sttts commented Feb 4, 2017

Not sure this is nice.

@k8s-reviewable
Copy link

This change is Reviewable

@lavalamp
Copy link
Member

lavalamp commented Feb 6, 2017

@caesarxuchao there was a reason we didn't do this, right? Can you remember what it was?

@thockin
Copy link
Member

thockin commented Feb 6, 2017

Fascinating trick. I am strangely OK with this... I think..

@thockin
Copy link
Member

thockin commented Feb 6, 2017

The alternative to depending on a random third-party FREE website would be to run our own instance of gopkg.

@lavalamp
Copy link
Member

lavalamp commented Feb 6, 2017 via email

@sttts
Copy link
Contributor Author

sttts commented Feb 6, 2017

@lavalamp just create /etc/hosts alias for k8s.io pointing to 127.0.0.1 and serve the client-go file with the changed contents using some webserver:

<html><head>
  <meta name="go-import" content="k8s.io/client-go git https://gopkg.in/kubernetes/client-go.v1">
  <meta name="go-source" content="k8s.io/client-go     https://github.com/kubernetes/client-go https://github.com/kubernetes/client-go/tree/release-1.5{/dir} https://github.com/kubernetes/client-go/blob/release-1.5{/dir}/{file}#L{line}">
</head></html>

@caesarxuchao
Copy link
Member

caesarxuchao commented Feb 7, 2017

@sttts @lavalamp Does go get download the code to gopkg.in/kubernetes/client-go.v1 or k8s.io/client-go? I remember it's the former, that means we need to rewrite all the import paths.

@sttts
Copy link
Contributor Author

sttts commented Feb 7, 2017

@caesarxuchao the code goes through gopkg.in's https proxy. But go will use the k8s.io/client-go name, like it does now with calling it k8s.io/client-go and not github.com/kubernetes/client-go.

@sttts
Copy link
Contributor Author

sttts commented Feb 7, 2017

I want to mention one downside of this approach: go get will checkout the code using gopkg.in, i.e. the git remote looks like this:

[remote "origin"]
	url = https://gopkg.in/kubernetes/client-go.v1
	fetch = +refs/heads/*:refs/remotes/origin/*

In other words, a git pull --rebase or probably also go get -u will stay on the v1 branch. If you delete the repo and go get k8s.io/client-go again, you get the new major release, if there is any.

@caesarxuchao
Copy link
Member

the code goes through gopkg.in's https proxy. But go will use the k8s.io/client-go name

That's nice! @lavalamp I think we had tried changing this file to redirect to a stable release, we also had tried using gopkg.in, but we hadn't tried to combine two approaches together like what this PR does.

@thockin
Copy link
Member

thockin commented Feb 7, 2017 via email

@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.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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 Dec 21, 2017
@thockin thockin closed this Dec 23, 2017
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants