filter: Add CacheFilter: a pluggable HTTP caching filter#10019
filter: Add CacheFilter: a pluggable HTTP caching filter#10019mattklein123 merged 19 commits intoenvoyproxy:masterfrom
Conversation
… interface. Signed-off-by: Todd Greer <tgreer@google.com>
|
/retest |
|
🤷♀️ nothing to rebuild. |
mattklein123
left a comment
There was a problem hiding this comment.
Cool stuff. Flushing some high level comments that we should resolve first. Thank you!
/wait
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
|
@mattklein123 We're almost through the code in #7198. After this PR, I have two more small ones prepped and ready to go: one for CacheFilterFactory (+ unit tests) and one for CacheIntegrationTest. I should be able to open each PR as soon as the prior one is merged. Will you be able to continue reviewing into next week? I'm hoping to get this series fully merged as early next week as possible. Thank you for all the reviews! |
mattklein123
left a comment
There was a problem hiding this comment.
One high level question and needs a master merge and then I will take another pass. Thank you!
/wait
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
mattklein123
left a comment
There was a problem hiding this comment.
Cool stuff. A few more high level questions. Thank you!
/wait
Signed-off-by: Todd Greer <tgreer@google.com>
…all to OnBodyAsync. Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
…do and don't respond immediately to getHeaders. Signed-off-by: Todd Greer <tgreer@google.com>
mattklein123
left a comment
There was a problem hiding this comment.
Thanks, LGTM other than the stop iteration issue I highlighted. I would recommend adding an integration test that will help us test various real-world permutations. I don't think it will be that much work. Thank you! Very cool stuff and excited to see this land so we can iterate on it.
/wait
…mment. Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
|
/retest |
|
🔨 rebuilding |
mattklein123
left a comment
There was a problem hiding this comment.
LGTM other than a test request. Also please merge master to fix the coverage test flake. Thank you!
/wait
|
|
||
| // Send first request, and get response from upstream. | ||
| { | ||
| IntegrationStreamDecoderPtr request = codec_client_->makeHeaderOnlyRequest(request_headers); |
There was a problem hiding this comment.
Can you add some integration tests with body, trailers, etc.? This would have caught the stop iteration issue I found.
There was a problem hiding this comment.
I changed CacheFilter to refuse to cache requests with bodies and/or trailers, because caching GET requests with bodies would turn an ordinary request smuggling vector into cache poisoning, and because GET/HEAD requests with bodies have no meaning. If it turns out to be needed, we may want to add a config knob to allow caching them.
Added unit and integration tests for them.
…est smuggling, and the spec doesn't define any meaning for GET/HEAD requests with bodies. Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
Signed-off-by: Todd Greer <tgreer@google.com>
mattklein123
left a comment
There was a problem hiding this comment.
Thanks, nice work. Let's ship and iterate!
|
Woohoo! Thank you for all of your reviews! |
|
JFYI: @toddmgreer I saw some flakiness on (sadly it doesn't print traceback on macos (even with |
|
@SaveTheRbtz I'm not getting any failures testing on my Linux workstation, either at 1k runs_per_test, or at 10k. I'd like to figure this out, but I need more to go on, such as a stack trace. Also, what revision were you at? If you can the crash to tell you a bit more, please file an issue. |
Description: Add CacheFilter: a pluggable HTTP caching filter. Split from #7198.
Risk Level: Low: nobody uses this new filter
Testing: Unit tests. Integration tests to follow in next PR.
Docs Changes: none
Release Notes: Do we add release notes for WIP filters?
#868