-
Notifications
You must be signed in to change notification settings - Fork 498
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
conformance tests for percentage-based request mirroring #3508
base: main
Are you sure you want to change the base?
conformance tests for percentage-based request mirroring #3508
Conversation
117f34b
to
d63225c
Compare
d63225c
to
15db255
Compare
@LiorLieberman: GitHub didn't allow me to request PR reviews from the following users: jakebennert. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. 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-sigs/prow repository. |
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.
Thanks @LiorLieberman! This is really well done
/cc @dprotaso |
8ed94ce
to
aa266b3
Compare
aa266b3
to
63803d9
Compare
/cc @kflynn |
ping @kflynn @dprotaso |
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.
Thanks for the PR, @LiorLieberman!
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, gwAddr, expected) | ||
|
||
// Override to not have more requests than expected | ||
suite.TimeoutConfig.RequiredConsecutiveSuccesses = 1 |
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 change will affect other tests as well. Why do we need to do so?
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.
oh man.. there is a whole story behind this change.
Essentially since I test mirroring, I started to see more requests that I had actually sent. so the mirror expectations were totally wrong. I learned to find this config the hard way..
Any other suggestion here if this is not desired?
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 var defaults to 3:
RequiredConsecutiveSuccesses: 3, |
Patching this in place is problematic, as it changes the user configuration and affects many other tests as well. Can we instead copy the whole TimeoutConfig
to a new var and change that to our desired value? It should be feasible, as http.MakeRequestAndExpectEventuallyConsistentResponse
accepts a Config as a parameter.
3b693c1
to
d74a070
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiorLieberman 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 |
@LiorLieberman: GitHub didn't allow me to request PR reviews from the following users: sayboras. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. 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-sigs/prow repository. |
@@ -0,0 +1,234 @@ | |||
/* | |||
Copyright 2024 The Kubernetes Authors. |
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.
Copyright 2024 The Kubernetes Authors. | |
Copyright 2025 The Kubernetes Authors. |
const ( | ||
concurrentRequests = 10 | ||
tolerancePercentage = 5.0 | ||
totalRequests = 500.0 |
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.
nit: I think we can make this an int
http.MakeRequestAndExpectEventuallyConsistentResponse(t, suite.RoundTripper, suite.TimeoutConfig, gwAddr, expected) | ||
|
||
// Override to not have more requests than expected | ||
suite.TimeoutConfig.RequiredConsecutiveSuccesses = 1 |
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 var defaults to 3:
RequiredConsecutiveSuccesses: 3, |
Patching this in place is problematic, as it changes the user configuration and affects many other tests as well. Can we instead copy the whole TimeoutConfig
to a new var and change that to our desired value? It should be feasible, as http.MakeRequestAndExpectEventuallyConsistentResponse
accepts a Config as a parameter.
wg.Wait() | ||
if err := testMirroredRequestsDistribution(t, suite, expected, timeNow); err != nil { | ||
t.Logf("Traffic distribution test failed (%d/%d): %s", k+1, numDistributionChecks, err) | ||
time.Sleep(2 * 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.
Why do we need such a sleep here?
What type of PR is this?
/kind test
/area conformance
What this PR does / why we need it:
Conformance tests for #3171 plus small updates to the GEP.
Tested with istio 1.24.1
Note: I also added a test case for fraction but it looks like it has an issue currently with the implementation I used (istio).
The specific test is failing, (which is good) so I think its in a good merge state. I also opened istio/istio#54357.
Mesh tests to follow
Which issue(s) this PR fixes:
Fixes #3171
Does this PR introduce a user-facing change?:
/cc @jakebennert @robscott