Skip to content
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

Conversation

bsnchan
Copy link
Contributor

@bsnchan bsnchan commented Jun 20, 2018

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

@google-prow-robot google-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 20, 2018
@google-prow-robot google-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 21, 2018
@bsnchan
Copy link
Contributor Author

bsnchan commented Jun 22, 2018

/test pull-knative-serving-integration-tests

@bsnchan
Copy link
Contributor Author

bsnchan commented Jun 25, 2018

/test pull-knative-serving-unit-tests

@google-prow-robot google-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 26, 2018
@bsnchan
Copy link
Contributor Author

bsnchan commented Jun 26, 2018

/assign @bobcatfish
/assign @adrcunha

since this change is in the e2e and conformance tests.

@bobcatfish
Copy link
Contributor

Nice one @bsnchan let's do it!

@bobcatfish
Copy link
Contributor

/hold

reviewing the details now

@google-prow-robot google-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2018
Copy link
Contributor

@bobcatfish bobcatfish left a 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
}
Copy link
Contributor

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:

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}
Copy link
Contributor

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

Copy link
Contributor

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.

@google-prow-robot google-prow-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 27, 2018
@bsnchan
Copy link
Contributor Author

bsnchan commented Jun 27, 2018

@bobcatfish - just did the changes you suggested. Let me know if you think it needs anything else :)

@bsnchan
Copy link
Contributor Author

bsnchan commented Jun 30, 2018

/hold cancel

@google-prow-robot google-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2018
@mchmarny mchmarny changed the title Removes 503 as a retryable status code Removes 503 as a retryable status code in tests Jul 2, 2018
@jonjohnsonjr
Copy link
Contributor

Oh no, my #1458 is going to conflict with this a lot 👀

@google-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bsnchan
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: adrcunha

If they are not already assigned, you can assign the PR to them by writing /assign @adrcunha in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bsnchan bsnchan force-pushed the removes-503-as-retryable branch 2 times, most recently from e67d5d9 to 97307be Compare July 4, 2018 17:10
* Only allow 503's for newly created revisions
@bsnchan
Copy link
Contributor Author

bsnchan commented Jul 4, 2018

@jonjohnsonjr - I took your changes and rebased :)

@bobcatfish - Can you let me know if there's anything else blocking this please?

jonjohnsonjr referenced this pull request in jonjohnsonjr/elafros Jul 9, 2018
This is a strawman for the alternative to #1298 I had in mind.
@jonjohnsonjr
Copy link
Contributor

What do you think about #1528 instead?

@bobcatfish this is what I was talking about here:

// TODO(jonjohnson): This could just be pulled out into a retrying ResponseChecker middleware thing.

@mattmoor
Copy link
Member

/hold

Wait until after we cut first release.

@google-prow-robot google-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 12, 2018
@bsnchan bsnchan closed this Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants