-
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
[Federation] Cleanup e2e framework #44072
[Federation] Cleanup e2e framework #44072
Conversation
aedab10
to
184fcc3
Compare
rebased |
@k8s-bot gce etcd3 e2e test this |
Review status: 0 of 15 files reviewed at latest revision, 4 unresolved discussions. test/e2e_federation/service.go, line 249 at r1 (raw file):
Hmm. I'm not sure how I feel about this: it doesn't seem like something that we can guarantee or check except by careful code review. How do you guarantee that the first object is the primary cluster, and that we never get it wrong when modifying related code later? test/e2e_federation/framework/cluster.go, line 83 at r1 (raw file):
What does this bit of the comment mean? How is it returning "until"? test/e2e_federation/framework/cluster.go, line 109 at r1 (raw file):
Do we know for sure that the first item in this list is the one we want? Could this be abstracted into a method on the cluster? test/e2e_federation/framework/framework.go, line 236 at r1 (raw file):
Why not just inline that code here? Comments from Reviewable |
Review status: 0 of 15 files reviewed at latest revision, 4 unresolved discussions. test/e2e_federation/service.go, line 249 at r1 (raw file): Previously, perotinus (Jonathan MacMillan) wrote…
Picking the first cluster in the list is exactly what the previous code was doing, and I'm assuming it works because the order of retrieval is consistent across the test and the controller. I'm just moving responsibility to the only test that cares about that property. test/e2e_federation/framework/cluster.go, line 83 at r1 (raw file): Previously, perotinus (Jonathan MacMillan) wrote…
I haven't changed this function or its comment, just moved it, and this code goes away in #44073. test/e2e_federation/framework/cluster.go, line 109 at r1 (raw file): Previously, perotinus (Jonathan MacMillan) wrote…
I'm not changing behavior here, and this code goes away in #44073. test/e2e_federation/framework/framework.go, line 236 at r1 (raw file): Previously, perotinus (Jonathan MacMillan) wrote…
I wanted to put the cluster-related code in one place to simplify maintenance. I don't think there's an advantage to bulking up the framework type, which is already a catch-all. Comments from Reviewable |
This change separates backend pod management from cluster management
There was no code relying on a map, and using a slice eliminates the need to select the primary cluster when retrieving registered clusters.
184fcc3
to
ea82508
Compare
rebased |
Overall good job. LGTM Reviewed 15 of 15 files at r1. Comments from Reviewable |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marun, shashidharatd
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@k8s-bot pull-kubernetes-federation-e2e-gce test this |
@marun: The following test(s) failed:
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. |
@shashidharatd that job is broken (and not by this PR) |
@marun, should not be a problem to merge this pr. was just hoping the pre-merge tests started working. :) |
Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072) |
This PR is intended to simplify maintenance of the federation e2e tests:
Commit
fed: Refactor e2e cluster functions into framework for reuse
was originally included in #43500, but is included here because it formed the basis for this cleanup.cc: @kubernetes/sig-federation-pr-reviews @perotinus