-
Notifications
You must be signed in to change notification settings - Fork 40.3k
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
homogenize fake discovery #62069
homogenize fake discovery #62069
Conversation
/kind cleanup |
213d849
to
1bcb804
Compare
/cc @liggitt |
cc @yliaog |
Verb: "get", | ||
Resource: schema.GroupVersionResource{Resource: "resource"}, | ||
} | ||
c.Invokes(action, nil) |
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.
what's the reason for the change here?
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.
@yliaog I believe these codes are useless here, aren't they? Am I missing sth?
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.
i tend to agree with you, however, i don't quite understand why the code for c.Invoke(...) was introduced in the first place, similarly for the other methods ServerResourcesForGroupVersion(), ServerGroups(), ServerVersion()
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.
Yeah.. IDK either. But I'm pretty sure it should be cleaned up anyway.
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.
Cleaning up for for other methods too :)
/test pull-kubernetes-bazel-test |
@@ -37,11 +37,6 @@ type FakeDiscovery struct { | |||
} |
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.
could you update the comment above the type, that mentioned testing.Fake.Invoke
/lgtm |
ba4ef7c
to
d35a278
Compare
@yliaog I just rebased to fix the bazel build failure. Could you please take another look at this once it's all green in the CI? :) |
Sure |
@yliaog PTAL thx :) |
/lgtm |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yliaog, yue9944882 Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Please squash your changes into a single commit then I'll approve the kubectl bits, you still need approval for the client-go, though. |
d35a278
to
bb728a5
Compare
New changes are detected. LGTM label has been removed. |
@soltysh Thanks, PTAL |
/cc @deads2k How do you think about approving this PR plz? |
/test pull-kubernetes-e2e-kops-aws |
We need to be able to track actions. There are two reasons for using a mock:
this pull eliminates the ability to do item 2. |
Verb: "get", | ||
Resource: schema.GroupVersionResource{Resource: "group"}, | ||
} | ||
c.Invokes(action, nil) |
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.
I think we need this or something very much like it.
@deads2k Thanks. But it somehow still looks confusing to me THO, because these code might only make a difference by panics when I'll revert the changes of this part. |
bb728a5
to
69c7b04
Compare
cleaning up fake discovery impl update fake discovery comment rebase and fixes bazel compilation failure
69c7b04
to
6b3ab65
Compare
/test pull-kubernetes-kubemark-e2e-gce |
1 similar comment
/test pull-kubernetes-kubemark-e2e-gce |
@deads2k Friendly ping for a review 😃 |
@yue9944882: PR needs rebase. 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. |
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 PR. 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. |
What this PR does / why we need it:
Cleans fake discovery and leaves the only one defined in
client-go/discovery
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #62031
Special notes for your reviewer:
Release note: