-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Limit the number of 3rd-party dependencies #3072
Comments
cc @tenzen-y |
Here, what is 3rd party dependencies? Does that indicate non-K8s libraries (sigs.k8s.io and k8s.io)? |
I'm thinking about the non-k8s dependencies. |
Are there specific ones you have in mind? In general I would assume that there are not many that k8s.io/* itself doesn't depend on |
Not really, I was mostly hoping there are some low hanging fruits in the net that could be eliminated. To make the issue a little bit more actionable, let me focus on the couple of 0.0.0 ones:
I use the
However, using goda tree I didn't see where |
I don't think we can drop indirect dependencies without dropping direct dependencies. The only reason they are there is because some of the direct dependencies depend on them. So wouldn't it make more sense to only look at direct dependencies? |
Right, that is another valid perspective for sure. I just took the bottom-up approach first to start from the ones which looked suspicious, but indeed most of that turns out to be indirect dependency of k8s.io anyway. However, this one still puzzles me what it is needed for: As for the top-down scan, this catches my attention:
here:
But, maps is already built-in in new golang, so maybe we can drop the experimenal dep?
Do you know if we still need v4 and v5, and why we have |
I think we already did: #3012 (released with CR v0.20) |
v4 is to match upstream k/client-go. Otherwise our fake client would behave different than the one from client-go v5 is what we use in pkg/client. If we change that we potentially break folks. I don't know why we use gomodules.xyz/jsonpatch/v2, you have to check the imports. We just have to be careful to not break folks by changing behavior. |
Regarding govalidator: $ go mod graph | grep govalidator
sigs.k8s.io/controller-runtime github.com/asaskevich/govalidator@v0.0.0-20190424111038-f61b66f89f4a
k8s.io/apiextensions-apiserver@v0.32.0 github.com/asaskevich/govalidator@v0.0.0-20190424111038-f61b66f89f4a
k8s.io/apiserver@v0.32.0 github.com/asaskevich/govalidator@v0.0.0-20190424111038-f61b66f89f4a
k8s.io/kube-openapi@v0.0.0-20241105132330-32ad38e42d3f github.com/asaskevich/govalidator@v0.0.0-20190424111038-f61b66f89f4a |
controller-runtime is a foundational library for many projects, such as Kueue: https://github.com/kubernetes-sigs/kueue.
As such it is very important for the future of the projects, and the large net of dependencies raises some concerns:
Would eliminating at least some of the 0.0.0 dependencies be feasible? This is more of an open discussion question than concrete call to action.
The text was updated successfully, but these errors were encountered: