-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
listener: allow setting only a default filter chain #14025
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
26a28f1
listener: allow setting only a default filter chain
tbarrella f611de6
Merge remote-tracking branch 'origin/master' into filter-chain
tbarrella 7d3ed36
Address comments
tbarrella 74ed282
Merge remote-tracking branch 'origin/master' into filter-chain
tbarrella e36ab02
Merge remote-tracking branch 'origin/master' into filter-chain
tbarrella dda71bb
Adjust condition and add comment
tbarrella File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this need to look like
needTlsInspector
with a search through all filter chains? I don't understand how you can only check the default or the first chain? Was this a bug that already existed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this is the only file that checks
use_proxy_proto
, so maybe it was a bug/undocumented expectation. Not sure if the previous behavior should be modified in this change. I just realized it might be more conservative to change the condition fromconfig.has_default_filter_chain()
toconfig.filter_chains().empty()
thoughThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me this is a bug as I don't think it makes any sense. If we don't want to fix this now I would make no changes here and then fix it in a follow up?
If we auto inject proxy proto I think all filter chains should probably be asking for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. I'm reluctant to change two behaviors in one commit; opened #14085 for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattklein123 It's an invalid config if partial of the filter chain set use proxy proto while other filter chain don't. We check the first filter chain here for back compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no enforcement at this moment. And don't add enforcement in this PR.
However, could you add the warning message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't add a printed warning since deprecation should serve that purpose, but I added a comment referencing #14085
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that none of this make any sense, do you want to just revert this part of the PR entirely? Also do we want a warning in a PR or do you want to do this as a follow up? Otherwise this change LGTM and thanks for the discussion here.
/wait-any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still needed to avoid an indexing error when only a default filter chain is provided. I'd rather leave user-facing warnings etc. as a follow-up (part of the other issue) since this is consistent with existing behavior/isn't a regression or anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK fair enough. If you can fix all of ^ as a follow up that would be appreciated.