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 <[email protected]>
|
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. |
mattklein123
left a comment
There was a problem hiding this comment.
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 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 <[email protected]>
Signed-off-by: wbpcode <[email protected]>
|
CC @envoyproxy/runtime-guard-changes: FYI only for changes made to |
|
cc @alyssawilk for runtime guard. |
Signed-off-by: wbpcode <[email protected]>
|
cc @mattklein123 ready for a formal review. Could you take a look when you have free time, thanks. |
Signed-off-by: wbpcode <[email protected]>
|
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 <[email protected]>
|
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. 😄 |
alyssawilk
left a comment
There was a problem hiding this comment.
LGTM modulo one last question about API breaking changes
|
/retest |
Signed-off-by: wbpcode <[email protected]>
|
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 <[email protected]> * Revert "router: remove optional http filters because it's hcm dependent" This reverts commit 1725ce7. Signed-off-by: wbpcode <[email protected]> * add runtime guard/tests/change log Signed-off-by: wbpcode <[email protected]> * fix more test Signed-off-by: wbpcode <[email protected]> * add route/virual host level optional flag support and test and change log Signed-off-by: wbpcode <[email protected]> * fix format Signed-off-by: wbpcode <[email protected]> * fix docs Signed-off-by: wbpcode <[email protected]> * fix test Signed-off-by: wbpcode <[email protected]> * Update changelogs/current.yaml Co-authored-by: Adi (Suissa) Peleg <[email protected]> Signed-off-by: code <[email protected]> * address all comments Signed-off-by: wbpcode <[email protected]> * fix conflict Signed-off-by: wbpcode <[email protected]> * address comment Signed-off-by: wbpcode <[email protected]> * address comments Signed-off-by: wbpcode <[email protected]> * fix test and add new test to cover the new exception throwing Signed-off-by: wbpcode <[email protected]> --------- Signed-off-by: wbpcode <[email protected]> Signed-off-by: code <[email protected]> Co-authored-by: Adi (Suissa) Peleg <[email protected]> Signed-off-by: Ryan Eskin <[email protected]>
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 theConfigImplshould be hcm independent.However, in the current codebase, the optional http filters is extracted from the HCM and used for the
ConfigImplcreation.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.