-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
router: add x-envoy-attempt-count on downstream responses #10325
Conversation
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
I made some decisions about this change that are open for debate:
|
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.
Cool, it's nice to have better debug info for what's going on in this case!
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
This reverts commit 78186f3. Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
@htuch this is ready for another pass (going to leave alyssa out from mentions given she is ooo today). |
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.
Looking good overall!
Signed-off-by: Jose Nino <jnino@lyft.com>
@alyssawilk updated! |
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
/lgtm api |
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.
LGTM, thanks!
@@ -143,8 +143,20 @@ message VirtualHost { | |||
// This header is unaffected by the | |||
// :ref:`suppress_envoy_headers | |||
// <envoy_api_field_config.filter.http.router.v2.Router.suppress_envoy_headers>` flag. | |||
// | |||
// [#next-major-version: rename to include_attempt_count_in_request.] |
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.
You can do this now with [(udpa.annotations.field_migrate).rename
right? Or is the issue that this will right now change it in v3 and we have to circle back and do it after we stop v2 updates?
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.
there's a wrinkle with the annotation right now #10325 (comment). I am keeping a note so that when this is fix we can change to use the annotation.
@@ -344,6 +343,7 @@ class HeaderEntry { | |||
HEADER_FUNC(Connection) \ | |||
HEADER_FUNC(ContentLength) \ | |||
HEADER_FUNC(ContentType) \ | |||
HEADER_FUNC(EnvoyAttemptCount) \ |
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.
It makes me happy to see this working properly. :)
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.
Yeah, this is awesome! Hard/tedious work is now paying off :) thanks for doing this. I took the liberty to narrow some more types in this PR to ensure static checking, really rad.
I am going to go ahead an merge this PR, in spite of the macOS failure. The same failure has been seen on master as well https://github.com/envoyproxy/envoy/runs/509585590 cc @danzh2010 |
Description: this PR adds the
x-envoy-attempt-count
header to downstream responses.Risk Level: low, used via new config value that defaults to false.
Testing: updated tests to verify that the header is being set. New unit tests
Docs Changes: updated docs
Release Notes: added.
Signed-off-by: Jose Nino jnino@lyft.com