-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Removes 503 as a retryable status code in tests #1298
Removes 503 as a retryable status code in tests #1298
Conversation
/test pull-knative-serving-integration-tests |
e11b87e
to
12df486
Compare
/test pull-knative-serving-unit-tests |
12df486
to
2faef12
Compare
/assign @bobcatfish since this change is in the e2e and conformance tests. |
Nice one @bsnchan let's do it! |
/hold reviewing the details now |
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 making this change @bsnchan and I like how you're simplifying the interface to WaitForEndpointState! Most of my feedback is around the naming and structure of the Options
object but in general I like this!
test/request.go
Outdated
NamespaceName string | ||
AllowableStatuses []int | ||
RouteName string | ||
} |
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 like where you're going with this but I have a few thoughts:
Options
is a pretty generic name, but thisOption
only applies to tests that are querying a route endpoint for a certain status- There is some overlap with the
EnvironmentFlags
object, maybe there is a way to reuse that object here? (And in fact Add--namespace
flag to e2e & conformance test #1329 will be addingnamespace
to that object)
What about creating an Options
struct that is specific to WaitForEndpointState
? e.g. something like:
type ExpectedEndpointState {
ResolvableDomain bool
Domain string
AllowableStatuses []int
}
It could contain the options that are specific to the WaitForEndpointState
, cleaning up the interface a bit, and the rest of the options could stay individual params (or we could use EnvironmentFlags
directly but I feel like there is more in that struct than WaitForEndpointState
really needs).
test/request.go
Outdated
// TODO(#348): The ingress endpoint tends to return 503's and 404's. | ||
// Since there is currently a workaround for 503's, only allow 404's | ||
// as an acceptable status code. | ||
opts.AllowableStatuses = []int{404} |
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 prefer explicitly passing in []int{404}
in the first case to hardcoding a default here because a) it makes it more obvious what the test is expecting, b) it's more obvious what is different between the calls to WaitForEndpointState and c) this seems like an unexpected side effect
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.
One other option, you could have a NewOptions
(or NewExpectedEndpointState
) method that returns an instance of Options
/ExpectedEndpointState
and defaults the allowable statuses to []int{404}
, my opinion is that that would be a bit clearer.
@bobcatfish - just did the changes you suggested. Let me know if you think it needs anything else :) |
16ba8b9
to
ca5fc8b
Compare
/hold cancel |
Oh no, my #1458 is going to conflict with this a lot 👀 |
ca5fc8b
to
12a514a
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bsnchan If they are not already assigned, you can assign the PR to them by writing 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 |
e67d5d9
to
97307be
Compare
* Only allow 503's for newly created revisions
@jonjohnsonjr - I took your changes and rebased :) @bobcatfish - Can you let me know if there's anything else blocking this please? |
This is a strawman for the alternative to #1298 I had in mind.
What do you think about #1528 instead? @bobcatfish this is what I was talking about here: Line 168 in 0f1c435
|
/hold Wait until after we cut first release. |
Given that the activator now has retry logic (#1226) and we have a temporary workaround for Istio's spurious 503's (#785), we should remove the
503
as a possible retry-able code.Note: 503's are still allowed for newly created revisions