Skip to content
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

internal/envoy: use consistent HTTP filter names #6124

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

skriss
Copy link
Member

@skriss skriss commented Jan 26, 2024

Use the same names for HTTP filters when they
are added to an HTTP connection manager and
when they are configured with per-filter config
on virtual hosts or routes. Extracts a set of
constants for filter names to ensure they remain
in sync.

This addresses a change in Envoy behavior in Envoy 1.29.
See envoyproxy/envoy#29461 for
more detail.

Use the same names for HTTP filters when they
are added to an HTTP connection manager and
when they are configured with per-filter config
on virtual hosts or routes. Extracts a set of
constants for filter names to ensure they remain
in sync.

This addresses a change in Envoy behavior in Envoy
1.29. See envoyproxy/envoy#29461
for more detail.

Signed-off-by: Steve Kriss <stephen.kriss@gmail.com>
@skriss skriss requested a review from a team as a code owner January 26, 2024 20:33
@skriss skriss requested review from tsaarni and sunjayBhatia and removed request for a team January 26, 2024 20:33
@skriss skriss added the release-note/small A small change that needs one line of explanation in the release notes. label Jan 26, 2024
@sunjayBhatia sunjayBhatia requested review from a team, izturn and clayton-gonsalves and removed request for a team January 26, 2024 20:33
@@ -296,7 +309,7 @@ func (b *httpConnectionManagerBuilder) DefaultFilters() *httpConnectionManagerBu
// identified by the TypeURL of each filter.
b.filters = append(b.filters,
&http.HttpFilter{
Name: "compressor",
Name: CompressorFilterName,
Copy link
Member Author

@skriss skriss Jan 26, 2024

Choose a reason for hiding this comment

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

I think it should be fine to change the filter names here as they're added to the HCM (making them all match the canonical filter names for consistency), but an alternate option would be to only update the per-filter config within the RouteConfigurations to match these names, without changing them here. Any thoughts?

Signed-off-by: Steve Kriss <stephen.kriss@gmail.com>
Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (9eb2838) 78.82% compared to head (7b5a8a4) 78.82%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6124   +/-   ##
=======================================
  Coverage   78.82%   78.82%           
=======================================
  Files         138      138           
  Lines       19766    19766           
=======================================
  Hits        15581    15581           
  Misses       3878     3878           
  Partials      307      307           
Files Coverage Δ
internal/envoy/v3/listener.go 98.49% <100.00%> (ø)
internal/featuretests/v3/envoy.go 99.08% <100.00%> (ø)
internal/envoy/v3/route.go 80.47% <81.81%> (ø)

Copy link
Member

@sunjayBhatia sunjayBhatia left a comment

Choose a reason for hiding this comment

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

I think it should be ok to use the canonical names rather than match the shortened names in the typed configs even in the HTTP filters/HCM, i dont think we give any guarantees to observers of the config dump that things will be consistently named etc. so I would think its good

@sunjayBhatia sunjayBhatia merged commit 67c7ec1 into projectcontour:main Jan 29, 2024
26 checks passed
@skriss skriss deleted the pr-filter-names branch January 29, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/small A small change that needs one line of explanation in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants