Skip to content

context: add response code details#13173

Merged
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
kyessenov:response_code_details
Sep 22, 2020
Merged

context: add response code details#13173
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
kyessenov:response_code_details

Conversation

@kyessenov
Copy link
Copy Markdown
Contributor

Signed-off-by: Kuat Yessenov kuat@google.com

Commit Message: add response code details to the attribute context
Risk Level: low
Testing: unit
Docs Changes: yes
Release Notes: no

Signed-off-by: Kuat Yessenov <kuat@google.com>
alyssawilk
alyssawilk previously approved these changes Sep 21, 2020
Copy link
Copy Markdown
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

code LGTM.

Before we land this though, I have a question for @mattklein123 / maintainers about scope, which is if folks are writing filter rules based on attribution context, would this mean we functionally ought to runtime guard response code detail changes, since now they can arguably affect L7 processing?

If so there's one change to rc details I think I'd like to make before this lands (per discussion on other rbac details PR, I think we haven't consistently guarded against spaces in setResponseCodeDetails, and probably should)

@mattklein123
Copy link
Copy Markdown
Member

Before we land this though, I have a question for @mattklein123 / maintainers about scope, which is if folks are writing filter rules based on attribution context, would this mean we functionally ought to runtime guard response code detail changes, since now they can arguably affect L7 processing?

Hmm. Great call out. Yeah, this seems super fragile to me. I agree with Alyssa that if we are going to do something like this we now need to treat response code details as something that basically can't ever change. Personally I would really rather avoid that for a string. Is there some other way to accomplish what you are after without doing this change?

@kyessenov
Copy link
Copy Markdown
Contributor Author

This is related to the discussion about attributing failure code to a filter. I think the outcome of that was that we should not be using response flags (since there are many filters), so this information only surfaces in the response code details.

Our filter intends to ship these details verbatim, so we are not going to try to parse it. But I can't rule out that some consuming system will try to parse the details.

@mattklein123
Copy link
Copy Markdown
Member

mattklein123 commented Sep 21, 2020

This is related to the discussion about attributing failure code to a filter. I think the outcome of that was that we should not be using response flags (since there are many filters), so this information only surfaces in the response code details.

I thought we had thought about using extensible response flags? I guess extensible response flags are not better than string matching.

What if we had documentation/policy that response details are subject to change and should not be matched on? cc @alyssawilk for thoughts on this option.

@alyssawilk
Copy link
Copy Markdown
Contributor

Yeah, I think as long as we have warnings (maybe in config here as well as docs) to give us some leeway while things stabilize that'd be good.

@mattklein123
Copy link
Copy Markdown
Member

Yeah, I think as long as we have warnings (maybe in config here as well as docs) to give us some leeway while things stabilize that'd be good.

+1, can you add this @kyessenov? I think adding this warning to the details docs that @alyssawilk just added would be good also. https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/response_code_details

/wait

Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov
Copy link
Copy Markdown
Contributor Author

Updated the doc.

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.

Can you please also add a warning to the RST file that I mentioned? Otherwise LGTM, thanks.

/wait

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.

Thanks!

@mattklein123 mattklein123 merged commit d6e7ba8 into envoyproxy:master Sep 22, 2020
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