-
Notifications
You must be signed in to change notification settings - Fork 596
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
'unknown revision v0.0.0' errors caused by the 'k8s.io/kubernetes' dependency #2490
Comments
running a UPD: as for the regular code, we initialize k8s feature gates in the OCCM cmd:
|
I do not need the command, but as I wrote JetBrain's GoLand executes the command to resolve the dependencies. Since the command fails, the error indicators on the right within a source file look like the red carpet since the IDE can not resolve the imports. I know where the the |
This command is automatically issued by Golang each time repo gets updated, I actually suffer from this too, just was ignoring this. @ProbstDJakob, you can safely ignore it BTW, I assure you. Do So seems like in order to use the K8s testing framework you need to indeed import whole k8s.io/kubernetes. Azure simply doesn't use the framework and GCP doesn't seem to have such test and Alibaba Cloud imports it as we do: https://github.com/kubernetes/cloud-provider-alibaba-cloud/blob/master/go.mod#L32 I see AWS provider works around this by having a separate go.mod for tests: https://github.com/kubernetes/cloud-provider-aws/blob/master/tests/e2e/go.mod @ProbstDJakob: Would you want to try implementing AWS approach?
Why do we even do that? I don't see that pattern in other cloud providers. Maybe this one can be removed. |
I will look into it next week and open a PR, but what about the line in the |
The #2486 should fix this issue |
I don't know what does it do. It was added in 0c8a774#diff-c19a66ed1fb964264d7bd09434b6bdbb184644ff0e64154c88d69e10acc26f97R35 |
@dims, maybe you have a clue why it was done? |
@kayrus: Is this fixed…? |
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
When executing
go list -m all
multiple dependencies can not be resolved due to invalid versions. This command (with some additional flags) is used by JetBrain's GoLand to sync the dependencies and since the command fails, the IDE is not capable to resolve any dependency which results in a huge pile of errors per file.What you expected to happen:
That the command completes successfully and prints out all modules.
How to reproduce it:
Clone the repository and execute the command
go list -m all
. This will produce the following errors:Anything else we need to know?:
The problem seems to be the dependency
k8s.io/kubernetes
. As described here (and discussed in more detail here)k8s.io/kubernetes
should not be used as a dependency. Removing the dependency from thego.mod
and executing the command again will result in a proper list of the modules (and the IDE is able to resolve the dependencies), but building the code will fail since some files depend onk8s.io/kubernetes
(mostly tests).This issue may be related to #1633 and #347
Environment:
The text was updated successfully, but these errors were encountered: