-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Backwards incompatible client-go/testing across major versions makes it hard to use generated fakes for vendored CRD clients #76305
Comments
We would have to go all the way to semantic import versioning for multiple versions to coexist in a build as you describe. Some of the implications of that are described at https://github.com/kubernetes/enhancements/blob/master/keps/sig-architecture/2019-03-19-go-modules.md#alternative-versioning-strategies I am in favor of major version tagging the other k8s.io components to match client-go /remove-kind bug |
Would it be hard to go to those projects and send them PRs to regenerate with the newest code? In an off-line conversation, it did not seem like there were any immediate pressing reasons to update our dependencies, so barring that I feel like an approach that:
is not desirable as it's going to make testing hard, especially if we are using the full power of the fakes to drive listers/informers/watchers. |
Not convinced the trade-off is worth it here until kubernetes can prove it is a better citizen about following semver correctly. If dependencies are cause maintenance/upgrade pain and we can remove them it is strongly in our interest to do so. Faking object lists and object change notifications is not hard, and not worth getting stuck forever on a single version. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
test-infra uses:
We use the generated fake_build client for some of our unit testing. However, the signature for many of the methods in action.go in k8s.io/client-go/testing changed to include a PatchType method (added in #69330).
This makes it unnecessarily hard for me to update the client-go version test-infra, as I either have to:
One solution here might be to start tagging our modules with major releases, which should allow the vendored knative/build to continue using the older version of client-go while the code under my control starts using the new version.
FYI @sttts @lavalamp @caesarxuchao @liggitt
@kubernetes/sig-api-machinery-bugs
ref kubernetes/test-infra#12107
The text was updated successfully, but these errors were encountered: