-
Notifications
You must be signed in to change notification settings - Fork 41.7k
clean up/reorganize endpoints conformance tests, split Endpoints/EndpointSlices #133993
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
clean up/reorganize endpoints conformance tests, split Endpoints/EndpointSlices #133993
Conversation
|
you got a bunch of linter errors |
| description: The EndpointSlice controller should create and delete empty EndpointSlices | ||
| for a Service that matches no pods. | ||
| release: v1.21 | ||
| release: v1.21, v1.35 |
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.
@dims @BenTheElder can you please ACK this is correct from conformance POV?
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.
the docs say "If the test was modified in subsequent releases then those releases should be included as well (comma separated)" so that seemed to fit here; there were previously 2 tests that tested both Endpoints and EndpointSlices, and now they've each been split into one Endpoints test and one EndpointSlice test.
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, this is fine.
When we have a major behavior change in the test it should get the version added. In this case the change is just the split but ... I don't think the project has been fully consistent over the years in adding these, mostly the first-added version.
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.
cc @dims to confirm
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.
yes, this is fine. thanks @danwinship
|
didn't go in detail but overall looks like a good simplification and split of e2e/conformance test to discriminate between Endpoint / Endpointslices Missing confirmation from Conformance folks for the correct tagging for these cases and some linter issues LGTM module the missing parts in ^^ |
ca3d96b to
554f613
Compare
|
remaining pull-kubernetes-linter-hints failures are just "hey, the Endpoints API is deprecated!" |
|
/retest-required |
2 similar comments
|
/retest-required |
|
/retest-required |
While createServiceReportErr could be fixed to use framework.ExpectNoErrorWithOffset (and, uh, to log "error creating Service" rather than "error deleting Service"), it's too trivial to really be all that useful.
554f613 to
69ef450
Compare
69ef450 to
0f42bc8
Compare
|
/retest |
|
linter-hints is just suggestions, we can review and ignore them, it doesn't block merge. |
| ginkgo.By("referencing matching pods with named port") | ||
| expectEndpointsAndSlices(ctx, cs, f.Namespace.Name, svc2, []*v1.Pod{pod1, pod2}, 2, 2, true) | ||
|
|
||
| ginkgo.By("creating empty Endpoints and EndpointSlices for no matching Pods") |
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 is the other test?
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.
The previous test (which starts out as "should create and delete Endpoints and EndpointSlices for a Service with a selector specified" but gets renamed to "should create and delete EndpointSlices for a Service with a selector that matches no pods") tests just the no-endpoints case, while this one tested Services both with and without endpoints.
|
one question about the duplicate tested logic I could not find and one typo that since is in conformance I think is worth fixing it , |
This was being checked by two different conformance tests.
(In particular, fix the wait.PollImmediate calls even in the code that's staying here, not just the code that's moving.)
Move the Endpoints API test from endpointslice.go to endpoints.go Move the "kubernetes.default Service exists" and "kubernetes.default endpoints exist" tests to apiserver.go, since (unlike the rest of service.go/endpointslice.go) they aren't testing the behavior of the Service/EndpointSlice/Endpoints APIs. (No code changes, but fixed a typo in a comment.)
Inline the endpointSlicesEqual() method into the test, since despite its generic-sounding name, it made assumptions specific to this test. Also, port to generic sets.
0f42bc8 to
c189e9d
Compare
does not look related /retest |
|
/lgtm |
|
LGTM label has been added. Git tree hash: 9dc4387fc4ad181e60dcf5e332b0f1ed6380f137
|
|
@danwinship: 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-sigs/prow repository. I understand the commands that are listed here. |
|
/assign @dims
|
|
/approve /hold please remove hold when ready |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, danwinship, dims 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 |
|
/hold cancel |
|
/test pull-kubernetes-verify |
(skip down to "special notes for your reviewer" for conformance-specific details)
What this PR does / why we need it:
Continuing the work on KEP-4974, this cleans up and reorganizes the Endpoints and EndpointSlice controller conformance tests; in particular, it takes the 2 existing conformance tests that look at the outputs of both the Endpoints and EndpointSlice controllers, and splits them into separate (slightly-redundant) Endpoints-only and EndpointSlices-only tests.
With this PR merged, the overall state of Endpoints/EndpointSlice e2e is that there are only 3 files in all of
test/e2ethat use the Endpoints API:test/e2e/network/endpoints.gohas[Feature:EndpointsController])test/e2e/network/endpointslicemirroring.gohastest/e2e/network/apiserver.gohasThis means once this PR merges we will be able to set up an e2e job that runs without Endpoints/EndpointSlice mirroring, without having to skip any other tests. (This environment would still be non-conformant at this point, but this allows us to confirm that nothing else depends on those controllers.)
Which issue(s) this PR is related to:
KEP: kubernetes/enhancements#4974
(Also, follow up to #132991)
Special notes for your reviewer:
While this PR adds 2 new conformance tests and modifies some others, it does not change any conformance criteria. It just:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/kind cleanup
/sig network
/area conformance
/triage accepted
/priority important-longterm