-
Notifications
You must be signed in to change notification settings - Fork 1k
dep does not import kubernetes/client-go correctly #1207
Comments
hi! and ugh, sorry for slow response - i'd flipped a switch in my mind that said "this is subsumed by #1124, and doesn't need to be addressed separately." and, while i expect that a satisfactory solution to #1124 would result in this not being a problem, this should still be able to be addressed today. it's quite likely that your issue is with some dependency of |
Hi, I have this same issue. I tried adding the constraint for apimachinnery in the toml file, and update the lock file to the right branch/revision, but it did not work either. I've attached the original files generated by dep. |
As commented in kubernetes/client-go#298 ,
in |
Thanks, that worked for me. |
Hi all - I've created a little tool 'godep-to-dep' to try and make this easier/fix it upstream https://github.com/munnerz/godep-to-dep If we can integrate this tool with our release process, we should be able to ship Gopkg.toml files out of the box. |
v6.0.0 appears to be working via dep for me now, not sure if it's by design or luck.
|
It's because they swapped out |
What is the current status of this issue? I am currently getting this error trying to use See below:
See also:
|
|
It appears your own code is not up to date with recent versions of the
codebase. You'll need to update your code to compile against client-go
7.0.0 (or at least, all your code should reference valid packages @ that
dependency version).
TL;DR: replace all k8s.io/pkg/api with k8s.io/api imports (their new home).
Btw - easiest way to start this process would be to remove your vendor dir
and check out the versions of k8s.io/* you want to use on your gopath.
Future upgrades won't be as bad - but because your own code is relying on
such an old v of k8s.Io/*, more significant work is required!
…On Sat, 9 Jun 2018 at 02:21, Alexander Staubo ***@***.***> wrote:
The above workarounds don't seem to work these days because of #1306
<#1306>:
Solving failure: No versions of k8s.io/client-go met constraints:
v7.0.0: Could not introduce ***@***.***, as its subpackage k8s.io/client-go/pkg/api/v1 is missing. (Package is required by (root).)
[...]
Very frustrating.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1207 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAMbP2pUvJAZjM2MHLh8ShG1ZNogJNapks5t6yMAgaJpZM4PhPIg>
.
|
@munnerz Thanks, you're right. I edited my comment after I realized that I was referencing packages that had been moved. (I've never liked Dep's behaviour, where it reads your imports to determine your dependencies, as opposed to requiring explicit declarations in |
What version of
dep
are you using (dep version
)?0.3.1
What
dep
command did you run?Dep does not seem to import kubernetes/client-go code correctly. After stubbing my toe a bit on this with more complex examples, I decided to simplify and see if I could get it working with the very basic example code at https://github.com/kubernetes/client-go/blob/release-4.0/examples/in-cluster-client-configuration/main.go
I used the following Gopkg.toml file:
After getting the code in place and running dep ensure, I get the following errors when trying to compile the code:
I also tried with this additional constraint, which I've seen listed as required in a few different places. I had similar (nonworking) results.
Originally I was thinking client-go or one of it's dependencies was just broken, so I decided to give it a try with glide. I was able to get the exammple working with the following glide.yaml:
And finally, I'm not sure if they are useful here, but this is the result of
dep hash-inputs
:I'm happy to provide the .lock files generated by both dep and glide if that would be helpful. This seems like it may be related to #1124.
Thanks for all the effort going into making dep awesome!
The text was updated successfully, but these errors were encountered: