Skip to content

route checker tool: differentiate between request and response headers#10168

Merged
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
LisaLudique:rct-headers
Feb 27, 2020
Merged

route checker tool: differentiate between request and response headers#10168
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
LisaLudique:rct-headers

Conversation

@LisaLudique
Copy link
Copy Markdown
Contributor

Signed-off-by: Lisa Lu lisalu@lyft.com

Description: This change refactors the route checker tool to strictly differentiate between request and response headers to avoid ambiguity in how headers are specified and tested against for users. Header finalization is now done explicitly and separately for request headers and response headers and performed only once. Users must specify request headers or response headers rather than the previous ambiguous "header_fields" field. This change also eliminates customHeaderFields, which is unneeded with header finalization being performed and which was never publicly documented for use.
Risk Level: Low
Testing: Updated unit tests
Docs Changes: Included
Release Notes: N/A
Deprecated: header_fields, additional_headers, custom_header_fields in validation.proto. Deprecation notes added.

Signed-off-by: Lisa Lu <lisalu@lyft.com>
@mattklein123
Copy link
Copy Markdown
Member

Thanks a ton for fixing this. Can you merge master and then I can review without all the duplicated code? Thank you!

/wait

Signed-off-by: Lisa Lu <lisalu@lyft.com>
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.

Nice, thanks for tackling this. A few comments. Thank you!

Comment on lines +44 to +45
std::unique_ptr<Http::TestRequestHeaderMapImpl> request_headers_;
std::unique_ptr<Http::TestResponseHeaderMapImpl> response_headers_;
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: const

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was unable to set these to const since some of the header finalization methods only take non-Const headers as parameters

@itayd
Copy link
Copy Markdown
Contributor

itayd commented Feb 26, 2020

/rk-ping

@repokitteh-read-only
Copy link
Copy Markdown

pong

🐱

Caused by: a #10168 (comment) was created by @itayd.

see: more, trace.

@itayd
Copy link
Copy Markdown
Contributor

itayd commented Feb 26, 2020

/wait

@itayd
Copy link
Copy Markdown
Contributor

itayd commented Feb 26, 2020

unwait please

@itayd
Copy link
Copy Markdown
Contributor

itayd commented Feb 26, 2020

i said unwait!
/rk-ping

@repokitteh-read-only
Copy link
Copy Markdown

pong

🐱

Caused by: a #10168 (comment) was created by @itayd.

see: more, trace.

@itayd
Copy link
Copy Markdown
Contributor

itayd commented Feb 26, 2020

sorry for the noise, debugging repokitteh. please ignore comments by me.

Signed-off-by: Lisa Lu <lisalu@lyft.com>
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.

Awesome, thank you for this!

@mattklein123 mattklein123 merged commit 1ed1a83 into envoyproxy:master Feb 27, 2020
@LisaLudique LisaLudique deleted the rct-headers branch February 27, 2020 18:38
kb000 pushed a commit to kb000/envoy that referenced this pull request Mar 6, 2020
envoyproxy#10168)

Signed-off-by: Lisa Lu <lisalu@lyft.com>
Signed-off-by: Kevin Burek <kburek@lyft.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