-
Notifications
You must be signed in to change notification settings - Fork 227
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
Rework retry and error classification #349
base: main
Are you sure you want to change the base?
Rework retry and error classification #349
Conversation
This commit removes `IdempotentRequestEOF` and `IncompleteRequest` from the fail-able and prune-able classifier group. This prevents errors that should not affect the endpoint from being marked as failed or being pruned. To do so all classifiers groups are split into distinct groups and any cross references between them are removed. The main motivation for this change is to avoid confusion and bugs due to artificial dependencies between the groups. Resolves: cloudfoundry/routing-release#321 Tested-By: `routing-release/scripts/run-unit-tests-in-docker gorouter`
With this commit `isRetriable` no longer overwrites / wraps the error that is passed to it. This was done to accommodate context from the circumstances in which the error occurred into the error itself to be able to match on those later on. This mechanism has proven to cause bugs and increase overall complexity by abusing the error type. Instead `isRetriable` now only returns whether a certain combination of parameters is considered retry-able, either because the circumstances allow for it or because the error matches one of the retry-able error classifiers. Resovles: cloudfoundry/routing-release#321
I'm not sure how to continue with this. The main issue right now is that we cannot mock the request tracer. This hasn't been an issue until now because we just return the special errors and the classifier had the final say, but with this change the An alternative approach would be to actually write the tracer fields during testing in our But before I get started I would like to get a second opinion: @domdom82 @geofffranks WDYT? |
What overlap between request tracer + the classifiers are you concerned about? My initial reaction is to go with the approach of adding an interface on top of To me, that seems easier to implement than trying to deal with all the knock-on effects of modifying FakeProxyRoundTripper, but i'm not sure i fully understand the problem you're running into. |
Yes, that pretty much catches the issue I'm facing. The overlap is mainly concerned with the I'll probably find some time next week to look into this. |
A short explanation of the proposed change:
An explanation of the use cases your change solves
Instructions to functionally test the behavior change using operator interfaces (BOSH manifest, logs, curl, and metrics)
Expected result after the change
Current result before the change
Links to any other associated PRs
I have viewed signed and have submitted the Contributor License Agreement
I have made this pull request to the
main
branchI have run all the unit tests using
scripts/run-unit-tests-in-docker
from routing-release.(Optional) I have run Routing Acceptance Tests and Routing Smoke Tests on bosh lite
(Optional) I have run CF Acceptance Tests on bosh lite