Remove the hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY#17804
Remove the hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY#17804tyxia wants to merge 1 commit intoenvoyproxy:mainfrom
hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY#17804Conversation
Signed-off-by: Tianyu Xia <tyxia@google.com>
|
/assign @htuch |
| api_config_source); | ||
| const auto transport_api_version = Utility::getAndCheckTransportVersion(api_config_source); | ||
| switch (api_config_source.api_type()) { | ||
| case envoy::config::core::v3::ApiConfigSource::hidden_envoy_deprecated_UNSUPPORTED_REST_LEGACY: |
There was a problem hiding this comment.
Since the PGV annotations for the v3 version of this field DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE don't force rejection in some situations, should we keep this? When we get rid of generated_api_version we can then either use a PGV annotation or the DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE name here instead.
There was a problem hiding this comment.
Thanks for the review!
I think it should be safe to remove this because default case (i.e. default: NOT_REACHED_GCOVR_EXCL_LINE;) of switch statement will catch the case where people use this field by mistake.
But i feel keeping this might provide better/richer Exception message.
I will revert this change then/
There was a problem hiding this comment.
Yeah, we can't rely on NOT_REACHED_GCOVR_EXCL_LINE, since this is an assertion, rather than a graceful configuration rejection which we see when we throw EnvoyException.
Signed-off-by: Tianyu Xia tyxia@google.com
Risk Level: Low
Testing: CI