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

Kuberentes client no longer compiles due to change in docker repo #18774

Closed
tnine opened this issue Dec 16, 2015 · 9 comments
Closed

Kuberentes client no longer compiles due to change in docker repo #18774

tnine opened this issue Dec 16, 2015 · 9 comments
Labels
kind/support Categorizes issue or PR as a support question. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@tnine
Copy link

tnine commented Dec 16, 2015

Hi all,
I'm attempting to write some kubernetes clients in go. I'm attempting to download the latest client, and it fails with the following error.

 go get "k8s.io/kubernetes/pkg/client/unversioned"
# k8s.io/kubernetes/pkg/util/parsers
/Users/apigee/.go/src/k8s.io/kubernetes/pkg/util/parsers/parsers.go:30: undefined: parsers.ParseRepositoryTag

It appears the "ParseRepositoryTag" function has been removed from the latest docker client.

@tnine
Copy link
Author

tnine commented Dec 16, 2015

After going through the history, it appears it was removed in this commit. It's been removed here.

moby/moby@4352da7#diff-8a4a471eeec9e5954d06c11472eb5044L113

However, there doesn't appear to be any documentation on where equivalent functionality is provided.

Aside from copying the Godeps from the kubernetes source tree with a release tag into my own repo, is there any other methodology for addressing this problem?

@ncdc
Copy link
Member

ncdc commented Dec 16, 2015

Kubernetes uses Godeps to vendor in dependent code, such as github.com/docker/docker. We bump the vendored code and fix any breakages at that time. Unfortunately, when you're trying to use something that just imports k8s.io/kubernetes and have it work with github.com/docker/docker both at HEAD, you may run into an issue like this. In the short term, if you can use Godeps, you can version lock both kubernetes and docker to the appropriate revisions in your project.

@ncdc
Copy link
Member

ncdc commented Dec 16, 2015

And btw, ParseRepositoryTag was replaced with reference.Parse* from github.com/docker/distribution

@tnine
Copy link
Author

tnine commented Dec 16, 2015

Hi @ncdc Thanks for the help. I've been playing around with this and not having a lot of luck. I've tried the following.

  1. Clone the source
  2. git checkout v1.1.3
  3. ./hack/build-go.sh
  4. cp -r Godeps/_workspace/ $GOPATH/ to copy the dependencies and the source to my local gopath
  5. godeps save in my own project to copy them from my global $GOPATH into my dependencies.

However, I receive quite a few errors when godeps does not understand the copied git repo

Obviously this doesn't work, it seems I don't have the Kubernetes source from the hack build. What are the steps to developing with the Kubernetes client and go? I'm new to both Kubernetes and go, unfortunately there isn't any documentation on getting running with the go client.

https://github.com/kubernetes/kubernetes/tree/release-1.1/pkg/client/

I'd be happy to contribute to the documentation once I have some instructions. I'm just not sure where I should start.

@j3ffml j3ffml added the kind/support Categorizes issue or PR as a support question. label Dec 17, 2015
@j3ffml
Copy link
Contributor

j3ffml commented Dec 17, 2015

@tnine the build setup for development is a bit finicky. The development guide is a good place to start. There's a section on godeps that should help you fix your setup.

@jdoliner
Copy link

Has there been any activity on this? I see a number of things in the referenced issue but I'm still seeing this error with vendored code.

Is there a reason that the code hasn't been updated to use the reference.Parse yet? It seems like that supports identical functionality.

@bgrant0607 bgrant0607 added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed team/none labels Feb 12, 2016
@bgrant0607
Copy link
Member

@jdoliner Unfortunately, our code isn't factored in such a way to be go gettable, in whole or in part.

We also don't yet have a client library we support for other users.

In the meantime, you could check out kubelite:
https://github.com/technosophos/kubelite

If you'd like to help, I recommend checking out the API machinery SIG.
https://github.com/kubernetes/kubernetes/wiki/SIG-API-Machinery

See also #5660 and #20193

cc @lavalamp @caesarxuchao

@lavalamp
Copy link
Member

1.2 is going to have a version-locked client available. But it will still have an overly broad import dependency tree. We will fix that over time.

2opremio pushed a commit to weaveworks/scope that referenced this issue Feb 16, 2016
This caused a dependency chain reaction (sigh):

* All the k8s packages had to be fetched again. This in turn required:
  * Pining github.com/docker/docker/pkg/parsers to
    0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d to cirvumvent
    kubernetes/kubernetes#18774
  * Update github.com/juju/ratelimit
  * Make probe/kubernetes/client.go comply with API changes.
2opremio pushed a commit to weaveworks/scope that referenced this issue Feb 16, 2016
This caused a dependency chain reaction (sigh):

* All the k8s packages had to be fetched again. This in turn required:
  * Pining github.com/docker/docker/pkg/parsers to
    0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d to cirvumvent
    kubernetes/kubernetes#18774
  * Update github.com/juju/ratelimit
  * Make probe/kubernetes/client.go comply with API changes.
2opremio pushed a commit to weaveworks/scope that referenced this issue Feb 16, 2016
This caused a dependency chain reaction (sigh):

* All the k8s packages had to be fetched again. This in turn required:
  * Pining github.com/docker/docker/pkg/parsers to
    0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d to cirvumvent
    kubernetes/kubernetes#18774
  * Update github.com/juju/ratelimit
  * Make probe/kubernetes/client.go comply with API changes.
2opremio pushed a commit to weaveworks/scope that referenced this issue Feb 16, 2016
This caused a dependency chain reaction (sigh):

* All the k8s packages had to be fetched again. This in turn required:
  * Pining github.com/docker/docker/pkg/parsers to
    0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d to cirvumvent
    kubernetes/kubernetes#18774
  * Update github.com/juju/ratelimit
  * Make probe/kubernetes/client.go comply with API changes.
2opremio pushed a commit to weaveworks/scope that referenced this issue Feb 16, 2016
This caused a dependency chain reaction (sigh):

* All the k8s packages had to be fetched again. This in turn required:
  * Pining github.com/docker/docker/pkg/parsers to
    0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d to cirvumvent
    kubernetes/kubernetes#18774
  * Update github.com/juju/ratelimit
  * Make probe/kubernetes/client.go comply with API changes.
2opremio pushed a commit to weaveworks/scope that referenced this issue Feb 16, 2016
This caused a dependency chain reaction (sigh):

* All the k8s packages had to be fetched again. This in turn required:
  * Pining github.com/docker/docker/pkg/parsers to
    0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d to cirvumvent
    kubernetes/kubernetes#18774
  * Update github.com/juju/ratelimit
  * Make probe/kubernetes/client.go comply with API changes.
2opremio pushed a commit to weaveworks/scope that referenced this issue Feb 16, 2016
This caused a dependency chain reaction (sigh):

* All the k8s packages had to be fetched again. This in turn required:
  * Pining github.com/docker/docker/pkg/parsers to
    0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d to cirvumvent
    kubernetes/kubernetes#18774
  * Update github.com/juju/ratelimit
  * Make probe/kubernetes/client.go comply with API changes.
@eparis
Copy link
Contributor

eparis commented Apr 6, 2016

To work with godeps and kube you basically need to do:

go get -u k8s.io/kubernetes
cd $GOPATH/src/k8s.io/kubernetes
godep restore

That should get both your $GOPATH and the stuff in Godep/_workspace 'the same'. and should let you do your own builds without using the hack/ scripts, as it seems you are trying to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

7 participants