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

xds: enable the is_optional field for HttpFilter #16119

Merged
merged 16 commits into from
May 18, 2021

Conversation

soulxu
Copy link
Member

@soulxu soulxu commented Apr 22, 2021

Commit Message: xds: enable the is_optional field for HttpFilter

Additional Description:
Enable is_optional field for HttpFilter. The default value is false, it will keep the same behavior with the current implementation. The envoy will reject the unsupported HTTP filter, also will reject the unsupported HTTP filter in typed per filter config. When the value is true, the unsupported HTTP filter will be ignored by the envoy, also will be ignored by typed per filter config, with a warning log.

Risk Level: low
Testing: unit tests and integration tests are added
Docs Changes: API doc is added
Release Notes: added as new feature
Fixes #15770
Fixes #15025

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
…d config

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
envoyproxy/api-shepherds assignee is @lizan
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #16119 was opened by soulxu.

see: more, trace.

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
if (Runtime::runtimeFeatureEnabled(
"envoy.reloadable_features.check_unsupported_typed_per_filter_config")) {
throw EnvoyException(
fmt::format("The filter {} doesn't support virtual host-specific configurations", name));
Copy link
Member Author

@soulxu soulxu Apr 22, 2021

Choose a reason for hiding this comment

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

Should we ignore the unsupported typed per filter config for the optional http filter also? I assume there will be the same upgrade issue with the new filter. like, the filter added typed per filter config in the new version, the old version can't support it. Although there is a runtime flag here, the is_optional flag feels better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think that if is_optional is set, we should ignore unknown per-route filter configs.

Copy link
Member Author

Choose a reason for hiding this comment

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

got it, thanks

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
@soulxu
Copy link
Member Author

soulxu commented Apr 26, 2021

cc @stevenzzzz @markdroth

source/common/config/utility.h Outdated Show resolved Hide resolved
source/common/config/utility.h Outdated Show resolved Hide resolved
include/envoy/router/route_config_provider_manager.h Outdated Show resolved Hide resolved
@lizan lizan added the waiting label Apr 29, 2021
@soulxu
Copy link
Member Author

soulxu commented May 4, 2021

sorry for the reply late, I will update the PR after the holidays.

soulxu added 5 commits May 7, 2021 03:07
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
… optional

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Signed-off-by: He Jie Xu <hejie.xu@intel.com>
@lizan
Copy link
Member

lizan commented May 12, 2021

Can you resolve conflicts? Other than that LGTM

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
@soulxu
Copy link
Member Author

soulxu commented May 13, 2021

Can you resolve conflicts? Other than that LGTM

Just resolved, thanks!

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
@lizan lizan merged commit ea4cadc into envoyproxy:main May 18, 2021
@soulxu
Copy link
Member Author

soulxu commented May 19, 2021

@lizan thanks!

leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
Enable `is_optional` field for `HttpFilter`. The default value is `false`, it will keep the same behavior with the current implementation. The envoy will reject the unsupported HTTP filter, also will reject the unsupported HTTP filter in typed per filter config. When the value is `true`, the unsupported HTTP filter will be ignored by the envoy, also will be ignored by typed per filter config, with a warning log.

Risk Level: low
Testing: unit tests and integration tests are added
Docs Changes: API doc is added
Release Notes: added as new feature
Fixes envoyproxy#15770 
Fixes envoyproxy#15025

Signed-off-by: He Jie Xu <hejie.xu@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[xds] Relax the CHECK on factories for typed per-filter config allow HTTP filters to be marked as optional
3 participants