Skip to content

router: add gateway-error retry-on policy#2354

Merged
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
dio:issue-2306-more-granular-5xx-retry-policy
Jan 16, 2018
Merged

router: add gateway-error retry-on policy#2354
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
dio:issue-2306-more-granular-5xx-retry-policy

Conversation

@dio
Copy link
Copy Markdown
Member

@dio dio commented Jan 12, 2018

router: add gateway-error retry-on policy

Description: Add gateway-error (consider 502, 503 and 504 only) as a subset of 5xx retry-on policy.

Risk Level: Low

Testing: unit test

Docs Changes:

Release Notes: N/A

Fixes #2300

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks great, thanks. Small comment.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check here that response_headers is not nullptr. Please add a test to cover this case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @mattklein123 thanks for the review. Since this policy has the same behavior with 5xx, I assume I need to have reset overflow and remote reset tests in place?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or vice versa? Hum, it seems so. So I think, regarding this policy, I need to not retry if the response_headers is nullptr. Is that correct?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: envoy/router/router.h

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zuercher!

@mattklein123 mattklein123 self-assigned this Jan 12, 2018
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per your other comment, I think you actually want || here for the same reason as the 5xx case. A reset will always result in a 503 or 504 (IIRC for timeout), so should be included.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, sorry for misunderstanding that. Will update it.

@mattklein123
Copy link
Copy Markdown
Member

@dio LGTM but needs a DCO fix.

@dio
Copy link
Copy Markdown
Member Author

dio commented Jan 14, 2018

OH yeah, sorry for that. I thought I have run that support/bootstrap, but I guess it was not for this local copy. Fixed.

Thanks @mattklein123.

@mattklein123
Copy link
Copy Markdown
Member

@dio apologies, one last thing: Can you please add a release note about the new feature here: https://github.com/envoyproxy/envoy/blob/master/RAW_RELEASE_NOTES.md. Thank you!

Dhi Aurrahman added 5 commits January 16, 2018 02:27
Signed-off-by: Dhi Aurrahman <dio@hooq.tv>
The relevant consts are defined in envoy/router/router.h not
envoy/router.h.

Signed-off-by: Dhi Aurrahman <dio@hooq.tv>
Signed-off-by: Dhi Aurrahman <dio@hooq.tv>
Signed-off-by: Dhi Aurrahman <dio@hooq.tv>
Signed-off-by: Dhi Aurrahman <dio@hooq.tv>
@dio
Copy link
Copy Markdown
Member Author

dio commented Jan 15, 2018

@mattklein123 added. Thanks for reminding me!

@mattklein123 mattklein123 merged commit 8677897 into envoyproxy:master Jan 16, 2018
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
* Moved creation of client handler to onNewConnection callback

Added logic for building shared attributes

Shared attributes are build before the check call.
Updated logic for return destination IP & Port for handling the case when
upstream cluster is missing.

* Fix/augment unit tests
jpsim added a commit that referenced this pull request Nov 28, 2022
To account for recent changes to defaults:
actions/runner-images#5595

Signed-off-by: JP Simard <jp@jpsim.com>
jpsim added a commit that referenced this pull request Nov 29, 2022
To account for recent changes to defaults:
actions/runner-images#5595

Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants