Skip to content

Listener ECDS: Adding config provider manager implemantion for listener filter - #20560

Merged
mattklein123 merged 27 commits into
envoyproxy:mainfrom
yanjunxiang-google:ecds_listener
May 2, 2022
Merged

mattklein123 merged 27 commits into
envoyproxy:mainfrom
yanjunxiang-google:ecds_listener

Conversation

@yanjunxiang-google

@yanjunxiang-google yanjunxiang-google commented Mar 28, 2022 •

Copy link
Copy Markdown
Contributor

Problem description:
Listener ECDS: Adding FilterConfigProviderManagerImpl class implemantion for listener filter.
This is the 3rd PR to support listener filter ECDS as in issue: #20049. It includes:

  1. The class definition of ListenerFilterConfigProviderManagerImpl.
  2. Moving getMessage() method to the base class to avoid duplicated code.
  3. Unit test cases for ListenerFilterConfigProviderManagerImpl.

Build:
passed

Testing:
passed

Release Notes:
N/A

Issues: ecds: add support for listener filters #20049

Signed-off-by: Yanjun Xiang [email protected]

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

…ion for Listener filter.

This is the 3rd PR to support listener ECDS. It includes:
1) The class definition of ListenerFilterConfigProviderManagerImpl.
2) Moving getMessage() method to the base class to avoid duplicated code.
3) Unit test cases for ListenerFilterConfigProviderManagerImpl.

Signed-off-by: Yanjun Xiang <[email protected]>
@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

/assign @adisuissa @kyessenov @yanavlasov

Signed-off-by: Yanjun Xiang <[email protected]>
Comment thread envoy/filter/config_provider_manager.h Resolved
@yanjunxiang-google yanjunxiang-google changed the title Listener ECDS: Adding FilterConfigProviderManagerImpl class implemantion for listener filter Listener ECDS: Adding config provider manager implemantion for listener filter Mar 29, 2022

@adisuissa adisuissa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this, mostly small things.

Comment thread envoy/filter/config_provider_manager.h Resolved
@kyessenov

Copy link
Copy Markdown
Contributor

For something like this, an xDS integration test would be useful. There is one for HTTP, so it can be copied and adapted fairly easy.

@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

For something like this, an xDS integration test would be useful. There is one for HTTP, so it can be copied and adapted fairly easy.

Yes, that's planned.

This PR just added a ListenerFilterConfigManagerImpl definition. It's not used any where. In the planned next PR, I will be creating an object of it in class ListenerManagerImpl, and using it to create listener filter factories, and build listener filter chain. In that PR, I will be extending the current test/integration/extension_discovery_integration_test.cc to test listener ECDS functionality end-to-end.

Signed-off-by: Yanjun Xiang <[email protected]>
@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #20560 (comment) was created by @yanjunxiang-google.

see: more, trace.

@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

/assign @htuch

Signed-off-by: Yanjun Xiang <[email protected]>
@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

@adisuissa @kyessenov PTAL

Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Yanjun Xiang <[email protected]>

@adisuissa adisuissa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, overall LGTM.
@soulxu can you take another look.

using FilterConfigSubscriptionSharedPtr = std::shared_ptr<FilterConfigSubscription>;

// These helper functions throw exceptions. Thus can not be defined in .h files.
void validateProtoConfigDefaultFactoryHelper(const bool null_default_factory,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Try having functions which are scoped inside a class or are in an empty namespace.
The helper functions should probably be either private or protected functions in one of the classes below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ACK

@soulxu

soulxu commented Apr 22, 2022

Copy link
Copy Markdown
Member

Thanks, overall LGTM. @soulxu can you take another look.

overall LGTM also! except for the listener filter matcher #20560 (comment)

Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Yanjun Xiang <[email protected]>
@soulxu

soulxu commented Apr 25, 2022

Copy link
Copy Markdown
Member

@yanjunxiang-google thanks! that is perfect. Then this is LGTM now.

@adisuissa adisuissa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, LGTM modulo test nits.
@htuch can you PTAL?

Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Yanjun Xiang <[email protected]>
@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

@htuch @kyessenov PTAL

@adisuissa adisuissa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, left a small nit.

Config::Utility::getFactoryByType<Server::Configuration::NamedHttpFilterConfigFactory>(
proto_config);
if (default_factory == nullptr) {
void FilterConfigProviderManagerImplBase::validateProtoConfigDefaultFactory(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IIUC both this method and validateProtoConfigTypeUrl are only called once.
Is there a plan to call them in other places in later PRs? If not, then we should just inline their contents in the call place.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comments.

This method throw exception. Envoy CI scripts doesn't allow throw exception in .h files.

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. I think @kyessenov can do final pass/merge (now as a maintainer). Generally I'd also ask for a non-Googler, but this is mostly an internal change and consistent with previous work on ECDS, so won't insist on that unless someone feels strongly in favor.

@adisuissa adisuissa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@adisuissa

Copy link
Copy Markdown
Contributor

LGTM. I think @kyessenov can do final pass/merge (now as a maintainer). Generally I'd also ask for a non-Googler, but this is mostly an internal change and consistent with previous work on ECDS, so won't insist on that unless someone feels strongly in favor.

Matt volunteered to do a final pass, once @kyessenov LGTM's this PR.

@yanjunxiang-google

yanjunxiang-google commented May 2, 2022 •

Copy link
Copy Markdown
Contributor Author

/assign @mattklein123

@repokitteh-read-only

Copy link
Copy Markdown

neither of Thanks, for, help, reviewing! can be assigned to this issue.

🐱

Caused by: a #20560 (comment) was created by @yanjunxiang-google.

see: more, trace.

@yanjunxiang-google

Copy link
Copy Markdown
Contributor Author

LGTM. I think @kyessenov can do final pass/merge (now as a maintainer). Generally I'd also ask for a non-Googler, but this is mostly an internal change and consistent with previous work on ECDS, so won't insist on that unless someone feels strongly in favor.

Matt volunteered to do a final pass, once @kyessenov LGTM's this PR.

Thanks @mattklein123 for help reviewing!

@mattklein123 mattklein123 self-assigned this May 2, 2022
@yanjunxiang-google

yanjunxiang-google commented May 2, 2022 •

Copy link
Copy Markdown
Contributor Author

For reviewers:

This PR added the building blocks to support listener filter ECDS. But it is not hooked into listener manager code yet (e.g.

ProdListenerComponentFactory::createListenerFilterFactoryList_(
). The hooking to the listener manager and corresponding code, also the listener filter ECDS integration test, will be done in the coming PR.

@mattklein123
mattklein123 merged commit 2f7f14b into envoyproxy:main May 2, 2022
ravenblackx pushed a commit to ravenblackx/envoy that referenced this pull request Jun 8, 2022
…er filter (envoyproxy#20560)

This is the 3rd PR to support listener ECDS. It includes:
1) The class definition of ListenerFilterConfigProviderManagerImpl.
2) Moving getMessage() method to the base class to avoid duplicated code.
3) Unit test cases for ListenerFilterConfigProviderManagerImpl.

Signed-off-by: Yanjun Xiang <[email protected]>
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.

9 participants