feat: default remove accept encoding header
Continuation of https://github.com/envoyproxy/gateway/pull/7406
This removes the accept-encoding header from each route if a compressor is present.
Codecov Report
:x: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 72.39%. Comparing base (c1c227b) to head (0208d19).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| internal/xds/translator/compressor.go | 71.42% | 0 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #7562 +/- ##
==========================================
+ Coverage 72.38% 72.39% +0.01%
==========================================
Files 234 234
Lines 34562 34565 +3
==========================================
+ Hits 25016 25022 +6
+ Misses 7756 7754 -2
+ Partials 1790 1789 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
/retest
/retest
rethinking this one, shouldnt this be enabled by default ? what do HAProxy, NGINX and others do ?
rethinking this one, shouldnt this be enabled by default ?
what do HAProxy, NGINX and others do ?
They pass it directly to the backend, this is not defaulted anywhere.
Do we want to default it? That would make it opinionated, but I think if compression is enabled at the Envoy level, we should.
@arkodg I just made this removeAcceptEncodingHeader default.
/retest
@arkodg Can you please review?
since this's a behavior change, please add it in the release-notes.
since this's a behavior change, please add it in the release-notes.
@zirain Done :)
have 2 open questions
- why does this PR impact chooseFirst ? which seems unrelated to removing the header
- should this be enabled by default or opt in ? looking for a more data / strong case to pick one over other
have 2 open questions
- why does this PR impact chooseFirst ? which seems unrelated to removing the header
- should this be enabled by default or opt in ? looking for a more data / strong case to pick one over other
@arkodg It was having issues when getting to the unit tests where chooseFirst was not picking the correct compression (due to ordering maybe?). So I put it where it made sense: where it was building the compressors instead of the rendering.
And for the second one, Fastly for example does remove it for requests. We can make it an option if we would like? Let me know and I can update the PR.
/retest
Unfortunately, there was a release-notes/current.yaml conflict due to https://github.com/envoyproxy/gateway/commit/92d2a1a5a99deb3842b1cf888b2639d2a8c6cd7d#diff-8261eaec1f1079fe46bee37a988c04a7876b25a7c93fdc67db2f918ee5e406fb. Rebased and updated.
/retest