-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
schema_validator_tool errors on valid envoy.extensions.common.matching.v3.ExtensionWithMatcher configuration #36808
Comments
@phlax @mattklein123 Hey. I'm happy to try and PR a fix for this if you could give me some pointers into what area the issue may be in the codebase. I'm assuming somewhere in or a dependancy of This is reducing our confidence in our Envoy configuration deployments as we can no longer run the schema validator in CI due to this error. |
are you sure you are using a this works for me: $ docker run -u1000 -v $PWD/docs/root/intro/arch_overview/advanced/matching/_include/complicated.yaml:/workspace/envoy.yaml -it --rm envoyproxy/envoy:tools-dev schema_validator_tool -t bootstrap -c /workspace/envoy.yaml
Validating: /workspace/envoy.yaml |
@phlax your above command fails for me on $ git clone [email protected]:envoyproxy/envoy
$ cd envoy
$ docker run -u1000 -v $PWD/docs/root/intro/arch_overview/advanced/matching/_include/complicated.yaml:/workspace/envoy.yaml -it --rm envoyproxy/envoy:tools-dev schema_validator_tool -t bootstrap -c /w
orkspace/envoy.yaml
Unable to find image 'envoyproxy/envoy:tools-dev' locally
tools-dev: Pulling from envoyproxy/envoy
a186900671ab: Pull complete
4c91c271afe1: Pull complete
fc0025bdf5c0: Pull complete
59049ab27e5c: Pull complete
dea117be6612: Pull complete
75be11fbe7be: Pull complete
9d8dff7393be: Pull complete
3a1ac85964ea: Pull complete
4f4fb700ef54: Pull complete
8e93de2edae8: Pull complete
Digest: sha256:c102de1b98647d60c52f70a115616064073ea2534b1c176879d68d6c4b7bd8a7
Status: Downloaded newer image for envoyproxy/envoy:tools-dev
Validating: /workspace/envoy.yaml
Unable to parse JSON as proto (INVALID_ARGUMENT: could not find @type 'type.googleapis.com/envoy.extensions.common.matching.v3.ExtensionWithMatcher'): {"static_resources":{"listeners":[{"filter_chains
":[{"filters":[{"name":"envoy.filters.network.http_connection_manager","typed_config":{"stat_prefix":"ingress_http","http_filters":[{"name":"with-matcher","typed_config":{"extension_config":{"name":"e
nvoy.filters.http.fault","typed_config":{"@type":"type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault","delay":{"percentage":{"denominator":"HUNDRED","numerator":0},"fixed_delay":"3s"
},"abort":{"percentage":{"denominator":"HUNDRED","numerator":0},"http_status":503}}},"@type":"type.googleapis.com/envoy.extensions.common.matching.v3.ExtensionWithMatcher","xds_matcher":{"matcher_tree
":{"exact_match_map":{"map":{"some_value_to_match_on":{"matcher":{"matcher_list":{"matchers":[{"on_match":{"action":{"name":"skip","typed_config":{"@type":"type.googleapis.com/envoy.extensions.filters
.common.matcher.action.v3.SkipFilter"}}},"predicate":{"or_matcher":{"predicate":[{"single_predicate":{"value_match":{"exact":"foo"},"input":{"name":"request-headers","typed_config":{"@type":"type.goog
leapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput","header_name":"second-header"}}}},{"single_predicate":{"value_match":{"exact":"bar"},"input":{"name":"request-headers","typed_config":{"@t
ype":"type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput","header_name":"second-header"}}}}]}}}]}}}}},"input":{"typed_config":{"@type":"type.googleapis.com/envoy.type.matcher.v3.Htt
pRequestHeaderMatchInput","header_name":"some-header"},"name":"request-headers"}}}}},{"name":"envoy.filters.http.router","typed_config":{"@type":"type.googleapis.com/envoy.extensions.filters.http.rout
er.v3.Router"}}],"@type":"type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager","route_config":{"virtual_hosts":[{"domains":["*"],"routes":[{"match":{"
prefix":"/"},"route":{"cluster":"service_foo"}}],"name":"default"}]}}}]}],"address":{"socket_address":{"address":"0.0.0.0","port_value":443}},"listener_filters":null}],"clusters":[{"name":"service_foo
","load_assignment":{"cluster_name":"some_service","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"port_value":8080,"address":"127.0.0.1"}}}}]}]}}]}} |
i see - my version of the container was out of date - with latest it also fails - lmc where this started failing fwiw i tried this way as the referenced config is tested with this tool (at least its lib i think) in ci so confusing that it would fail with the published tool |
passes with v1.29 version but fails on all other versions since |
ive bisected the failing change to ef0a5b2 (updated) cc @alyssawilk |
Thank you @alyssawilk and @phlax 🙇🏻 |
Fixes envoyproxy#36808 --------- Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
Fixes envoyproxy#36808 --------- Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
Fixes envoyproxy#36808 --------- Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
Fixes #36808 --------- Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
Fixes #36808 --------- Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
Fixes #36808 --------- Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Ryan Northey <[email protected]>
Fixes envoyproxy/envoy#36808 --------- Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Ryan Northey <[email protected]> Signed-off-by: Dario Cillerai <[email protected]>
Title: schema_validator_tool errors on valid
envoy.extensions.common.matching.v3.ExtensionWithMatcher
configurationDescription:
The
schema_validator_tool
errors on a valid, reduced test case, configuration of theenvoy.extensions.common.matching.v3.ExtensionWithMatcher
, with anINVALID_ARGUMENT: could not find @type 'type.googleapis.com/envoy.extensions.common.matching.v3.ExtensionWithMatcher')
error message.Repro steps:
Use the example configuration, taken directly from the public docs for Matching API: Match Tree Validation, and pass to the
schema_validator_tool
, such asschema_validator_tool --schema-type bootstrap --config-path test.yaml
and the validator will return an error.https://www.envoyproxy.io/docs/envoy/v1.32.0/intro/arch_overview/advanced/matching/matching_api#match-tree-validation
This configuration is valid and works when ran via
envoy --mode serve
orenvoy --mode validate
.Config:
Logs:
The text was updated successfully, but these errors were encountered: