Skip to content

Put dns_resolution_config field in dns_filter.proto as deprecated#18649

Merged
mattklein123 merged 4 commits intoenvoyproxy:mainfrom
yanjunxiang-google:dns_filter_proto
Oct 22, 2021
Merged

Put dns_resolution_config field in dns_filter.proto as deprecated#18649
mattklein123 merged 4 commits intoenvoyproxy:mainfrom
yanjunxiang-google:dns_filter_proto

Conversation

@yanjunxiang-google
Copy link
Copy Markdown
Contributor

@yanjunxiang-google yanjunxiang-google commented Oct 16, 2021

Problem Description:
This PR is the code changes to deprecate dns_resolution_config field in dns_filter.proto for issue: #18053. This is a follow up PR of #17479.

Solution:

  1. Put dns_resolution_config field in dns_filter.proto as deprecated.
  2. This deprecation is causing CI compile_time_options test scripts failure, due to dns_filter_test.cc and dns_filter_integration_test.cc have dns_resolution_config in the config YAML file, and also called loadFromYamlAndValidate(), which will fail if --define=deprecated_features=disabled is included in the test command.
  3. Replace dns_resolution_config in the config YAML file with typed_dns_resolution_config.

Build:
passed

Testing:
passed

Release Notes:
N/A

Issues: deprecate dns_resolution_config #18053

Fix#18053

Signed-off-by: Yanjun Xiang yanjunxiang@google.com

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:]

Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

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: #18649 was opened by yanjunxiang-google.

see: more, trace.

@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

yanjunxiang-google commented Oct 16, 2021

For reviewers:

The changes replaced dns_resolution_config with the newly added typed_dns_resolver_config. The reasons to not test both of them are:

  1. dns_filter code are using typed_dns_resolver_config to create DNS resolver.
  2. if dns_resolution_config is in the configuration, the code converts them into typed_dns_resolver_config before creating DNS resolver.
  3. The dns_resolution_config to typed_dns_resolver_config conversion part is now done by a common utility function implemented in dns_factory.[h|cc], and this conversion logic is heavily tested in dns_factory_test.cc, cluster_manager_impl_test.cc, .... Thus it's unnecessary to test them again here also wrap the tests with DEPRECATED_FEATURE_TEST().

@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

/assign @yanavlasov @htuch

@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

/assign @suniltheta @jpeach

@repokitteh-read-only
Copy link
Copy Markdown

neither of @suniltheta, @jpeach can be assigned to this issue.

🐱

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

see: more, trace.

Copy link
Copy Markdown
Contributor

@yanavlasov yanavlasov left a comment

Choose a reason for hiding this comment

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

/wait

Comment thread test/extensions/filters/udp/dns_filter/dns_filter_test.cc
Comment thread test/extensions/filters/udp/dns_filter/dns_filter_test.cc
Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
Copy link
Copy Markdown
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.

/lgtm api

Copy link
Copy Markdown
Contributor

@suniltheta suniltheta left a comment

Choose a reason for hiding this comment

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

Few minor changes.

Comment thread test/extensions/filters/udp/dns_filter/dns_filter_test.cc
Comment thread test/extensions/filters/udp/dns_filter/dns_filter_test.cc Outdated
Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

yanjunxiang-google commented Oct 20, 2021 via email

@KBaichoo
Copy link
Copy Markdown
Contributor

/retest

@repokitteh-read-only
Copy link
Copy Markdown

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

🐱

Caused by: a #18649 (comment) was created by @KBaichoo.

see: more, trace.

@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

/assign @mattklein123

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

7 participants