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

Renovate is unable to bump k8s go libraries without user interaction #270

Open
thardeck opened this issue Apr 25, 2024 · 4 comments
Open

Comments

@thardeck
Copy link

thardeck commented Apr 25, 2024

Renovate is unable to bump k8s libraries and does even realize that itself but still creates the pr. It reports:

...
go: downloading sigs.k8s.io/kustomize/kyaml v0.17.0
go: downloading sigs.k8s.io/kustomize v2.0.3+incompatible
go: github.com/rancher/fleet/internal/cmd/controller/imagescan/update imports
	sigs.k8s.io/kustomize/kyaml/setters2: cannot find module providing package sigs.k8s.io/kustomize/kyaml/setters2
go: github.com/rancher/fleet/cmd/codegen imports
	github.com/rancher/wrangler/v2/pkg/controller-gen/args imports
	k8s.io/code-generator/cmd/client-gen/path: cannot find module providing package k8s.io/code-generator/cmd/client-gen/path

This is the according pr: rancher/fleet#2328


A similar issue is that renovate bumps k8s.io/kubernetes to v1.29.4 as security fix but does not bump the other k8s libraries which most likely is the reason for failing CI tests.
Our unit tests report the following failures:

 # k8s.io/kubernetes/pkg/features
Error: ../../../go/pkg/mod/k8s.io/[email protected]/pkg/features/kube_features.go:1266:18: undefined: genericfeatures.SeparateCacheWatchRPC
Error: ../../../go/pkg/mod/k8s.io/[email protected]/pkg/features/kube_features.go:1278:18: undefined: genericfeatures.WatchFromStorageWithoutResourceVersion

This is the according pr: rancher/fleet#2362


The solution would most likely be when for example kubernetes is bumped to 1.29.4, that all other k8s libraries are also bumped to 0.29.4 to keep them in sync.

I have not manually tested it in this case, but this is what I do when I bump these libraries on my own.

@pjbgf
Copy link
Member

pjbgf commented Apr 25, 2024

@thardeck thanks for creating this issue.

These might be slightly different issues from an initial check.

On the first PR, it seems that it failed to correctly update the pseudo version as the resulting version is not correctly formatted:

sigs.k8s.io/kustomize/api 2e6171a9ea9a
sigs.k8s.io/kustomize/kyaml 2e6171a9ea9a

On the second, the issue was that the k8s.io/apiserver was not bumped, and was kept at v0.29.2. This should be done automatically as part of goModTidy. 🤔

@thardeck
Copy link
Author

thardeck commented Apr 25, 2024

Many thanks for looking into it so quickly.

These might be slightly different issues from an initial check.

Should I create a different issue for the second one or leave it like this?

@thardeck thanks for creating this issue.

These might be slightly different issues from an initial check.

On the first PR, it seems that it failed to correctly update the pseudo version as the resulting version is not correctly formatted:

sigs.k8s.io/kustomize/api 2e6171a9ea9a
sigs.k8s.io/kustomize/kyaml 2e6171a9ea9a

On the second, the issue was that the k8s.io/apiserver was not bumped, and was kept at v0.29.2. This should be done automatically as part of goModTidy. 🤔

Running go mod tidy should not change anything because our CI runs it and complains if there are any changes different from the pr.

@pjbgf
Copy link
Member

pjbgf commented Apr 25, 2024

Happy to leave as is. I think the second part of this issue may be tackled under #271, as I suspect they may have the same root cause. If not, we can create another issue at a later stage.

@thardeck
Copy link
Author

On the second, the issue was that the k8s.io/apiserver was not bumped, and was kept at v0.29.2. This should be done automatically as part of goModTidy. 🤔

As expected I manually had to bump the k8s libraries to get the tests green: rancher/fleet@d9ca814

It can not be done by just using go mod tidy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants