envoy icon indicating copy to clipboard operation
envoy copied to clipboard

grpc_transcoder: support case_insensitive_enum_parsing

Open qiwzhang opened this issue 3 years ago • 6 comments

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,

qiwzhang avatar Sep 02 '22 02:09 qiwzhang

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

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/22965 was opened by qiwzhang.

see: more, trace.

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

phlax avatar Sep 02 '22 05:09 phlax

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.

qiwzhang avatar Sep 02 '22 16:09 qiwzhang

seems sensible to me @markdroth could you take a look

phlax avatar Sep 07 '22 12:09 phlax

@envoyproxy/api-shepherds could you review this pr

qiwzhang avatar Sep 21 '22 15:09 qiwzhang

@envoyproxy/dependency-shepherds, could you review this pr? thanks

qiwzhang avatar Sep 21 '22 15:09 qiwzhang

@qiwzhang i think this change needs approval from an api shepherd - @adisuissa would you mind taking a look

phlax avatar Sep 23 '22 10:09 phlax

Hi @envoyproxy/dependency-shepherds could you approve this dependency update? Thanks

qiwzhang avatar Sep 23 '22 18:09 qiwzhang