-
Notifications
You must be signed in to change notification settings - Fork 4.9k
router: deprecate optional http filters and add route/vh level is_optional
support in the typed_per_filter_config
#27263
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
router: deprecate optional http filters and add route/vh level is_optional
support in the typed_per_filter_config
#27263
Conversation
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
cc @markdroth because you concern #15025 |
There is a quesion about the PR self:
|
As my understanding the usecase of I quickly search the code. maybe we can add the optional config into the hash of the provider
Then we can get different provider instances for different optional config Not sure whether this can be an acceptable temporary fix. if yes, then you can have a better fix later and won't take the risk break some users. |
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.
Please add some kind of test, thank you.
/wait
@mattklein123 I think I need some more input from the community first. Will the suggestion from @soulxu be a possible better way to solve this problem? |
I think this is the right behavior, but I suggest combining this PR with #27210. That way, any user that runs into a problem will be able to solve it with the I don't entirely understand @soulxu's suggestion, but I think the behavior we want here is:
Note that this behavior has already been agreed upon and has been implemented by gRPC. I don't think we want Envoy to do something different. |
Do we want the HCM's |
It basically like #26097. We we shared same rds resource and proto config in multiple HCMs. But we may have different config providers based on the optional filters list. Rds resource will be accepted if all config providers validated it. But this way are more complicate and not sure if has other potential problem. So I didn't consider that first. Of course we can fix current error directly like this PR did. But this error was exist for two years. I worry about the back compatiability. If some users depend on this 'error', orz. Not sure if a runtime guard enough. |
yea, the trouble is we documented this behavior in API doc envoy/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto Lines 1143 to 1144 in bedd2b6
That is declared behavior, so in theory, removing it isn't right. except we consider this behavior is fully not working, then it is fine to delete it directly. But it work some case, not sure whether have people depend on it. |
No. We can't do that without breaking cacheability.
I don't think that will work, because the set of HCM configs can change over time. Consider the case where we initially have 3 HCM configs that point to the same RDS resource, we ACK that RDS resource, and then later we get a new HCM config that does not work with the RDS resource. At that point, the RDS resource would suddenly be considered invalid, but it's too late to NACK it. As I said in the discussion in #26097, the current xDS ACK/NACK mechanism is inherently limited to validating the resource in isolation, without considering how it interacts with other resources. Any other behavior breaks cacheability.
I didn't realize we had that comment there, and I agree that it should be updated. But the wording there is actually so vague that I'm not sure anyone reading it would actually assume it means the current behavior. |
@markdroth yeah, I think you are right. I didn't thought this point in the past. Thanks. |
Then, I think there no other choice. I will add a runtime guard and update doc. And also the tests. |
This reverts commit 1725ce7. Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
CC @envoyproxy/runtime-guard-changes: FYI only for changes made to |
cc @alyssawilk for runtime guard. |
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
cc @mattklein123 ready for a formal review. Could you take a look when you have free time, thanks. |
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
I can do second pass but first can @adisuissa and @markdroth make sure to tag resolved conversation as resolved? It's a bit hard to read at least parts of diffs with all the comments, and I don't want to resolve anything still in progress |
I don't have permission to resolve or unresolve comment threads. But I commented on the one thread that @alyssawilk resolved that I think is still open. |
…emote-dependency-of-rds-to-hcm
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
Hi, @markdroth @adisuissa, could you give a stamp about this PR if it ready for a second pass? Then we can push this to the next phase. 😄 |
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.
LGTM modulo one last question about API breaking changes
/retest |
Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
Tests were fixed and a new test to cover the new exception thowing was added. Could you giva a new stamp? cc @alyssawilk Thanks. |
close #15025 |
…tional` support in the typed_per_filter_config (envoyproxy#27263) * router: remove optional http filters because it's hcm dependent Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * Revert "router: remove optional http filters because it's hcm dependent" This reverts commit 1725ce7. Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * add runtime guard/tests/change log Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * fix more test Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * add route/virual host level optional flag support and test and change log Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * fix format Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * fix docs Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * fix test Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * Update changelogs/current.yaml Co-authored-by: Adi (Suissa) Peleg <adip@google.com> Signed-off-by: code <wangbaiping@corp.netease.com> * address all comments Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * fix conflict Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * address comment Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * address comments Signed-off-by: wbpcode <wangbaiping@corp.netease.com> * fix test and add new test to cover the new exception throwing Signed-off-by: wbpcode <wangbaiping@corp.netease.com> --------- Signed-off-by: wbpcode <wangbaiping@corp.netease.com> Signed-off-by: code <wangbaiping@corp.netease.com> Co-authored-by: Adi (Suissa) Peleg <adip@google.com> Signed-off-by: Ryan Eskin <ryan.eskin89@protonmail.com>
Commit Message: router: remove optional http filters because it's hcm dependent
Additional Description:
The
ConfigImpl
(route table) created by the rds may shared by multiple listeners/hcm. It means that theConfigImpl
should be hcm independent.However, in the current codebase, the optional http filters is extracted from the HCM and used for the
ConfigImpl
creation.Because the xds cache, the first hcm's http filters list will be used.
This typically a bug or potential error becasue different HCMs may have complete different http filters list and optional configuration.
Risk Level: mid.
Testing: n/a.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.
[Optional Runtime guard:] n/a.