-
Notifications
You must be signed in to change notification settings - Fork 201
Add e2e test for multiport InferencePool enhancement #1885
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: RyanRosario 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 |
|
Hi @RyanRosario. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
Hey @danehans and @nirrozenbaum , my first PR is ready for review. |
|
/ok-to-test Thanks @RyanRosario. seems like your PR needs a rebase. additionally - please pay attention that your commits are not verified and if the PR is ready for review it would be good to remove the |
|
/retest |
|
@RyanRosario: 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. |
|
Thank you for your patience! The failing test seems to be related to issue 1872. Can we continue with review or should 1872 be resolved first? |
| const ( | ||
| // defaultCurlTimeout is the default timeout for the curl command to get a response. | ||
| defaultCurlTimeout = 30 * time.Second | ||
| defaultCurlTimeout = 120 * time.Second |
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.
2 min for curl timeout is a bit long.
why do we need to increase the 30 sec timeout?
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 you're right, though 30 was too short. When generating traffic in verifyMetrics I was getting timeouts (curl 28). I implemented retries but was still getting timeouts with 30s -- only increasing the timeout worked. I am not confident that increasing the number of retries alone would resolve it. I am open to suggestions.
| fi | ||
| fi | ||
|
|
||
| kubectl delete crd inferencepools.inference.networking.k8s.io --ignore-not-found |
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.
why this script deletes the CRD?
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.
This may be a timing issue in my local environment. Aborting or failing tests (moreso the former) followed by immediate re-execution sees an InferencePool that hasn't been torn down yet. I would imagine other devs experience this as well so I added it, but I can remove it if not a good practice.
failing test isn't blocking the review but it is blocking the merge. |
| if !cmp.Equal(got, expected, cmpopts.SortSlices(func(a, b string) bool { return a < b })) { | ||
| return fmt.Errorf("actual (%v) != expected (%v); resp=%q", got, expected, resp) | ||
| if !cmp.Equal(gotPort, expectedPort, cmpopts.SortSlices(func(a, b int) bool { return a < b })) { | ||
| return fmt.Errorf("collecting ports... have %v, want %v", gotPort, expectedPort) |
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.
TODO: restore original message
| // Recommended: 3 retries with backoff | ||
| const maxRetries = 3 | ||
| const backoff = 1 * time.Second | ||
|
|
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.
Consider adding to top declaratiom
| TTY: false, | ||
| }, parameterCodec) | ||
|
|
||
| fmt.Printf("Executing command in pod %s/%s: %v\n", testConfig.NsName, podName, cmd) |
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.
Delete this.
| // ExecCommandInPod runs a command in a given container of a given Pod, returning combined stdout+stderr. | ||
| func ExecCommandInPod(testConfig *TestConfig, podName, containerName string, cmd []string) (string, error) { | ||
| parameterCodec := runtime.NewParameterCodec(testConfig.Scheme) | ||
|
|
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.
Consider adding retry logic here.
|
|
||
| var err error | ||
| // RETRY LOOP | ||
| for attempt := 0; attempt <= maxRetries; attempt++ { |
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.
Consider moving the retry logic into execCommandInPod
What type of PR is this?
kind/cleanup
What this PR does / why we need it:
Adds an E2E test for multi-port enhancement. Currently verifyTrafficRouting is implemented, verifyMetrics to follow.
Which issue(s) this PR fixes:
Fixes #1768
Does this PR introduce a user-facing change?:
NONE