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

utility: convert typed_config to factory config #10418

Merged
merged 2 commits into from
Mar 18, 2020
Merged

Conversation

yxue
Copy link
Contributor

@yxue yxue commented Mar 17, 2020

Signed-off-by: Yan Xue yxyan@google.com

Description: convert typed_config to factory config
Risk Level: Low
Testing: Unit test
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]

Signed-off-by: Yan Xue <yxyan@google.com>
@yxue
Copy link
Contributor Author

yxue commented Mar 17, 2020

@htuch I extracted the utility from #10369

Signed-off-by: Yan Xue <yxyan@google.com>
*/
template <class Factory>
static ProtobufTypes::MessagePtr
translateAnyToFactoryConfig(const ProtobufWkt::Any& typed_config,
Copy link
Member

Choose a reason for hiding this comment

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

Thanks, this looks clean. Are there some existing sites that we should refactor to use this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't do a thorough search but I guess existing proto should include the deprecated config field. Otherwise, this function should exist for converting the typed config to factory configuration.

We could replace all the translateToFactoryConfig with translateAnyToFactoryConfig because the config field is deprecated. It will break the compatibility.

@htuch htuch self-assigned this Mar 17, 2020
@htuch htuch added the waiting label Mar 17, 2020
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks!

@htuch htuch merged commit 8704403 into envoyproxy:master Mar 18, 2020
@yxue yxue deleted the test branch March 18, 2020 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants