envoy
envoy copied to clipboard
grpc_transcoder: support case_insensitive_enum_parsing
Signed-off-by: Wayne Zhang [email protected]
Add a new config case_insensitive_enum_parsing to enable enum value case insensitive parsing.
Normally, only all upper case enum values are supported. With this flag, other non all upper cases will be supported too.
To fix: https://github.com/GoogleCloudPlatform/esp-v2/issues/726
Actually implementation is https://github.com/grpc-ecosystem/grpc-httpjson-transcoding/pull/75
Risk Level: None, guided by the flag Testing: Unit-test and integration test Docs Changes: No Release Notes: Yes,
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @markdroth
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @phlax
somewhat related to this - iirc the Envoy binary will accept lower case enums whereas the protobuf validator doesnt - would be good to get some more consistency in how these are handled
When envoy loading json config, it is already setting options.case_insensitive_enum_parsing = true; here
I did not find the protobuf validator code, it may not set it.
For grpc_transcoder, we could just default it to be on to support case insensitive. But it may break existing customer traffic, lower case json was rejected before, with newer versions, it starts to work. I feel it is better to have the config, let users to turn it on based on their cases.
seems sensible to me @markdroth could you take a look
@envoyproxy/api-shepherds could you review this pr
@envoyproxy/dependency-shepherds, could you review this pr? thanks
@qiwzhang i think this change needs approval from an api shepherd - @adisuissa would you mind taking a look
Hi @envoyproxy/dependency-shepherds could you approve this dependency update? Thanks