-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
[e2e] decouple the aggregated clientset from the e2e testing framework #75989
[e2e] decouple the aggregated clientset from the e2e testing framework #75989
Conversation
6bb13d6
to
6f0b05d
Compare
6f0b05d
to
8754cdf
Compare
/retest |
6b4011d
to
d652f3e
Compare
d652f3e
to
751043c
Compare
updated |
/retest |
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.
/approve
test/e2e/apimachinery/aggregator.go
Outdated
if err != nil { | ||
framework.Failf("could not load config: %v", err) | ||
} | ||
aggrclient, err := aggregatorclient.NewForConfig(config) |
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 still think this is weird, but if it's isolated to just this area I'm ok with it.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123, timothysc 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 |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
/test pull-kubernetes-e2e-kind |
/retest Review the full test history for this PR. Silence the bot with an |
/hold |
Remove usage of the aggregated clientset in the e2e testing framework itself. We have one test that consumes the clientset in the suite and it's in test/e2e/apimachinery/aggregator.go, which was recently promoted to conformance in 8101b86. This test now obtains a local copy of the aggregated clientset. The suite still has to compile the internal client in. One possible solution here is to move this test in a separate suite, yet it's unclear of how to tackle the problem now that the test has to run as part of the conformance suite.
a997293
to
760a825
Compare
@@ -74,7 +74,17 @@ var _ = SIGDescribe("Aggregator", func() { | |||
ginkgo.BeforeEach(func() { | |||
c = f.ClientSet | |||
ns = f.Namespace.Name | |||
aggrclient = f.AggregatorClient | |||
|
|||
if aggrclient == 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.
@timothysc i had to do this. ^
otherwise having the LoadConfig()/NewForConfig(config) outside of BeforeEach panics.
@neolit123: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/retest |
It is nice to move the test specific code from the framework part. /lgtm |
@@ -182,8 +180,6 @@ func (f *Framework) BeforeEach() { | |||
} | |||
f.ClientSet, err = clientset.NewForConfig(config) | |||
ExpectNoError(err) | |||
f.AggregatorClient, err = aggregatorclient.NewForConfig(config) | |||
ExpectNoError(err) | |||
f.DynamicClient, err = dynamic.NewForConfig(config) |
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.
just one question for next work: I guess we would keep this DynamicClient because the callers are 17 like
test/e2e$ grep f.DynamicClient * -R | wc -l
17
right?
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 should keep it - this dynamic client is part of client-go.
we only had agreement with api-machinery to move the aggregator.
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.
@neolit123 Thanks for your explanation, that seems reasonable move :-)
thanks @oomichi optional iterations are welcome. |
What this PR does / why we need it:
Remove usage of the aggregated clientset in the e2e testing framework
itself. We have one test that consumes the clientset in the suite
and it's in test/e2e/apimachinery/aggregator.go, which was recently
promoted to conformance in 8101b86.
This test now obtains a local copy of the aggregated clientset.
Which issue(s) this PR fixes:
xref #75601
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?:
/assign @timothysc
/cc @oomichi @andrewsykim
/kind cleanup
/priority important-longterm