-
Notifications
You must be signed in to change notification settings - Fork 372
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/apiexportendpointslice: use SharedKcpServer #2821
🌱 e2e/apiexportendpointslice: use SharedKcpServer #2821
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
87815a0
to
73cc8ef
Compare
This looks good to me. I just have a couple of points: Can you please amend the comment here? kcp/test/e2e/reconciler/apiexportendpointslice/apiexportendpointslice_test.go Lines 268 to 270 in 73cc8ef
This could be a separate test function: kcp/test/e2e/reconciler/apiexportendpointslice/apiexportendpointslice_test.go Lines 342 to 382 in 73cc8ef
It was not the case previously due to the cost of setting up the private environment |
it is possible to use a shared server because the scheduler skips shards annotated with "experimental.core.kcp.io/unschedulable"
73cc8ef
to
991003f
Compare
Updated the comment. IMO there is no need for extracting logic to a helper function. I like when tests are self-contained and self-descriptive. |
I did not mean a helper function. I meant a completely separate test function as it is not directly related to the tests part of the same function. It is not critical, just thinking it may be nicer. |
return true, "" | ||
} | ||
return false, fmt.Sprintf("expected 1 endpoint, but got: %#v", sliceWithAll.Status.APIExportEndpoints) | ||
return false, fmt.Sprintf("expected %d endpoint, but got: %#v", len(shards.Items), sliceWithAll.Status.APIExportEndpoints) |
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 am concerned that you may be introducing a flake here: What does guarantee that no shard was created by a parallel test case between your call to list shards and the one to get the APIExportEndpointSlices?
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.
good point, assuming schedulable shards won't be removed we could change this logic to expect >=
initial shards+ shards added by this tests
.
ah, this could be a default (happy-path) scenario I always wanted, yeah I can do that :) |
@kcp-dev/kcp-contributors lets pick this up? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. /close |
@kcp-ci-bot: Closed 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. |
Summary
it is possible to use a shared server because the
scheduler skips shards annotated with
experimental.core.kcp.io/unschedulable
Related issue(s)
Fixes #