-
Notifications
You must be signed in to change notification settings - Fork 259
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
test: remove k8s.io/kubernetes dependency by using containerd copy #984
Conversation
The k8s.io/kubernetes dependency is only needed for a single function (GetAddressAndDialer), which doesn't seem to be in any module, other than k8s.io/k8s itself. Containerd created a copy of this utility for that reason, so let's use that copy to get rid of the dependency on k8s.io/k8s. Perhaps we should try to have that utils package included in one of the smaller k8s.io moduless. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Now that k8s.io/kubernetes is no longer used, this replace rule should no longer be needed (`go mod tidy` and `go mod vendor` worked without problem). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@dims PTAL 😅
Perhaps you know a better place for this utility? Looking at it, the code only depends on k8s.io/cri-api (so may be a good place to put it), |
@thaJeztah +1 to remove the single warning using |
I'm curious if this is driven by general code hygiene, or if there is a specific reason to ensure we don't have a dependency on |
It is driven by code hygiene; it won't have a direct effect on production code, but I don't think any module (even test ones) should depend on k8s.io/kubernetes. I think this change also makes it a lot more transparent what's actually needed for this package, which can help future maintenance and prevent confusion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR updates our internal ADO repo to the github commit [d9474d2](microsoft@d9474d2). Related work items: microsoft#964, microsoft#965, microsoft#966, microsoft#967, microsoft#968, microsoft#969, microsoft#970, microsoft#971, microsoft#972, microsoft#974, microsoft#975, microsoft#976, microsoft#977, microsoft#978, microsoft#979, microsoft#980, microsoft#981, microsoft#982, microsoft#983, microsoft#984, microsoft#987, microsoft#990, microsoft#991, microsoft#992, microsoft#993, microsoft#995, microsoft#996, microsoft#997, microsoft#1000
The k8s.io/kubernetes dependency is only needed for a single function
(GetAddressAndDialer), which doesn't seem to be in any module, other than
k8s.io/k8s itself (https://github.com/search?q=org%3Akubernetes+GetAddressAndDialer&type=code)
Containerd created a copy of this utility for that reason (as part of containerd/cri#1463), so let's use that copy to get rid of the dependency on k8s.io/k8s.
Perhaps we should try to have that utils package included in one of the smaller k8s.io moduless.