From 0edf8d76d0635234f1b8166f6fa01940bca8e284 Mon Sep 17 00:00:00 2001 From: Xuyang Tao Date: Mon, 17 Aug 2020 17:08:26 -0700 Subject: [PATCH] Update api version v7 -> v8 (#284) --- api/README.md | 8 ++--- api/VERSION | 2 +- api/envoy/{v7 => v8}/http/backend_auth/BUILD | 6 ++-- .../{v7 => v8}/http/backend_auth/config.proto | 8 ++--- .../{v7 => v8}/http/backend_routing/BUILD | 2 +- .../http/backend_routing/config.proto | 2 +- api/envoy/{v7 => v8}/http/common/BUILD | 2 +- api/envoy/{v7 => v8}/http/common/base.proto | 6 ++-- api/envoy/{v7 => v8}/http/path_matcher/BUILD | 6 ++-- .../{v7 => v8}/http/path_matcher/config.proto | 6 ++-- .../{v7 => v8}/http/service_control/BUILD | 6 ++-- .../http/service_control/config.proto | 12 ++++---- .../http/service_control/requirement.proto | 2 +- api/scripts/go_proto_gen.sh | 30 +++++++++---------- examples/auth/envoy_config.json | 2 +- examples/dynamic_routing/envoy_config.json | 6 ++-- .../grpc_dynamic_routing/envoy_config.json | 6 ++-- examples/service_control/envoy_config.json | 4 +-- .../testdata/path_matcher/envoy_config.json | 6 ++-- src/envoy/http/backend_auth/BUILD | 4 +-- src/envoy/http/backend_auth/README.md | 2 +- src/envoy/http/backend_auth/config_parser.h | 2 +- .../http/backend_auth/config_parser_impl.cc | 6 ++-- .../http/backend_auth/config_parser_impl.h | 8 ++--- .../backend_auth/config_parser_impl_test.cc | 2 +- src/envoy/http/backend_auth/filter_config.h | 2 +- .../http/backend_auth/filter_config_impl.h | 10 +++---- src/envoy/http/backend_auth/filter_factory.cc | 8 ++--- src/envoy/http/backend_routing/BUILD | 4 +-- src/envoy/http/backend_routing/README.md | 2 +- src/envoy/http/backend_routing/filter.cc | 2 +- .../http/backend_routing/filter_config.h | 10 +++---- .../backend_routing/filter_config_test.cc | 4 +-- .../http/backend_routing/filter_factory.cc | 8 ++--- src/envoy/http/backend_routing/filter_test.cc | 2 +- src/envoy/http/path_matcher/BUILD | 2 +- src/envoy/http/path_matcher/README.md | 2 +- src/envoy/http/path_matcher/filter.cc | 4 +-- src/envoy/http/path_matcher/filter_config.cc | 4 +-- src/envoy/http/path_matcher/filter_config.h | 12 ++++---- .../http/path_matcher/filter_config_test.cc | 18 +++++------ src/envoy/http/path_matcher/filter_factory.cc | 8 ++--- src/envoy/http/path_matcher/filter_test.cc | 2 +- src/envoy/http/service_control/BUILD | 8 ++--- .../http/service_control/client_cache.cc | 4 +-- src/envoy/http/service_control/client_cache.h | 10 +++---- .../http/service_control/client_cache_test.cc | 4 +-- .../http/service_control/config_parser.cc | 2 +- .../http/service_control/config_parser.h | 28 ++++++++--------- .../service_control/config_parser_test.cc | 2 +- .../http/service_control/filter_config.h | 6 ++-- .../http/service_control/filter_factory.cc | 8 ++--- .../http/service_control/filter_fuzz_test.cc | 4 +-- .../http/service_control/handler_impl_test.cc | 2 +- .../http/service_control/handler_utils.cc | 10 +++---- .../http/service_control/handler_utils.h | 10 +++---- .../service_control/handler_utils_test.cc | 8 ++--- src/envoy/http/service_control/http_call.cc | 4 +-- src/envoy/http/service_control/http_call.h | 6 ++-- .../http/service_control/http_call_test.cc | 2 +- src/envoy/http/service_control/mocks.h | 2 +- .../service_control/service_control_call.h | 4 +-- .../service_control_call_impl.cc | 6 ++-- .../service_control_call_impl.h | 14 ++++----- src/go/configgenerator/listener_generator.go | 10 +++---- .../listener_generator_test.go | 24 +++++++-------- src/go/configgenerator/route_generator.go | 2 +- src/go/configinfo/method_info.go | 4 +-- src/go/configinfo/service_info.go | 4 +-- src/go/configinfo/service_info_test.go | 4 +-- .../testdata/test_fetch_listeners.go | 18 +++++------ .../test_fixed_mode_dynamic_routing.go | 6 ++-- src/go/metadata/metadata_fetcher.go | 2 +- src/go/metadata/metadata_fetcher_test.go | 2 +- src/go/util/marshal.go | 16 +++++----- tests/fuzz/structured_inputs/BUILD | 6 ++-- .../backend_routing_filter.proto | 4 +-- .../path_matcher_filter.proto | 4 +-- .../service_control_filter.proto | 4 +-- 79 files changed, 252 insertions(+), 252 deletions(-) rename api/envoy/{v7 => v8}/http/backend_auth/BUILD (80%) rename api/envoy/{v7 => v8}/http/backend_auth/config.proto (87%) rename api/envoy/{v7 => v8}/http/backend_routing/BUILD (93%) rename api/envoy/{v7 => v8}/http/backend_routing/config.proto (97%) rename api/envoy/{v7 => v8}/http/common/BUILD (94%) rename api/envoy/{v7 => v8}/http/common/base.proto (94%) rename api/envoy/{v7 => v8}/http/path_matcher/BUILD (80%) rename api/envoy/{v7 => v8}/http/path_matcher/config.proto (90%) rename api/envoy/{v7 => v8}/http/service_control/BUILD (83%) rename api/envoy/{v7 => v8}/http/service_control/config.proto (92%) rename api/envoy/{v7 => v8}/http/service_control/requirement.proto (98%) diff --git a/api/README.md b/api/README.md index 533343b19..1145d6aa0 100644 --- a/api/README.md +++ b/api/README.md @@ -4,8 +4,8 @@ This folder stores filter config proto files for ESPv2 http filters. ## Config versioning: ESPv2 config is versioned. The current version is stored in `api/VERSION` file. -The folder names under `api/` contain version, e.g. `api/envoy/v7/http/backend_auth`. -The proto package names contain version too, e.g. `espv2.api.envoy.v7.http.common.Pattern`. +The folder names under `api/` contain version, e.g. `api/envoy/v8/http/backend_auth`. +The proto package names contain version too, e.g. `espv2.api.envoy.v8.http.common.Pattern`. ## Versioning Rules: When making changes to the config proto files, make sure: @@ -15,7 +15,7 @@ When making changes to the config proto files, make sure: ## Steps to increase config version If a breaking change is required, use following steps to increase config version. * Increase `api/VERSION` to a newer version, e.g. from `v6` to `v7`. -* Rename folder name from `api/envoy/v6/http` to `api/envoy/v7/http`. -* Replace package names from `api.envoy.v6.http` to `api.envoy.v7.http` for all proto files under folder `api/`. +* Rename folder name from `api/envoy/v6/http` to `api/envoy/v8/http`. +* Replace package names from `api.envoy.v6.http` to `api.envoy.v8.http` for all proto files under folder `api/`. Above steps can be achieved by running script `api/scripts/update_version.sh`. diff --git a/api/VERSION b/api/VERSION index 02a819f21..a00f43e30 100644 --- a/api/VERSION +++ b/api/VERSION @@ -1 +1 @@ -v7 +v8 diff --git a/api/envoy/v7/http/backend_auth/BUILD b/api/envoy/v8/http/backend_auth/BUILD similarity index 80% rename from api/envoy/v7/http/backend_auth/BUILD rename to api/envoy/v8/http/backend_auth/BUILD index 9d8ab5f23..75defee8c 100644 --- a/api/envoy/v7/http/backend_auth/BUILD +++ b/api/envoy/v8/http/backend_auth/BUILD @@ -10,16 +10,16 @@ api_cc_py_proto_library( ], visibility = ["//visibility:public"], deps = [ - "//api/envoy/v7/http/common:base_proto", + "//api/envoy/v8/http/common:base_proto", ], ) go_proto_library( name = "config_go_proto", - importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_auth", + importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_auth", proto = ":config_proto", deps = [ - "//api/envoy/v7/http/common:base_go_proto", + "//api/envoy/v8/http/common:base_go_proto", "@com_envoyproxy_protoc_gen_validate//validate:go_default_library", ], ) diff --git a/api/envoy/v7/http/backend_auth/config.proto b/api/envoy/v8/http/backend_auth/config.proto similarity index 87% rename from api/envoy/v7/http/backend_auth/config.proto rename to api/envoy/v8/http/backend_auth/config.proto index 0f29d05e3..0b6fa1c3e 100644 --- a/api/envoy/v7/http/backend_auth/config.proto +++ b/api/envoy/v8/http/backend_auth/config.proto @@ -14,9 +14,9 @@ syntax = "proto3"; -package espv2.api.envoy.v7.http.backend_auth; +package espv2.api.envoy.v8.http.backend_auth; -import "api/envoy/v7/http/common/base.proto"; +import "api/envoy/v8/http/common/base.proto"; import "validate/validate.proto"; message BackendAuthRule { @@ -42,9 +42,9 @@ message FilterConfig { // The Instance Metadata Server uri used to fetch id token from Instance // Metadata Server. - espv2.api.envoy.v7.http.common.HttpUri imds_token = 2; + espv2.api.envoy.v8.http.common.HttpUri imds_token = 2; // Information used to fetch id token from Google Cloud IAM. - espv2.api.envoy.v7.http.common.IamTokenInfo iam_token = 3; + espv2.api.envoy.v8.http.common.IamTokenInfo iam_token = 3; } } diff --git a/api/envoy/v7/http/backend_routing/BUILD b/api/envoy/v8/http/backend_routing/BUILD similarity index 93% rename from api/envoy/v7/http/backend_routing/BUILD rename to api/envoy/v8/http/backend_routing/BUILD index 36fc8ec57..62d4ee784 100644 --- a/api/envoy/v7/http/backend_routing/BUILD +++ b/api/envoy/v8/http/backend_routing/BUILD @@ -13,7 +13,7 @@ api_cc_py_proto_library( go_proto_library( name = "config_go_proto", - importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_routing", + importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_routing", proto = ":config_proto", deps = [ "@com_envoyproxy_protoc_gen_validate//validate:go_default_library", diff --git a/api/envoy/v7/http/backend_routing/config.proto b/api/envoy/v8/http/backend_routing/config.proto similarity index 97% rename from api/envoy/v7/http/backend_routing/config.proto rename to api/envoy/v8/http/backend_routing/config.proto index 350c172c4..963e09733 100644 --- a/api/envoy/v7/http/backend_routing/config.proto +++ b/api/envoy/v8/http/backend_routing/config.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -package espv2.api.envoy.v7.http.backend_routing; +package espv2.api.envoy.v8.http.backend_routing; import "validate/validate.proto"; diff --git a/api/envoy/v7/http/common/BUILD b/api/envoy/v8/http/common/BUILD similarity index 94% rename from api/envoy/v7/http/common/BUILD rename to api/envoy/v8/http/common/BUILD index 16463d4a1..3b1ede7bb 100644 --- a/api/envoy/v7/http/common/BUILD +++ b/api/envoy/v8/http/common/BUILD @@ -13,7 +13,7 @@ api_cc_py_proto_library( go_proto_library( name = "base_go_proto", - importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/common", + importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/common", proto = ":base_proto", deps = [ "@com_envoyproxy_protoc_gen_validate//validate:go_default_library", diff --git a/api/envoy/v7/http/common/base.proto b/api/envoy/v8/http/common/base.proto similarity index 94% rename from api/envoy/v7/http/common/base.proto rename to api/envoy/v8/http/common/base.proto index 88ccdc1fe..e3fe082e1 100644 --- a/api/envoy/v7/http/common/base.proto +++ b/api/envoy/v8/http/common/base.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -package espv2.api.envoy.v7.http.common; +package espv2.api.envoy.v8.http.common; import "google/protobuf/duration.proto"; import "validate/validate.proto"; @@ -84,10 +84,10 @@ message AccessToken { message IamTokenInfo { // The Google Cloud IAM server uri. - espv2.api.envoy.v7.http.common.HttpUri iam_uri = 1; + espv2.api.envoy.v8.http.common.HttpUri iam_uri = 1; // Information used to get access token. - espv2.api.envoy.v7.http.common.AccessToken access_token = 2; + espv2.api.envoy.v8.http.common.AccessToken access_token = 2; // The Service Account Email. string service_account_email = 3; diff --git a/api/envoy/v7/http/path_matcher/BUILD b/api/envoy/v8/http/path_matcher/BUILD similarity index 80% rename from api/envoy/v7/http/path_matcher/BUILD rename to api/envoy/v8/http/path_matcher/BUILD index 496e5b2cc..3ee3742fc 100644 --- a/api/envoy/v7/http/path_matcher/BUILD +++ b/api/envoy/v8/http/path_matcher/BUILD @@ -10,16 +10,16 @@ api_cc_py_proto_library( ], visibility = ["//visibility:public"], deps = [ - "//api/envoy/v7/http/common:base_proto", + "//api/envoy/v8/http/common:base_proto", ], ) go_proto_library( name = "config_go_proto", - importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/path_matcher", + importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/path_matcher", proto = ":config_proto", deps = [ - "//api/envoy/v7/http/common:base_go_proto", + "//api/envoy/v8/http/common:base_go_proto", "@com_envoyproxy_protoc_gen_validate//validate:go_default_library", ], ) diff --git a/api/envoy/v7/http/path_matcher/config.proto b/api/envoy/v8/http/path_matcher/config.proto similarity index 90% rename from api/envoy/v7/http/path_matcher/config.proto rename to api/envoy/v8/http/path_matcher/config.proto index 72bc638f6..3f12e23bf 100644 --- a/api/envoy/v7/http/path_matcher/config.proto +++ b/api/envoy/v8/http/path_matcher/config.proto @@ -14,14 +14,14 @@ syntax = "proto3"; -package espv2.api.envoy.v7.http.path_matcher; +package espv2.api.envoy.v8.http.path_matcher; -import "api/envoy/v7/http/common/base.proto"; +import "api/envoy/v8/http/common/base.proto"; import "validate/validate.proto"; message PathMatcherRule { // The pattern used to match a HTTP request. - espv2.api.envoy.v7.http.common.Pattern pattern = 1; + espv2.api.envoy.v8.http.common.Pattern pattern = 1; // Operation name (selector) used as a unique ID for the operation. string operation = 2 [(validate.rules).string.min_bytes = 1]; diff --git a/api/envoy/v7/http/service_control/BUILD b/api/envoy/v8/http/service_control/BUILD similarity index 83% rename from api/envoy/v7/http/service_control/BUILD rename to api/envoy/v8/http/service_control/BUILD index 13c1e58c0..8c4279056 100644 --- a/api/envoy/v7/http/service_control/BUILD +++ b/api/envoy/v8/http/service_control/BUILD @@ -11,17 +11,17 @@ api_cc_py_proto_library( ], visibility = ["//visibility:public"], deps = [ - "//api/envoy/v7/http/common:base_proto", + "//api/envoy/v8/http/common:base_proto", "//external:service_proto", ], ) go_proto_library( name = "config_go_proto", - importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control", + importpath = "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control", proto = ":config_proto", deps = [ - "//api/envoy/v7/http/common:base_go_proto", + "//api/envoy/v8/http/common:base_go_proto", "@com_envoyproxy_protoc_gen_validate//validate:go_default_library", "@com_github_googleapis_googleapis//google/api:serviceconfig_go_proto", ], diff --git a/api/envoy/v7/http/service_control/config.proto b/api/envoy/v8/http/service_control/config.proto similarity index 92% rename from api/envoy/v7/http/service_control/config.proto rename to api/envoy/v8/http/service_control/config.proto index 542104426..7f67461bc 100644 --- a/api/envoy/v7/http/service_control/config.proto +++ b/api/envoy/v8/http/service_control/config.proto @@ -14,13 +14,13 @@ syntax = "proto3"; -package espv2.api.envoy.v7.http.service_control; +package espv2.api.envoy.v8.http.service_control; -import "api/envoy/v7/http/service_control/requirement.proto"; +import "api/envoy/v8/http/service_control/requirement.proto"; import "google/api/service.proto"; import "google/protobuf/wrappers.proto"; import "validate/validate.proto"; -import "api/envoy/v7/http/common/base.proto"; +import "api/envoy/v8/http/common/base.proto"; message ServiceControlCallingConfig { // In case of failing to connect to service control service, the requests @@ -114,17 +114,17 @@ message FilterConfig { // Uri used to fetch access token from Instance Metadata Server or the local // token agent server. - espv2.api.envoy.v7.http.common.HttpUri imds_token = 4; + espv2.api.envoy.v8.http.common.HttpUri imds_token = 4; // Information used to fetch access token from Google Cloud IAM. - espv2.api.envoy.v7.http.common.IamTokenInfo iam_token = 6; + espv2.api.envoy.v8.http.common.IamTokenInfo iam_token = 6; } // The service control call configuration. ServiceControlCallingConfig sc_calling_config = 7; // The Http uri to call service control - espv2.api.envoy.v7.http.common.HttpUri service_control_uri = 8; + espv2.api.envoy.v8.http.common.HttpUri service_control_uri = 8; // The prefix added to generated headers string generated_header_prefix = 9 [(validate.rules).string = { diff --git a/api/envoy/v7/http/service_control/requirement.proto b/api/envoy/v8/http/service_control/requirement.proto similarity index 98% rename from api/envoy/v7/http/service_control/requirement.proto rename to api/envoy/v8/http/service_control/requirement.proto index c951773d8..25b788398 100644 --- a/api/envoy/v7/http/service_control/requirement.proto +++ b/api/envoy/v8/http/service_control/requirement.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -package espv2.api.envoy.v7.http.service_control; +package espv2.api.envoy.v8.http.service_control; import "validate/validate.proto"; diff --git a/api/scripts/go_proto_gen.sh b/api/scripts/go_proto_gen.sh index a933d5ad3..072079588 100755 --- a/api/scripts/go_proto_gen.sh +++ b/api/scripts/go_proto_gen.sh @@ -24,22 +24,22 @@ rm -rf vendor/github.com/census-instrumentation/opencensus-proto/gen-go #TODO(bochun): probably we can programatically generate these. # HTTP filter common -bazel build //api/envoy/v7/http/common:base_go_proto -mkdir -p src/go/proto/api/envoy/v7/http/common -cp -f bazel-bin/api/envoy/v7/http/common/base_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/common/* src/go/proto/api/envoy/v7/http/common +bazel build //api/envoy/v8/http/common:base_go_proto +mkdir -p src/go/proto/api/envoy/v8/http/common +cp -f bazel-bin/api/envoy/v8/http/common/base_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/common/* src/go/proto/api/envoy/v8/http/common # HTTP filter service_control -bazel build //api/envoy/v7/http/service_control:config_go_proto -mkdir -p src/go/proto/api/envoy/v7/http/service_control -cp -f bazel-bin/api/envoy/v7/http/service_control/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control/* src/go/proto/api/envoy/v7/http/service_control +bazel build //api/envoy/v8/http/service_control:config_go_proto +mkdir -p src/go/proto/api/envoy/v8/http/service_control +cp -f bazel-bin/api/envoy/v8/http/service_control/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control/* src/go/proto/api/envoy/v8/http/service_control # HTTP filter path_matcher -bazel build //api/envoy/v7/http/path_matcher:config_go_proto -mkdir -p src/go/proto/api/envoy/v7/http/path_matcher -cp -f bazel-bin/api/envoy/v7/http/path_matcher/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/path_matcher/* src/go/proto/api/envoy/v7/http/path_matcher +bazel build //api/envoy/v8/http/path_matcher:config_go_proto +mkdir -p src/go/proto/api/envoy/v8/http/path_matcher +cp -f bazel-bin/api/envoy/v8/http/path_matcher/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/path_matcher/* src/go/proto/api/envoy/v8/http/path_matcher # HTTP filter backend_auth -bazel build //api/envoy/v7/http/backend_auth:config_go_proto -mkdir -p src/go/proto/api/envoy/v7/http/backend_auth -cp -f bazel-bin/api/envoy/v7/http/backend_auth/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_auth/* src/go/proto/api/envoy/v7/http/backend_auth +bazel build //api/envoy/v8/http/backend_auth:config_go_proto +mkdir -p src/go/proto/api/envoy/v8/http/backend_auth +cp -f bazel-bin/api/envoy/v8/http/backend_auth/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_auth/* src/go/proto/api/envoy/v8/http/backend_auth # HTTP filter backend_routing -bazel build //api/envoy/v7/http/backend_routing:config_go_proto -mkdir -p src/go/proto/api/envoy/v7/http/backend_routing -cp -f bazel-bin/api/envoy/v7/http/backend_routing/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_routing/* src/go/proto/api/envoy/v7/http/backend_routing +bazel build //api/envoy/v8/http/backend_routing:config_go_proto +mkdir -p src/go/proto/api/envoy/v8/http/backend_routing +cp -f bazel-bin/api/envoy/v8/http/backend_routing/config_go_proto_/github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_routing/* src/go/proto/api/envoy/v8/http/backend_routing diff --git a/examples/auth/envoy_config.json b/examples/auth/envoy_config.json index 63e4c1645..09ecc9052 100644 --- a/examples/auth/envoy_config.json +++ b/examples/auth/envoy_config.json @@ -155,7 +155,7 @@ { "name": "com.google.espv2.filters.http.path_matcher", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules": [ { "operation": "1.examples_auth_endpoints_cloudesf_testing_cloud_goog.CreateShelf", diff --git a/examples/dynamic_routing/envoy_config.json b/examples/dynamic_routing/envoy_config.json index 792cdbdf2..855f3edc8 100644 --- a/examples/dynamic_routing/envoy_config.json +++ b/examples/dynamic_routing/envoy_config.json @@ -196,7 +196,7 @@ { "name": "com.google.espv2.filters.http.path_matcher", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules": [ { "operation": "1.examples_dynamic_routing_wd6ufmzfya_uc_a_run_app.CreateShelf", @@ -244,7 +244,7 @@ { "name": "com.google.espv2.filters.http.backend_auth", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig", "imdsToken": { "cluster": "metadata-cluster", "timeout": "30s", @@ -261,7 +261,7 @@ { "name": "com.google.espv2.filters.http.backend_routing", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig", "rules": [ { "operation": "1.examples_dynamic_routing_wd6ufmzfya_uc_a_run_app.CreateShelf", diff --git a/examples/grpc_dynamic_routing/envoy_config.json b/examples/grpc_dynamic_routing/envoy_config.json index d9927946c..68b55f52e 100644 --- a/examples/grpc_dynamic_routing/envoy_config.json +++ b/examples/grpc_dynamic_routing/envoy_config.json @@ -198,7 +198,7 @@ { "name": "com.google.espv2.filters.http.path_matcher", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules": [ { "operation": "test.grpc.Test.Cork", @@ -466,7 +466,7 @@ { "name": "com.google.espv2.filters.http.service_control", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.service_control.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.service_control.FilterConfig", "generatedHeaderPrefix": "X-Endpoint-", "imdsToken": { "cluster": "metadata-cluster", @@ -1072,7 +1072,7 @@ { "name": "com.google.espv2.filters.http.backend_auth", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig", "imdsToken": { "cluster": "metadata-cluster", "timeout": "30s", diff --git a/examples/service_control/envoy_config.json b/examples/service_control/envoy_config.json index 5efeb6584..d617ee168 100644 --- a/examples/service_control/envoy_config.json +++ b/examples/service_control/envoy_config.json @@ -116,7 +116,7 @@ { "name": "com.google.espv2.filters.http.path_matcher", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules": [ { "operation": "1.examples_service_control_endpoints_cloudesf_testing_cloud_goog.CreateShelf", @@ -164,7 +164,7 @@ { "name": "com.google.espv2.filters.http.service_control", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.service_control.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.service_control.FilterConfig", "generatedHeaderPrefix": "X-Endpoint-", "imdsToken": { "cluster": "metadata-cluster", diff --git a/examples/testdata/path_matcher/envoy_config.json b/examples/testdata/path_matcher/envoy_config.json index 5dbf8d6f7..38948080c 100644 --- a/examples/testdata/path_matcher/envoy_config.json +++ b/examples/testdata/path_matcher/envoy_config.json @@ -154,7 +154,7 @@ { "name": "com.google.espv2.filters.http.path_matcher", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules": [ { "operation": "1.examples_path_matcher_endpoints_cloudesf_testing_cloud_goog.CORS_**", @@ -224,7 +224,7 @@ { "name": "com.google.espv2.filters.http.backend_auth", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig", "imdsToken": { "cluster": "metadata-cluster", "timeout": "30s", @@ -245,7 +245,7 @@ { "name": "com.google.espv2.filters.http.backend_routing", "typedConfig": { - "@type": "type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig", + "@type": "type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig", "rules": [ { "operation": "1.examples_path_matcher_endpoints_cloudesf_testing_cloud_goog.CORS_libraries_library_id_shelves_shelf_id", diff --git a/src/envoy/http/backend_auth/BUILD b/src/envoy/http/backend_auth/BUILD index c3b8ad1a4..83ce7326d 100644 --- a/src/envoy/http/backend_auth/BUILD +++ b/src/envoy/http/backend_auth/BUILD @@ -33,7 +33,7 @@ envoy_cc_library( repository = "@envoy", deps = [ ":config_parser_lib", - "//api/envoy/v7/http/backend_auth:config_proto_cc_proto", + "//api/envoy/v8/http/backend_auth:config_proto_cc_proto", "//src/envoy/utils:filter_state_utils_lib", "@envoy//source/extensions/filters/http/common:pass_through_filter_lib", ], @@ -48,7 +48,7 @@ envoy_cc_library( ], repository = "@envoy", deps = [ - "//api/envoy/v7/http/backend_auth:config_proto_cc_proto", + "//api/envoy/v8/http/backend_auth:config_proto_cc_proto", "//src/envoy/token:token_subscriber_factory_lib", "@envoy//source/common/common:assert_lib", ], diff --git a/src/envoy/http/backend_auth/README.md b/src/envoy/http/backend_auth/README.md index 103a005a7..d9ae05364 100644 --- a/src/envoy/http/backend_auth/README.md +++ b/src/envoy/http/backend_auth/README.md @@ -19,7 +19,7 @@ This filter is designed to strongly integrate with the following filters: ## Configuration -View the [backend auth configuration proto](../../../../api/envoy/v7/http/backend_auth/config.proto) +View the [backend auth configuration proto](../../../../api/envoy/v8/http/backend_auth/config.proto) for inline documentation. ## Statistics diff --git a/src/envoy/http/backend_auth/config_parser.h b/src/envoy/http/backend_auth/config_parser.h index fa068f93b..2f4924405 100644 --- a/src/envoy/http/backend_auth/config_parser.h +++ b/src/envoy/http/backend_auth/config_parser.h @@ -17,7 +17,7 @@ #include "absl/container/flat_hash_map.h" #include "absl/strings/str_cat.h" -#include "api/envoy/v7/http/backend_auth/config.pb.h" +#include "api/envoy/v8/http/backend_auth/config.pb.h" #include "envoy/thread_local/thread_local.h" #include "src/envoy/token/token_subscriber_factory.h" diff --git a/src/envoy/http/backend_auth/config_parser_impl.cc b/src/envoy/http/backend_auth/config_parser_impl.cc index bd82253e4..c74cb01df 100644 --- a/src/envoy/http/backend_auth/config_parser_impl.cc +++ b/src/envoy/http/backend_auth/config_parser_impl.cc @@ -23,8 +23,8 @@ namespace envoy { namespace http_filters { namespace backend_auth { -using ::espv2::api::envoy::v7::http::backend_auth::FilterConfig; -using ::espv2::api::envoy::v7::http::common::AccessToken; +using ::espv2::api::envoy::v8::http::backend_auth::FilterConfig; +using ::espv2::api::envoy::v8::http::common::AccessToken; using ::google::protobuf::util::TimeUtil; using token::GetTokenFunc; using token::TokenSubscriber; @@ -32,7 +32,7 @@ using token::TokenType; using token::UpdateTokenCallback; AudienceContext::AudienceContext( - const ::espv2::api::envoy::v7::http::backend_auth::BackendAuthRule& + const ::espv2::api::envoy::v8::http::backend_auth::BackendAuthRule& proto_config, Envoy::Server::Configuration::FactoryContext& context, const FilterConfig& filter_config, diff --git a/src/envoy/http/backend_auth/config_parser_impl.h b/src/envoy/http/backend_auth/config_parser_impl.h index 143ae5287..e88160d58 100644 --- a/src/envoy/http/backend_auth/config_parser_impl.h +++ b/src/envoy/http/backend_auth/config_parser_impl.h @@ -17,7 +17,7 @@ #include "absl/container/flat_hash_map.h" #include "absl/strings/str_cat.h" -#include "api/envoy/v7/http/backend_auth/config.pb.h" +#include "api/envoy/v8/http/backend_auth/config.pb.h" #include "common/common/empty_string.h" #include "envoy/thread_local/thread_local.h" #include "src/envoy/http/backend_auth/config_parser.h" @@ -36,10 +36,10 @@ class TokenCache : public Envoy::ThreadLocal::ThreadLocalObject { class AudienceContext { public: AudienceContext( - const ::espv2::api::envoy::v7::http::backend_auth::BackendAuthRule& + const ::espv2::api::envoy::v8::http::backend_auth::BackendAuthRule& proto_config, Envoy::Server::Configuration::FactoryContext& context, - const ::espv2::api::envoy::v7::http::backend_auth::FilterConfig& config, + const ::espv2::api::envoy::v8::http::backend_auth::FilterConfig& config, const token::TokenSubscriberFactory& token_subscriber_factory, token::GetTokenFunc access_token_fn); TokenSharedPtr token() const { @@ -62,7 +62,7 @@ class FilterConfigParserImpl public Envoy::Logger::Loggable { public: FilterConfigParserImpl( - const ::espv2::api::envoy::v7::http::backend_auth::FilterConfig& config, + const ::espv2::api::envoy::v8::http::backend_auth::FilterConfig& config, Envoy::Server::Configuration::FactoryContext& context, const token::TokenSubscriberFactory& token_subscriber_factory); diff --git a/src/envoy/http/backend_auth/config_parser_impl_test.cc b/src/envoy/http/backend_auth/config_parser_impl_test.cc index 487417529..808a12681 100644 --- a/src/envoy/http/backend_auth/config_parser_impl_test.cc +++ b/src/envoy/http/backend_auth/config_parser_impl_test.cc @@ -35,7 +35,7 @@ class ConfigParserImplTest : public ::testing::Test { config_parser_ = std::make_unique( proto_config_, mock_factory_context_, mock_token_subscriber_factory_); } - ::espv2::api::envoy::v7::http::backend_auth::FilterConfig proto_config_; + ::espv2::api::envoy::v8::http::backend_auth::FilterConfig proto_config_; testing::NiceMock mock_factory_context_; testing::NiceMock diff --git a/src/envoy/http/backend_auth/filter_config.h b/src/envoy/http/backend_auth/filter_config.h index 96d1a6d7e..1b4cc47d3 100644 --- a/src/envoy/http/backend_auth/filter_config.h +++ b/src/envoy/http/backend_auth/filter_config.h @@ -14,7 +14,7 @@ #pragma once -#include "api/envoy/v7/http/backend_auth/config.pb.h" +#include "api/envoy/v8/http/backend_auth/config.pb.h" #include "common/common/logger.h" #include "src/envoy/http/backend_auth/config_parser.h" diff --git a/src/envoy/http/backend_auth/filter_config_impl.h b/src/envoy/http/backend_auth/filter_config_impl.h index 212c5f986..b1c83a506 100644 --- a/src/envoy/http/backend_auth/filter_config_impl.h +++ b/src/envoy/http/backend_auth/filter_config_impl.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "api/envoy/v7/http/backend_auth/config.pb.h" +#include "api/envoy/v8/http/backend_auth/config.pb.h" #include "common/common/logger.h" #include "src/envoy/http/backend_auth/config_parser.h" #include "src/envoy/http/backend_auth/filter_config.h" @@ -23,7 +23,7 @@ namespace envoy { namespace http_filters { namespace backend_auth { using ConfigParserCreateFunc = std::function; // The Envoy filter config for ESPv2 backend auth filter. @@ -32,7 +32,7 @@ class FilterConfigImpl public Envoy::Logger::Loggable { public: FilterConfigImpl( - const ::espv2::api::envoy::v7::http::backend_auth::FilterConfig& + const ::espv2::api::envoy::v8::http::backend_auth::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) @@ -42,7 +42,7 @@ class FilterConfigImpl config_parser_(std::make_unique( proto_config_, context, token_subscriber_factory_)) {} - const ::espv2::api::envoy::v7::http::backend_auth::FilterConfig& config() + const ::espv2::api::envoy::v8::http::backend_auth::FilterConfig& config() const { return proto_config_; } @@ -60,7 +60,7 @@ class FilterConfigImpl POOL_COUNTER_PREFIX(scope, final_prefix))}; } - ::espv2::api::envoy::v7::http::backend_auth::FilterConfig proto_config_; + ::espv2::api::envoy::v8::http::backend_auth::FilterConfig proto_config_; FilterStats stats_; const token::TokenSubscriberFactoryImpl token_subscriber_factory_; FilterConfigParserPtr config_parser_; diff --git a/src/envoy/http/backend_auth/filter_factory.cc b/src/envoy/http/backend_auth/filter_factory.cc index 70a8ef5f5..63cd60250 100644 --- a/src/envoy/http/backend_auth/filter_factory.cc +++ b/src/envoy/http/backend_auth/filter_factory.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "api/envoy/v7/http/backend_auth/config.pb.h" -#include "api/envoy/v7/http/backend_auth/config.pb.validate.h" +#include "api/envoy/v8/http/backend_auth/config.pb.h" +#include "api/envoy/v8/http/backend_auth/config.pb.validate.h" #include "envoy/registry/registry.h" #include "extensions/filters/http/common/factory_base.h" #include "src/envoy/http/backend_auth/config_parser_impl.h" @@ -32,13 +32,13 @@ const std::string FilterName = "com.google.espv2.filters.http.backend_auth"; */ class FilterFactory : public Envoy::Extensions::HttpFilters::Common::FactoryBase< - ::espv2::api::envoy::v7::http::backend_auth::FilterConfig> { + ::espv2::api::envoy::v8::http::backend_auth::FilterConfig> { public: FilterFactory() : FactoryBase(FilterName) {} private: Envoy::Http::FilterFactoryCb createFilterFactoryFromProtoTyped( - const ::espv2::api::envoy::v7::http::backend_auth::FilterConfig& + const ::espv2::api::envoy::v8::http::backend_auth::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) override { diff --git a/src/envoy/http/backend_routing/BUILD b/src/envoy/http/backend_routing/BUILD index 8240adc4a..1e85ced92 100644 --- a/src/envoy/http/backend_routing/BUILD +++ b/src/envoy/http/backend_routing/BUILD @@ -32,7 +32,7 @@ envoy_cc_library( ], repository = "@envoy", deps = [ - "//api/envoy/v7/http/backend_routing:config_proto_cc_proto", + "//api/envoy/v8/http/backend_routing:config_proto_cc_proto", "//src/envoy/utils:filter_state_utils_lib", "@envoy//source/common/common:assert_lib", "@envoy//source/common/http:codes_lib", @@ -66,7 +66,7 @@ envoy_cc_test( repository = "@envoy", deps = [ ":filter_lib", - "//api/envoy/v7/http/backend_routing:config_proto_cc_proto", + "//api/envoy/v8/http/backend_routing:config_proto_cc_proto", "@envoy//test/mocks/server:server_mocks", "@envoy//test/test_common:utility_lib", ], diff --git a/src/envoy/http/backend_routing/README.md b/src/envoy/http/backend_routing/README.md index 0d6536961..6e35b6c27 100644 --- a/src/envoy/http/backend_routing/README.md +++ b/src/envoy/http/backend_routing/README.md @@ -22,7 +22,7 @@ This filter is designed to strongly integrate with the following filters: ## Configuration -View the [backend routing configuration proto](../../../../api/envoy/v7/http/backend_routing/config.proto) +View the [backend routing configuration proto](../../../../api/envoy/v8/http/backend_routing/config.proto) for inline documentation. ## Statistics diff --git a/src/envoy/http/backend_routing/filter.cc b/src/envoy/http/backend_routing/filter.cc index dd077e83a..ebe14a6df 100644 --- a/src/envoy/http/backend_routing/filter.cc +++ b/src/envoy/http/backend_routing/filter.cc @@ -34,7 +34,7 @@ using RcDetails = Envoy::ConstSingleton; } // namespace using Envoy::Http::FilterHeadersStatus; -using ::espv2::api::envoy::v7::http::backend_routing::BackendRoutingRule; +using ::espv2::api::envoy::v8::http::backend_routing::BackendRoutingRule; Filter::Filter(FilterConfigSharedPtr config) : config_(config) {} diff --git a/src/envoy/http/backend_routing/filter_config.h b/src/envoy/http/backend_routing/filter_config.h index 68858e679..e4276a266 100644 --- a/src/envoy/http/backend_routing/filter_config.h +++ b/src/envoy/http/backend_routing/filter_config.h @@ -14,7 +14,7 @@ #pragma once -#include "api/envoy/v7/http/backend_routing/config.pb.h" +#include "api/envoy/v8/http/backend_routing/config.pb.h" #include "common/common/empty_string.h" #include "common/common/logger.h" #include "envoy/server/filter_config.h" @@ -47,7 +47,7 @@ struct FilterStats { class FilterConfig : public Envoy::Logger::Loggable { public: FilterConfig( - const ::espv2::api::envoy::v7::http::backend_routing::FilterConfig& + const ::espv2::api::envoy::v8::http::backend_routing::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) @@ -63,7 +63,7 @@ class FilterConfig : public Envoy::Logger::Loggable { } } - const ::espv2::api::envoy::v7::http::backend_routing::BackendRoutingRule* + const ::espv2::api::envoy::v8::http::backend_routing::BackendRoutingRule* findRule(absl::string_view operation) const { const auto it = backend_routing_map_.find(operation); if (it == backend_routing_map_.end()) { @@ -83,13 +83,13 @@ class FilterConfig : public Envoy::Logger::Loggable { } // The config proto - ::espv2::api::envoy::v7::http::backend_routing::FilterConfig proto_config_; + ::espv2::api::envoy::v8::http::backend_routing::FilterConfig proto_config_; // The stats FilterStats stats_; // The map from operation to rule. absl::flat_hash_map< std::string, - const ::espv2::api::envoy::v7::http::backend_routing::BackendRoutingRule*> + const ::espv2::api::envoy::v8::http::backend_routing::BackendRoutingRule*> backend_routing_map_; }; diff --git a/src/envoy/http/backend_routing/filter_config_test.cc b/src/envoy/http/backend_routing/filter_config_test.cc index f4066821c..743c28502 100644 --- a/src/envoy/http/backend_routing/filter_config_test.cc +++ b/src/envoy/http/backend_routing/filter_config_test.cc @@ -14,7 +14,7 @@ #include "src/envoy/http/backend_routing/filter_config.h" -#include "api/envoy/v7/http/backend_routing/config.pb.validate.h" +#include "api/envoy/v8/http/backend_routing/config.pb.validate.h" #include "common/common/empty_string.h" #include "gmock/gmock.h" #include "google/protobuf/text_format.h" @@ -35,7 +35,7 @@ namespace { class BackendRoutingConfigTest : public ::testing::Test { protected: void validateConfig(absl::string_view filter_config) { - ::espv2::api::envoy::v7::http::backend_routing::FilterConfig proto_config; + ::espv2::api::envoy::v8::http::backend_routing::FilterConfig proto_config; ASSERT_TRUE(google::protobuf::TextFormat::ParseFromString( std::string(filter_config), &proto_config)); ASSERT_GT(proto_config.rules_size(), 0); diff --git a/src/envoy/http/backend_routing/filter_factory.cc b/src/envoy/http/backend_routing/filter_factory.cc index 5538c6074..9285c02f2 100644 --- a/src/envoy/http/backend_routing/filter_factory.cc +++ b/src/envoy/http/backend_routing/filter_factory.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "api/envoy/v7/http/backend_routing/config.pb.h" -#include "api/envoy/v7/http/backend_routing/config.pb.validate.h" +#include "api/envoy/v8/http/backend_routing/config.pb.h" +#include "api/envoy/v8/http/backend_routing/config.pb.validate.h" #include "envoy/registry/registry.h" #include "extensions/filters/http/common/factory_base.h" #include "src/envoy/http/backend_routing/filter.h" @@ -31,13 +31,13 @@ const std::string FilterName = "com.google.espv2.filters.http.backend_routing"; */ class FilterFactory : public Envoy::Extensions::HttpFilters::Common::FactoryBase< - ::espv2::api::envoy::v7::http::backend_routing::FilterConfig> { + ::espv2::api::envoy::v8::http::backend_routing::FilterConfig> { public: FilterFactory() : FactoryBase(FilterName) {} private: Envoy::Http::FilterFactoryCb createFilterFactoryFromProtoTyped( - const ::espv2::api::envoy::v7::http::backend_routing::FilterConfig& + const ::espv2::api::envoy::v8::http::backend_routing::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) override { diff --git a/src/envoy/http/backend_routing/filter_test.cc b/src/envoy/http/backend_routing/filter_test.cc index df94422a2..256e1cde4 100644 --- a/src/envoy/http/backend_routing/filter_test.cc +++ b/src/envoy/http/backend_routing/filter_test.cc @@ -63,7 +63,7 @@ class BackendRoutingFilterTest : public ::testing::Test { void SetUp() override { setUp(kFilterConfig); } void setUp(absl::string_view filter_config) { - ::espv2::api::envoy::v7::http::backend_routing::FilterConfig proto_config; + ::espv2::api::envoy::v8::http::backend_routing::FilterConfig proto_config; ASSERT_TRUE(google::protobuf::TextFormat::ParseFromString( std::string(filter_config), &proto_config)); ASSERT_GT(proto_config.rules_size(), 0); diff --git a/src/envoy/http/path_matcher/BUILD b/src/envoy/http/path_matcher/BUILD index 6704b6df9..1a29d736d 100644 --- a/src/envoy/http/path_matcher/BUILD +++ b/src/envoy/http/path_matcher/BUILD @@ -46,7 +46,7 @@ envoy_cc_library( hdrs = ["filter_config.h"], repository = "@envoy", deps = [ - "//api/envoy/v7/http/path_matcher:config_proto_cc_proto", + "//api/envoy/v8/http/path_matcher:config_proto_cc_proto", "//src/api_proxy/path_matcher:path_matcher_lib", "//src/api_proxy/path_matcher:variable_binding_utils_lib", "@envoy//source/common/common:empty_string", diff --git a/src/envoy/http/path_matcher/README.md b/src/envoy/http/path_matcher/README.md index 5e4a37348..01ae1bad7 100644 --- a/src/envoy/http/path_matcher/README.md +++ b/src/envoy/http/path_matcher/README.md @@ -52,5 +52,5 @@ the overridden path. ## Configuration -View the [path matcher configuration proto](../../../../api/envoy/v7/http/path_matcher/config.proto) +View the [path matcher configuration proto](../../../../api/envoy/v8/http/path_matcher/config.proto) for inline documentation. diff --git a/src/envoy/http/path_matcher/filter.cc b/src/envoy/http/path_matcher/filter.cc index aae95f810..741b17d7f 100644 --- a/src/envoy/http/path_matcher/filter.cc +++ b/src/envoy/http/path_matcher/filter.cc @@ -27,8 +27,8 @@ namespace http_filters { namespace path_matcher { using ::Envoy::Http::RequestHeaderMap; -using ::espv2::api::envoy::v7::http::path_matcher::PathMatcherRule; -using ::espv2::api::envoy::v7::http::path_matcher::PathParameterExtractionRule; +using ::espv2::api::envoy::v8::http::path_matcher::PathMatcherRule; +using ::espv2::api::envoy::v8::http::path_matcher::PathParameterExtractionRule; using ::espv2::api_proxy::path_matcher::VariableBinding; using ::espv2::api_proxy::path_matcher::VariableBindingsToQueryParameters; using ::google::protobuf::util::Status; diff --git a/src/envoy/http/path_matcher/filter_config.cc b/src/envoy/http/path_matcher/filter_config.cc index c7ca81e4c..900072bd9 100644 --- a/src/envoy/http/path_matcher/filter_config.cc +++ b/src/envoy/http/path_matcher/filter_config.cc @@ -20,10 +20,10 @@ namespace envoy { namespace http_filters { namespace path_matcher { -using ::espv2::api::envoy::v7::http::path_matcher::PathMatcherRule; +using ::espv2::api::envoy::v8::http::path_matcher::PathMatcherRule; FilterConfig::FilterConfig( - const ::espv2::api::envoy::v7::http::path_matcher::FilterConfig& + const ::espv2::api::envoy::v8::http::path_matcher::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) diff --git a/src/envoy/http/path_matcher/filter_config.h b/src/envoy/http/path_matcher/filter_config.h index 7a99ccc6e..69e7113db 100644 --- a/src/envoy/http/path_matcher/filter_config.h +++ b/src/envoy/http/path_matcher/filter_config.h @@ -17,7 +17,7 @@ #include #include "absl/container/flat_hash_map.h" -#include "api/envoy/v7/http/path_matcher/config.pb.h" +#include "api/envoy/v8/http/path_matcher/config.pb.h" #include "common/common/logger.h" #include "envoy/runtime/runtime.h" #include "envoy/server/filter_config.h" @@ -48,17 +48,17 @@ struct FilterStats { // The Envoy filter config for ESPv2 path matcher filter. class FilterConfig : public Envoy::Logger::Loggable { public: - FilterConfig(const ::espv2::api::envoy::v7::http::path_matcher::FilterConfig& + FilterConfig(const ::espv2::api::envoy::v8::http::path_matcher::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context); - const ::espv2::api::envoy::v7::http::path_matcher::PathMatcherRule* findRule( + const ::espv2::api::envoy::v8::http::path_matcher::PathMatcherRule* findRule( const std::string& http_method, const std::string& path) const { return path_matcher_->Lookup(http_method, path); } - const ::espv2::api::envoy::v7::http::path_matcher::PathMatcherRule* findRule( + const ::espv2::api::envoy::v8::http::path_matcher::PathMatcherRule* findRule( const std::string& http_method, const std::string& path, std::vector* variable_bindings) const { @@ -75,9 +75,9 @@ class FilterConfig : public Envoy::Logger::Loggable { POOL_COUNTER_PREFIX(scope, final_prefix))}; } - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig proto_config_; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig proto_config_; ::espv2::api_proxy::path_matcher::PathMatcherPtr< - const ::espv2::api::envoy::v7::http::path_matcher::PathMatcherRule*> + const ::espv2::api::envoy::v8::http::path_matcher::PathMatcherRule*> path_matcher_; FilterStats stats_; diff --git a/src/envoy/http/path_matcher/filter_config_test.cc b/src/envoy/http/path_matcher/filter_config_test.cc index 76dcbd350..bab93a38d 100644 --- a/src/envoy/http/path_matcher/filter_config_test.cc +++ b/src/envoy/http/path_matcher/filter_config_test.cc @@ -27,15 +27,15 @@ namespace http_filters { namespace path_matcher { namespace { -using ::espv2::api::envoy::v7::http::path_matcher::PathMatcherRule; -using ::espv2::api::envoy::v7::http::path_matcher::PathParameterExtractionRule; +using ::espv2::api::envoy::v8::http::path_matcher::PathMatcherRule; +using ::espv2::api::envoy::v8::http::path_matcher::PathParameterExtractionRule; using ::espv2::api_proxy::path_matcher::VariableBinding; using ::google::protobuf::TextFormat; using VariableBindings = std::vector; using FieldPath = std::vector; TEST(FilterConfigTest, EmptyConfig) { - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ::testing::NiceMock mock_factory; FilterConfig cfg(config_pb, Envoy::EMPTY_STRING, mock_factory); @@ -60,7 +60,7 @@ rules { } })"; - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ASSERT_TRUE(TextFormat::ParseFromString(kFilterConfigBasic, &config_pb)); ::testing::NiceMock mock_factory; @@ -85,7 +85,7 @@ rules { } })"; - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ASSERT_TRUE(TextFormat::ParseFromString(kFilterConfigBasic, &config_pb)); ::testing::NiceMock mock_factory; @@ -141,7 +141,7 @@ rules { } })"; - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ASSERT_TRUE(TextFormat::ParseFromString(kFilterConfigBasic, &config_pb)); ::testing::NiceMock mock_factory; @@ -181,7 +181,7 @@ rules { } })"; - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ASSERT_TRUE(TextFormat::ParseFromString(kFilterConfig, &config_pb)); ::testing::NiceMock mock_factory; @@ -201,7 +201,7 @@ rules { } })"; - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ASSERT_TRUE(TextFormat::ParseFromString(kFilterConfig, &config_pb)); ::testing::NiceMock mock_factory; @@ -221,7 +221,7 @@ rules { } })"; - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ASSERT_TRUE(TextFormat::ParseFromString(kFilterConfigBasic, &config_pb)); ::testing::NiceMock mock_factory; diff --git a/src/envoy/http/path_matcher/filter_factory.cc b/src/envoy/http/path_matcher/filter_factory.cc index 29a43f5b5..9a9039351 100644 --- a/src/envoy/http/path_matcher/filter_factory.cc +++ b/src/envoy/http/path_matcher/filter_factory.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "api/envoy/v7/http/path_matcher/config.pb.h" -#include "api/envoy/v7/http/path_matcher/config.pb.validate.h" +#include "api/envoy/v8/http/path_matcher/config.pb.h" +#include "api/envoy/v8/http/path_matcher/config.pb.validate.h" #include "src/envoy/http/path_matcher/filter.h" #include "src/envoy/http/path_matcher/filter_config.h" @@ -33,13 +33,13 @@ constexpr char kPathMatcherFilterName[] = */ class FilterFactory : public Envoy::Extensions::HttpFilters::Common::FactoryBase< - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig> { + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig> { public: FilterFactory() : FactoryBase(kPathMatcherFilterName) {} private: Envoy::Http::FilterFactoryCb createFilterFactoryFromProtoTyped( - const ::espv2::api::envoy::v7::http::path_matcher::FilterConfig& + const ::espv2::api::envoy::v8::http::path_matcher::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) override { diff --git a/src/envoy/http/path_matcher/filter_test.cc b/src/envoy/http/path_matcher/filter_test.cc index ba9e066e2..18c96af47 100644 --- a/src/envoy/http/path_matcher/filter_test.cc +++ b/src/envoy/http/path_matcher/filter_test.cc @@ -64,7 +64,7 @@ rules { class PathMatcherFilterTest : public ::testing::Test { protected: void SetUp() override { - ::espv2::api::envoy::v7::http::path_matcher::FilterConfig config_pb; + ::espv2::api::envoy::v8::http::path_matcher::FilterConfig config_pb; ASSERT_TRUE(TextFormat::ParseFromString(kFilterConfig, &config_pb)); config_ = std::make_shared(config_pb, Envoy::EMPTY_STRING, mock_factory_context_); diff --git a/src/envoy/http/service_control/BUILD b/src/envoy/http/service_control/BUILD index e9ed70807..919024483 100644 --- a/src/envoy/http/service_control/BUILD +++ b/src/envoy/http/service_control/BUILD @@ -26,7 +26,7 @@ envoy_cc_library( repository = "@envoy", deps = [ ":service_control_callback_func_lib", - "//api/envoy/v7/http/service_control:config_proto_cc_proto", + "//api/envoy/v8/http/service_control:config_proto_cc_proto", "@envoy//include/envoy/tracing:http_tracer_interface", ], ) @@ -61,7 +61,7 @@ envoy_cc_library( hdrs = ["http_call.h"], repository = "@envoy", deps = [ - "//api/envoy/v7/http/common:base_proto_cc_proto", + "//api/envoy/v8/http/common:base_proto_cc_proto", "@envoy//include/envoy/event:deferred_deletable", "@envoy//include/envoy/upstream:cluster_manager_interface", "@envoy//source/common/common:empty_string", @@ -84,8 +84,8 @@ envoy_cc_library( "filter_stats_lib", ":http_call_lib", ":service_control_callback_func_lib", - "//api/envoy/v7/http/common:base_proto_cc_proto", - "//api/envoy/v7/http/service_control:config_proto_cc_proto", + "//api/envoy/v8/http/common:base_proto_cc_proto", + "//api/envoy/v8/http/service_control:config_proto_cc_proto", "@envoy//include/envoy/event:dispatcher_interface", "@envoy//include/envoy/upstream:cluster_manager_interface", "@envoy//source/common/tracing:http_tracer_lib", diff --git a/src/envoy/http/service_control/client_cache.cc b/src/envoy/http/service_control/client_cache.cc index f5cbff1ed..35a9e1db1 100644 --- a/src/envoy/http/service_control/client_cache.cc +++ b/src/envoy/http/service_control/client_cache.cc @@ -23,7 +23,7 @@ namespace envoy { namespace http_filters { namespace service_control { -using ::espv2::api::envoy::v7::http::service_control::FilterConfig; +using ::espv2::api::envoy::v8::http::service_control::FilterConfig; using ::google::protobuf::util::Status; using ::google::protobuf::util::error::Code; @@ -195,7 +195,7 @@ void ClientCache::collectCallStatus(CallStatusStats& call_stats, } ClientCache::ClientCache( - const ::espv2::api::envoy::v7::http::service_control::Service& config, + const ::espv2::api::envoy::v8::http::service_control::Service& config, const FilterConfig& filter_config, const std::string& stats_prefix, Envoy::Stats::Scope& scope, Envoy::Upstream::ClusterManager& cm, Envoy::TimeSource& time_source, Envoy::Event::Dispatcher& dispatcher, diff --git a/src/envoy/http/service_control/client_cache.h b/src/envoy/http/service_control/client_cache.h index 48af8a438..db6a22106 100644 --- a/src/envoy/http/service_control/client_cache.h +++ b/src/envoy/http/service_control/client_cache.h @@ -14,7 +14,7 @@ #pragma once -#include "api/envoy/v7/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" #include "common/common/logger.h" #include "envoy/event/dispatcher.h" #include "envoy/tracing/http_tracer.h" @@ -43,8 +43,8 @@ class ClientCacheHttpRequestTest; class ClientCache : public Envoy::Logger::Loggable { public: ClientCache( - const ::espv2::api::envoy::v7::http::service_control::Service& config, - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::Service& config, + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& filter_config, const std::string& stats_prefix, Envoy::Stats::Scope& scope, Envoy::Upstream::ClusterManager& cm, Envoy::TimeSource& time_source, @@ -89,7 +89,7 @@ class ClientCache : public Envoy::Logger::Loggable { QuotaDoneFunc on_done); void initHttpRequestSetting( - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& filter_config); void collectCallStatus(CallStatusStats& filter_stats, @@ -100,7 +100,7 @@ class ClientCache : public Envoy::Logger::Loggable { const ::google::protobuf::util::Status& status, Response* resp, const std::string& body); - const ::espv2::api::envoy::v7::http::service_control::Service& config_; + const ::espv2::api::envoy::v8::http::service_control::Service& config_; // Filter statistics. ServiceControlFilterStats filter_stats_; diff --git a/src/envoy/http/service_control/client_cache_test.cc b/src/envoy/http/service_control/client_cache_test.cc index b4885f0d3..05027dbec 100644 --- a/src/envoy/http/service_control/client_cache_test.cc +++ b/src/envoy/http/service_control/client_cache_test.cc @@ -34,8 +34,8 @@ namespace http_filters { namespace service_control { namespace test { -using ::espv2::api::envoy::v7::http::service_control::FilterConfig; -using ::espv2::api::envoy::v7::http::service_control::Service; +using ::espv2::api::envoy::v8::http::service_control::FilterConfig; +using ::espv2::api::envoy::v8::http::service_control::Service; using ::espv2::api_proxy::service_control::CheckResponseInfo; using ::google::api::servicecontrol::v1::AllocateQuotaRequest; using ::google::api::servicecontrol::v1::AllocateQuotaResponse; diff --git a/src/envoy/http/service_control/config_parser.cc b/src/envoy/http/service_control/config_parser.cc index 5c467aa6e..873d0ed71 100644 --- a/src/envoy/http/service_control/config_parser.cc +++ b/src/envoy/http/service_control/config_parser.cc @@ -16,7 +16,7 @@ #include "common/protobuf/utility.h" -using ::espv2::api::envoy::v7::http::service_control::FilterConfig; +using ::espv2::api::envoy::v8::http::service_control::FilterConfig; namespace espv2 { namespace envoy { diff --git a/src/envoy/http/service_control/config_parser.h b/src/envoy/http/service_control/config_parser.h index 6a3432a87..30266f1ad 100644 --- a/src/envoy/http/service_control/config_parser.h +++ b/src/envoy/http/service_control/config_parser.h @@ -18,8 +18,8 @@ #include "absl/container/flat_hash_map.h" #include "absl/strings/string_view.h" -#include "api/envoy/v7/http/service_control/config.pb.h" -#include "api/envoy/v7/http/service_control/requirement.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/requirement.pb.h" #include "src/envoy/http/service_control/service_control_call.h" namespace espv2 { @@ -39,7 +39,7 @@ constexpr int64_t kLowerBoundMinStreamReportIntervalMs = 100; class ServiceContext { public: ServiceContext( - const ::espv2::api::envoy::v7::http::service_control::Service& config, + const ::espv2::api::envoy::v8::http::service_control::Service& config, ServiceControlCallFactory& factory) : config_(config), service_control_call_(factory.create(config_)) { min_stream_report_interval_ms_ = config_.min_stream_report_interval_ms(); @@ -54,7 +54,7 @@ class ServiceContext { } } - const ::espv2::api::envoy::v7::http::service_control::Service& config() + const ::espv2::api::envoy::v8::http::service_control::Service& config() const { return config_; } @@ -66,7 +66,7 @@ class ServiceContext { ServiceControlCall& call() const { return *service_control_call_; } private: - const ::espv2::api::envoy::v7::http::service_control::Service& config_; + const ::espv2::api::envoy::v8::http::service_control::Service& config_; ServiceControlCallPtr service_control_call_; int64_t min_stream_report_interval_ms_; }; @@ -75,7 +75,7 @@ using ServiceContextPtr = std::unique_ptr; class RequirementContext { public: RequirementContext( - const ::espv2::api::envoy::v7::http::service_control::Requirement& config, + const ::espv2::api::envoy::v8::http::service_control::Requirement& config, const ServiceContext& service_ctx) : config_(config), service_ctx_(service_ctx) { metric_costs_.reserve(config.metric_costs().size()); @@ -85,7 +85,7 @@ class RequirementContext { } } - const ::espv2::api::envoy::v7::http::service_control::Requirement& config() + const ::espv2::api::envoy::v8::http::service_control::Requirement& config() const { return config_; } @@ -97,7 +97,7 @@ class RequirementContext { } private: - const ::espv2::api::envoy::v7::http::service_control::Requirement& config_; + const ::espv2::api::envoy::v8::http::service_control::Requirement& config_; const ServiceContext& service_ctx_; std::vector> metric_costs_; }; @@ -106,11 +106,11 @@ using RequirementContextPtr = std::unique_ptr; class FilterConfigParser { public: FilterConfigParser( - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& config, ServiceControlCallFactory& factory); - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& config() + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& config() const { return config_; } @@ -123,7 +123,7 @@ class FilterConfigParser { return requirement_it->second.get(); } - const ::espv2::api::envoy::v7::http::service_control::ApiKeyRequirement& + const ::espv2::api::envoy::v8::http::service_control::ApiKeyRequirement& default_api_keys() const { return default_api_keys_; } @@ -134,17 +134,17 @@ class FilterConfigParser { private: // The proto config. - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& config_; + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& config_; // Operation name to RequirementContext map. absl::flat_hash_map requirements_map_; // The requirement for non matched requests for sending their reports. - ::espv2::api::envoy::v7::http::service_control::Requirement + ::espv2::api::envoy::v8::http::service_control::Requirement non_match_rqm_cfg_; RequirementContextPtr non_match_rqm_ctx_; // Service name to ServiceContext map. absl::flat_hash_map service_map_; // The default locations to extract api-key. - ::espv2::api::envoy::v7::http::service_control::ApiKeyRequirement + ::espv2::api::envoy::v8::http::service_control::ApiKeyRequirement default_api_keys_; }; diff --git a/src/envoy/http/service_control/config_parser_test.cc b/src/envoy/http/service_control/config_parser_test.cc index e6c737246..4331d937d 100644 --- a/src/envoy/http/service_control/config_parser_test.cc +++ b/src/envoy/http/service_control/config_parser_test.cc @@ -26,7 +26,7 @@ namespace http_filters { namespace service_control { namespace { -using ::espv2::api::envoy::v7::http::service_control::FilterConfig; +using ::espv2::api::envoy::v8::http::service_control::FilterConfig; using ::google::protobuf::TextFormat; TEST(ConfigParserTest, EmptyConfig) { diff --git a/src/envoy/http/service_control/filter_config.h b/src/envoy/http/service_control/filter_config.h index c96bdaf61..dfd128fbb 100644 --- a/src/envoy/http/service_control/filter_config.h +++ b/src/envoy/http/service_control/filter_config.h @@ -14,7 +14,7 @@ #pragma once -#include "api/envoy/v7/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" #include "common/common/logger.h" #include "envoy/runtime/runtime.h" #include "envoy/server/filter_config.h" @@ -33,7 +33,7 @@ class ServiceControlFilterConfig : public Envoy::Logger::Loggable { public: ServiceControlFilterConfig( - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) @@ -41,7 +41,7 @@ class ServiceControlFilterConfig ServiceControlFilterStats::create(stats_prefix, context.scope())), proto_config_( std::make_shared< - ::espv2::api::envoy::v7::http::service_control::FilterConfig>( + ::espv2::api::envoy::v8::http::service_control::FilterConfig>( proto_config)), call_factory_(proto_config_, stats_prefix, context), config_parser_(*proto_config_, call_factory_), diff --git a/src/envoy/http/service_control/filter_factory.cc b/src/envoy/http/service_control/filter_factory.cc index b0b437281..a495fa713 100644 --- a/src/envoy/http/service_control/filter_factory.cc +++ b/src/envoy/http/service_control/filter_factory.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "api/envoy/v7/http/service_control/config.pb.h" -#include "api/envoy/v7/http/service_control/config.pb.validate.h" +#include "api/envoy/v8/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.validate.h" #include "src/envoy/http/service_control/filter.h" #include "src/envoy/http/service_control/filter_config.h" @@ -32,13 +32,13 @@ const std::string FilterName = "com.google.espv2.filters.http.service_control"; */ class FilterFactory : public Envoy::Extensions::HttpFilters::Common::FactoryBase< - ::espv2::api::envoy::v7::http::service_control::FilterConfig> { + ::espv2::api::envoy::v8::http::service_control::FilterConfig> { public: FilterFactory() : FactoryBase(FilterName) {} private: Envoy::Http::FilterFactoryCb createFilterFactoryFromProtoTyped( - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& proto_config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context) override { diff --git a/src/envoy/http/service_control/filter_fuzz_test.cc b/src/envoy/http/service_control/filter_fuzz_test.cc index 9f3fdc6b8..8a0b7a0bb 100644 --- a/src/envoy/http/service_control/filter_fuzz_test.cc +++ b/src/envoy/http/service_control/filter_fuzz_test.cc @@ -5,7 +5,7 @@ #include "test/mocks/http/mocks.h" #include "test/mocks/server/mocks.h" -#include "api/envoy/v7/http/service_control/config.pb.validate.h" +#include "api/envoy/v8/http/service_control/config.pb.validate.h" #include "src/envoy/http/service_control/filter.h" #include "src/envoy/http/service_control/filter_config.h" #include "src/envoy/utils/filter_state_utils.h" @@ -18,7 +18,7 @@ #include #include -namespace filter_api = ::espv2::api::envoy::v7::http::service_control; +namespace filter_api = ::espv2::api::envoy::v8::http::service_control; namespace sc_api = ::google::api::servicecontrol::v1; using ::Envoy::Server::Configuration::MockFactoryContext; using ::testing::MockFunction; diff --git a/src/envoy/http/service_control/handler_impl_test.cc b/src/envoy/http/service_control/handler_impl_test.cc index a7eb2a94e..f671ab353 100644 --- a/src/envoy/http/service_control/handler_impl_test.cc +++ b/src/envoy/http/service_control/handler_impl_test.cc @@ -38,7 +38,7 @@ using Envoy::Http::TestRequestTrailerMapImpl; using Envoy::Http::TestResponseHeaderMapImpl; using Envoy::Http::TestResponseTrailerMapImpl; using Envoy::StreamInfo::MockStreamInfo; -using ::espv2::api::envoy::v7::http::service_control::FilterConfig; +using ::espv2::api::envoy::v8::http::service_control::FilterConfig; using ::espv2::api_proxy::service_control::CheckRequestInfo; using ::espv2::api_proxy::service_control::CheckResponseInfo; using ::espv2::api_proxy::service_control::QuotaRequestInfo; diff --git a/src/envoy/http/service_control/handler_utils.cc b/src/envoy/http/service_control/handler_utils.cc index 55e1877e7..ffe955b0e 100644 --- a/src/envoy/http/service_control/handler_utils.cc +++ b/src/envoy/http/service_control/handler_utils.cc @@ -17,7 +17,7 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" -#include "api/envoy/v7/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" #include "common/common/logger.h" #include "common/http/utility.h" #include "envoy/http/header_map.h" @@ -26,8 +26,8 @@ #include "src/api_proxy/service_control/request_builder.h" #include "src/envoy/http/service_control/handler_utils.h" -using ::espv2::api::envoy::v7::http::service_control::ApiKeyLocation; -using ::espv2::api::envoy::v7::http::service_control::Service; +using ::espv2::api::envoy::v8::http::service_control::ApiKeyLocation; +using ::espv2::api::envoy::v8::http::service_control::Service; using ::espv2::api_proxy::service_control::LatencyInfo; using ::espv2::api_proxy::service_control::protocol::Protocol; @@ -127,7 +127,7 @@ bool isGrpcRequest(absl::string_view content_type) { } // namespace void fillGCPInfo( - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& filter_config, ::espv2::api_proxy::service_control::ReportRequestInfo& info) { if (!filter_config.has_gcp_attributes()) { @@ -259,7 +259,7 @@ void fillJwtPayload(const ::envoy::config::core::v3::Metadata& metadata, bool extractAPIKey( const Envoy::Http::RequestHeaderMap& headers, const ::google::protobuf::RepeatedPtrField< - ::espv2::api::envoy::v7::http::service_control::ApiKeyLocation>& + ::espv2::api::envoy::v8::http::service_control::ApiKeyLocation>& locations, std::string& api_key) { // If checking multiple headers, cache the parameters so they are only parsed diff --git a/src/envoy/http/service_control/handler_utils.h b/src/envoy/http/service_control/handler_utils.h index 291417cc1..e1d90aca6 100644 --- a/src/envoy/http/service_control/handler_utils.h +++ b/src/envoy/http/service_control/handler_utils.h @@ -13,8 +13,8 @@ // limitations under the License. #include "absl/strings/match.h" -#include "api/envoy/v7/http/service_control/config.pb.h" -#include "api/envoy/v7/http/service_control/requirement.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/requirement.pb.h" #include "common/config/metadata.h" #include "common/http/utility.h" #include "src/api_proxy/service_control/request_builder.h" @@ -34,13 +34,13 @@ namespace service_control { bool extractAPIKey( const Envoy::Http::RequestHeaderMap& headers, const ::google::protobuf::RepeatedPtrField< - ::espv2::api::envoy::v7::http::service_control::ApiKeyLocation>& + ::espv2::api::envoy::v8::http::service_control::ApiKeyLocation>& locations, std::string& api_key); // Adds information from the `FilterConfig`'s gcp_attributes to the given info. void fillGCPInfo( - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& filter_config, ::espv2::api_proxy::service_control::ReportRequestInfo& info); @@ -76,7 +76,7 @@ ::espv2::api_proxy::service_control::protocol::Protocol getFrontendProtocol( // Returns the protocol of the backend service or UNKNOWN if not found ::espv2::api_proxy::service_control::protocol::Protocol getBackendProtocol( - const ::espv2::api::envoy::v7::http::service_control::Service& service); + const ::espv2::api::envoy::v8::http::service_control::Service& service); } // namespace service_control } // namespace http_filters diff --git a/src/envoy/http/service_control/handler_utils_test.cc b/src/envoy/http/service_control/handler_utils_test.cc index d124914b8..1b4c49a8a 100644 --- a/src/envoy/http/service_control/handler_utils_test.cc +++ b/src/envoy/http/service_control/handler_utils_test.cc @@ -15,7 +15,7 @@ #include "src/envoy/http/service_control/handler_utils.h" -#include "api/envoy/v7/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" #include "common/common/empty_string.h" #include "envoy/http/header_map.h" #include "gmock/gmock.h" @@ -25,9 +25,9 @@ #include "test/mocks/server/mocks.h" #include "test/test_common/utility.h" -using ::espv2::api::envoy::v7::http::service_control::ApiKeyRequirement; -using ::espv2::api::envoy::v7::http::service_control::FilterConfig; -using ::espv2::api::envoy::v7::http::service_control::Service; +using ::espv2::api::envoy::v8::http::service_control::ApiKeyRequirement; +using ::espv2::api::envoy::v8::http::service_control::FilterConfig; +using ::espv2::api::envoy::v8::http::service_control::Service; using ::espv2::api_proxy::service_control::LatencyInfo; using ::espv2::api_proxy::service_control::ReportRequestInfo; using ::espv2::api_proxy::service_control::protocol::Protocol; diff --git a/src/envoy/http/service_control/http_call.cc b/src/envoy/http/service_control/http_call.cc index 65dad418a..23981ae8b 100644 --- a/src/envoy/http/service_control/http_call.cc +++ b/src/envoy/http/service_control/http_call.cc @@ -25,7 +25,7 @@ #include "common/tracing/http_tracer_impl.h" #include "envoy/event/deferred_deletable.h" -using ::espv2::api::envoy::v7::http::common::HttpUri; +using ::espv2::api::envoy::v8::http::common::HttpUri; using ::google::protobuf::util::Status; using ::google::protobuf::util::error::Code; namespace espv2 { @@ -301,7 +301,7 @@ class HttpCallImpl : public HttpCall, HttpCallFactoryImpl::HttpCallFactoryImpl( Envoy::Upstream::ClusterManager& cm, Envoy::Event::Dispatcher& dispatcher, - const ::espv2::api::envoy::v7::http::common::HttpUri& uri, + const ::espv2::api::envoy::v8::http::common::HttpUri& uri, const std::string& suffix_url, std::function token_fn, uint32_t timeout_ms, uint32_t retries, Envoy::TimeSource& time_source, const std::string& trace_operation_name) diff --git a/src/envoy/http/service_control/http_call.h b/src/envoy/http/service_control/http_call.h index 061a9cf86..ded2cc853 100644 --- a/src/envoy/http/service_control/http_call.h +++ b/src/envoy/http/service_control/http_call.h @@ -14,7 +14,7 @@ #pragma once -#include "api/envoy/v7/http/common/base.pb.h" +#include "api/envoy/v8/http/common/base.pb.h" #include "envoy/common/pure.h" #include "envoy/tracing/http_tracer.h" #include "envoy/upstream/cluster_manager.h" @@ -54,7 +54,7 @@ class HttpCallFactoryImpl : public HttpCallFactory { public: HttpCallFactoryImpl(Envoy::Upstream::ClusterManager& cm, Envoy::Event::Dispatcher& dispatcher, - const ::espv2::api::envoy::v7::http::common::HttpUri& uri, + const ::espv2::api::envoy::v8::http::common::HttpUri& uri, const std::string& suffix_url, std::function token_fn, uint32_t timeout_ms, uint32_t retries, @@ -76,7 +76,7 @@ class HttpCallFactoryImpl : public HttpCallFactory { Envoy::Event::Dispatcher& dispatcher_; // call uri address - const ::espv2::api::envoy::v7::http::common::HttpUri uri_; + const ::espv2::api::envoy::v8::http::common::HttpUri uri_; const std::string suffix_url_; // token getter diff --git a/src/envoy/http/service_control/http_call_test.cc b/src/envoy/http/service_control/http_call_test.cc index 6ea12a230..c8828bb2d 100644 --- a/src/envoy/http/service_control/http_call_test.cc +++ b/src/envoy/http/service_control/http_call_test.cc @@ -38,7 +38,7 @@ using ::testing::Invoke; using ::testing::MockFunction; using ::testing::Return; -using ::espv2::api::envoy::v7::http::common::HttpUri; +using ::espv2::api::envoy::v8::http::common::HttpUri; using ::google::api::servicecontrol::v1::CheckRequest; using ::google::api::servicecontrol::v1::CheckResponse; using ::google::protobuf::util::Status; diff --git a/src/envoy/http/service_control/mocks.h b/src/envoy/http/service_control/mocks.h index f61146b0d..4651564b1 100644 --- a/src/envoy/http/service_control/mocks.h +++ b/src/envoy/http/service_control/mocks.h @@ -83,7 +83,7 @@ class MockServiceControlCallFactory : public ServiceControlCallFactory { public: MOCK_METHOD( ServiceControlCallPtr, create, - (const ::espv2::api::envoy::v7::http::service_control::Service& config), + (const ::espv2::api::envoy::v8::http::service_control::Service& config), (override)); }; diff --git a/src/envoy/http/service_control/service_control_call.h b/src/envoy/http/service_control/service_control_call.h index c48d6fb0e..13fc452b8 100644 --- a/src/envoy/http/service_control/service_control_call.h +++ b/src/envoy/http/service_control/service_control_call.h @@ -14,7 +14,7 @@ #pragma once -#include "api/envoy/v7/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" #include "envoy/common/pure.h" #include "envoy/tracing/http_tracer.h" #include "src/envoy/http/service_control/service_control_callback_func.h" @@ -48,7 +48,7 @@ class ServiceControlCallFactory { virtual ~ServiceControlCallFactory() = default; virtual ServiceControlCallPtr create( - const ::espv2::api::envoy::v7::http::service_control::Service& config) + const ::espv2::api::envoy::v8::http::service_control::Service& config) PURE; }; diff --git a/src/envoy/http/service_control/service_control_call_impl.cc b/src/envoy/http/service_control/service_control_call_impl.cc index 635a6a934..da13897e6 100644 --- a/src/envoy/http/service_control/service_control_call_impl.cc +++ b/src/envoy/http/service_control/service_control_call_impl.cc @@ -24,9 +24,9 @@ namespace envoy { namespace http_filters { namespace service_control { -using ::espv2::api::envoy::v7::http::common::AccessToken; -using ::espv2::api::envoy::v7::http::service_control::FilterConfig; -using ::espv2::api::envoy::v7::http::service_control::Service; +using ::espv2::api::envoy::v8::http::common::AccessToken; +using ::espv2::api::envoy::v8::http::service_control::FilterConfig; +using ::espv2::api::envoy::v8::http::service_control::Service; using ::espv2::api_proxy::service_control::LogsMetricsLoader; using ::espv2::api_proxy::service_control::RequestBuilder; using ::google::protobuf::util::TimeUtil; diff --git a/src/envoy/http/service_control/service_control_call_impl.h b/src/envoy/http/service_control/service_control_call_impl.h index c05c902a3..15aaa0263 100644 --- a/src/envoy/http/service_control/service_control_call_impl.h +++ b/src/envoy/http/service_control/service_control_call_impl.h @@ -14,7 +14,7 @@ #pragma once -#include "api/envoy/v7/http/service_control/config.pb.h" +#include "api/envoy/v8/http/service_control/config.pb.h" #include "common/common/empty_string.h" #include "common/common/logger.h" #include "envoy/server/filter_config.h" @@ -41,8 +41,8 @@ constexpr char kServiceControlScope[] = class ThreadLocalCache : public Envoy::ThreadLocal::ThreadLocalObject { public: ThreadLocalCache( - const ::espv2::api::envoy::v7::http::service_control::Service& config, - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::Service& config, + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& filter_config, const std::string& stats_prefix, Envoy::Stats::Scope& scope, Envoy::Upstream::ClusterManager& cm, Envoy::TimeSource& time_source, @@ -73,7 +73,7 @@ class ThreadLocalCache : public Envoy::ThreadLocal::ThreadLocalObject { }; using FilterConfigProtoSharedPtr = std::shared_ptr< - ::espv2::api::envoy::v7::http::service_control::FilterConfig>; + ::espv2::api::envoy::v8::http::service_control::FilterConfig>; class ServiceControlCallImpl : public ServiceControlCall, @@ -81,7 +81,7 @@ class ServiceControlCallImpl public: ServiceControlCallImpl( FilterConfigProtoSharedPtr proto_config, - const ::espv2::api::envoy::v7::http::service_control::Service& config, + const ::espv2::api::envoy::v8::http::service_control::Service& config, const std::string& stats_prefix, Envoy::Server::Configuration::FactoryContext& context); @@ -105,7 +105,7 @@ class ServiceControlCallImpl void createImdsTokenSub(); void createIamTokenSub(); - const ::espv2::api::envoy::v7::http::service_control::FilterConfig& + const ::espv2::api::envoy::v8::http::service_control::FilterConfig& filter_config_; std::unique_ptr<::espv2::api_proxy::service_control::RequestBuilder> request_builder_; @@ -135,7 +135,7 @@ class ServiceControlCallFactoryImpl : public ServiceControlCallFactory { context_(context) {} ServiceControlCallPtr create( - const ::espv2::api::envoy::v7::http::service_control::Service& config) + const ::espv2::api::envoy::v8::http::service_control::Service& config) override { return std::make_unique(proto_config_, config, stats_prefix_, context_); diff --git a/src/go/configgenerator/listener_generator.go b/src/go/configgenerator/listener_generator.go index f80a467ca..eaea8e5e7 100644 --- a/src/go/configgenerator/listener_generator.go +++ b/src/go/configgenerator/listener_generator.go @@ -26,11 +26,11 @@ import ( "github.com/golang/protobuf/ptypes" sc "github.com/GoogleCloudPlatform/esp-v2/src/go/configinfo" - bapb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_auth" - brpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_routing" - commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/common" - pmpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/path_matcher" - scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control" + bapb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_auth" + brpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_routing" + commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/common" + pmpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/path_matcher" + scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control" acpb "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v3" corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" diff --git a/src/go/configgenerator/listener_generator_test.go b/src/go/configgenerator/listener_generator_test.go index 016566965..13f85067d 100644 --- a/src/go/configgenerator/listener_generator_test.go +++ b/src/go/configgenerator/listener_generator_test.go @@ -484,7 +484,7 @@ func TestBackendRoutingFilter(t *testing.T) { wantBackendRoutingFilter: `{ "name": "com.google.espv2.filters.http.backend_routing", "typedConfig": { - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig", "rules": [ { "operation": "endpoints.examples.bookstore.Bookstore.CreateShelf", @@ -561,7 +561,7 @@ func TestBackendRoutingFilter(t *testing.T) { wantBackendRoutingFilter: `{ "name": "com.google.espv2.filters.http.backend_routing", "typedConfig": { - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig", "rules": [ { "operation": "testapi.bar", @@ -644,7 +644,7 @@ func TestBackendRoutingFilter(t *testing.T) { wantBackendRoutingFilter: `{ "name": "com.google.espv2.filters.http.backend_routing", "typedConfig": { - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig", "rules": [ { "operation":"testapi.CORS_bar", @@ -776,7 +776,7 @@ func TestBackendRoutingFilter(t *testing.T) { wantBackendRoutingFilter: `{ "name": "com.google.espv2.filters.http.backend_routing", "typedConfig": { - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig", "rules": [ { "operation": "testapi.bar", @@ -878,7 +878,7 @@ func TestBackendAuthFilter(t *testing.T) { { "name":"com.google.espv2.filters.http.backend_auth", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig", "imdsToken":{ "cluster":"metadata-cluster", "timeout":"30s", @@ -964,7 +964,7 @@ func TestBackendAuthFilter(t *testing.T) { wantBackendAuthFilter: `{ "name":"com.google.espv2.filters.http.backend_auth", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig", "imdsToken":{ "cluster":"metadata-cluster", "timeout":"30s", @@ -1019,7 +1019,7 @@ func TestBackendAuthFilter(t *testing.T) { { "name":"com.google.espv2.filters.http.backend_auth", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig", "iamToken":{ "accessToken":{ "remoteToken":{ @@ -1107,7 +1107,7 @@ func TestPathMatcherFilter(t *testing.T) { { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"ESPv2.HealthCheck", @@ -1176,7 +1176,7 @@ func TestPathMatcherFilter(t *testing.T) { { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"1.echo_api_endpoints_cloudesf_testing_cloud_goog.Echo", @@ -1263,7 +1263,7 @@ func TestPathMatcherFilter(t *testing.T) { { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"1.cloudesf_testing_cloud_goog.Bar", @@ -1321,7 +1321,7 @@ func TestPathMatcherFilter(t *testing.T) { { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"1.cloudesf_testing_cloud_goog.CORS_foo", @@ -1421,7 +1421,7 @@ func TestPathMatcherFilter(t *testing.T) { { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"1.cloudesf_testing_cloud_goog.Baz", diff --git a/src/go/configgenerator/route_generator.go b/src/go/configgenerator/route_generator.go index ac607da0d..c31e29b73 100644 --- a/src/go/configgenerator/route_generator.go +++ b/src/go/configgenerator/route_generator.go @@ -23,7 +23,7 @@ import ( "github.com/golang/glog" "github.com/golang/protobuf/ptypes" - commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/common" + commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/common" corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3" diff --git a/src/go/configinfo/method_info.go b/src/go/configinfo/method_info.go index aceb4404d..becb8e36f 100644 --- a/src/go/configinfo/method_info.go +++ b/src/go/configinfo/method_info.go @@ -17,8 +17,8 @@ package configinfo import ( "time" - commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/common" - scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control" + commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/common" + scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control" confpb "google.golang.org/genproto/googleapis/api/serviceconfig" ) diff --git a/src/go/configinfo/service_info.go b/src/go/configinfo/service_info.go index 237cc31c2..81bf373d2 100644 --- a/src/go/configinfo/service_info.go +++ b/src/go/configinfo/service_info.go @@ -27,8 +27,8 @@ import ( "github.com/golang/glog" "github.com/golang/protobuf/ptypes" - commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/common" - scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control" + commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/common" + scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control" annotationspb "google.golang.org/genproto/googleapis/api/annotations" confpb "google.golang.org/genproto/googleapis/api/serviceconfig" typepb "google.golang.org/genproto/protobuf/ptype" diff --git a/src/go/configinfo/service_info_test.go b/src/go/configinfo/service_info_test.go index a82249049..75683358b 100644 --- a/src/go/configinfo/service_info_test.go +++ b/src/go/configinfo/service_info_test.go @@ -32,8 +32,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/gorilla/mux" - commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/common" - scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control" + commonpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/common" + scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control" annotationspb "google.golang.org/genproto/googleapis/api/annotations" confpb "google.golang.org/genproto/googleapis/api/serviceconfig" apipb "google.golang.org/genproto/protobuf/api" diff --git a/src/go/configmanager/testdata/test_fetch_listeners.go b/src/go/configmanager/testdata/test_fetch_listeners.go index 70115561d..ecd154738 100644 --- a/src/go/configmanager/testdata/test_fetch_listeners.go +++ b/src/go/configmanager/testdata/test_fetch_listeners.go @@ -88,7 +88,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"endpoints.examples.bookstore.Bookstore.CreateShelf", @@ -233,7 +233,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"endpoints.examples.bookstore.Bookstore.CreateShelf", @@ -428,7 +428,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"endpoints.examples.bookstore.Bookstore.CreateShelf", @@ -642,7 +642,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"endpoints.examples.bookstore.Bookstore.DeleteBook", @@ -886,7 +886,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"endpoints.examples.bookstore.Bookstore.CreateShelf", @@ -922,7 +922,7 @@ var ( { "name":"com.google.espv2.filters.http.service_control", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.service_control.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.service_control.FilterConfig", "imdsToken":{ "cluster":"metadata-cluster", "timeout":"30s", @@ -1111,7 +1111,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"1.echo_api_endpoints_cloudesf_testing_cloud_goog.Echo", @@ -1276,7 +1276,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"1.echo_api_endpoints_cloudesf_testing_cloud_goog.CORS_simplegetcors", @@ -1298,7 +1298,7 @@ var ( { "name":"com.google.espv2.filters.http.service_control", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.service_control.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.service_control.FilterConfig", "imdsToken":{ "cluster":"metadata-cluster", "timeout":"30s", diff --git a/src/go/configmanager/testdata/test_fixed_mode_dynamic_routing.go b/src/go/configmanager/testdata/test_fixed_mode_dynamic_routing.go index c2da614e7..70dd3623c 100644 --- a/src/go/configmanager/testdata/test_fixed_mode_dynamic_routing.go +++ b/src/go/configmanager/testdata/test_fixed_mode_dynamic_routing.go @@ -245,7 +245,7 @@ var ( { "name":"com.google.espv2.filters.http.path_matcher", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig", "rules":[ { "operation":"1.echo_api_endpoints_cloudesf_testing_cloud_goog.Echo", @@ -295,7 +295,7 @@ var ( { "name":"com.google.espv2.filters.http.backend_auth", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig", "imdsToken":{ "cluster":"metadata-cluster", "timeout":"30s", @@ -328,7 +328,7 @@ var ( { "name":"com.google.espv2.filters.http.backend_routing", "typedConfig":{ - "@type":"type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig", + "@type":"type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig", "rules":[ { "operation":"1.echo_api_endpoints_cloudesf_testing_cloud_goog.dynamic_routing_AddPet", diff --git a/src/go/metadata/metadata_fetcher.go b/src/go/metadata/metadata_fetcher.go index a6e0d0199..6a7d133f4 100644 --- a/src/go/metadata/metadata_fetcher.go +++ b/src/go/metadata/metadata_fetcher.go @@ -27,7 +27,7 @@ import ( "github.com/GoogleCloudPlatform/esp-v2/src/go/util" "github.com/golang/glog" - scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control" + scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control" ) const ( diff --git a/src/go/metadata/metadata_fetcher_test.go b/src/go/metadata/metadata_fetcher_test.go index 183bb5022..a19d6cefd 100644 --- a/src/go/metadata/metadata_fetcher_test.go +++ b/src/go/metadata/metadata_fetcher_test.go @@ -23,7 +23,7 @@ import ( "github.com/GoogleCloudPlatform/esp-v2/src/go/util" "github.com/golang/protobuf/proto" - scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control" + scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control" ) const ( diff --git a/src/go/util/marshal.go b/src/go/util/marshal.go index 65fea4b08..700d5cce6 100644 --- a/src/go/util/marshal.go +++ b/src/go/util/marshal.go @@ -21,10 +21,10 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" - bapb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_auth" - drpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/backend_routing" - pmpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/path_matcher" - scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v7/http/service_control" + bapb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_auth" + drpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/backend_routing" + pmpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/path_matcher" + scpb "github.com/GoogleCloudPlatform/esp-v2/src/go/proto/api/envoy/v8/http/service_control" statspb "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v3" tracepb "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3" @@ -85,13 +85,13 @@ var Resolver = FuncResolver(func(url string) (proto.Message, error) { return new(jwtpb.JwtAuthentication), nil case "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager": return new(hcmpb.HttpConnectionManager), nil - case "type.googleapis.com/espv2.api.envoy.v7.http.path_matcher.FilterConfig": + case "type.googleapis.com/espv2.api.envoy.v8.http.path_matcher.FilterConfig": return new(pmpb.FilterConfig), nil - case "type.googleapis.com/espv2.api.envoy.v7.http.service_control.FilterConfig": + case "type.googleapis.com/espv2.api.envoy.v8.http.service_control.FilterConfig": return new(scpb.FilterConfig), nil - case "type.googleapis.com/espv2.api.envoy.v7.http.backend_auth.FilterConfig": + case "type.googleapis.com/espv2.api.envoy.v8.http.backend_auth.FilterConfig": return new(bapb.FilterConfig), nil - case "type.googleapis.com/espv2.api.envoy.v7.http.backend_routing.FilterConfig": + case "type.googleapis.com/espv2.api.envoy.v8.http.backend_routing.FilterConfig": return new(drpb.FilterConfig), nil case "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router": return new(routerpb.Router), nil diff --git a/tests/fuzz/structured_inputs/BUILD b/tests/fuzz/structured_inputs/BUILD index 17b20f22c..4a6fefc45 100644 --- a/tests/fuzz/structured_inputs/BUILD +++ b/tests/fuzz/structured_inputs/BUILD @@ -30,7 +30,7 @@ envoy_proto_library( name = "backend_routing_filter_proto", srcs = ["backend_routing_filter.proto"], deps = [ - "//api/envoy/v7/http/backend_routing:config_proto", + "//api/envoy/v8/http/backend_routing:config_proto", "@envoy//test/fuzz:common_proto", ], ) @@ -55,7 +55,7 @@ envoy_proto_library( name = "service_control_filter_proto", srcs = ["service_control_filter.proto"], deps = [ - "//api/envoy/v7/http/service_control:config_proto", + "//api/envoy/v8/http/service_control:config_proto", "@envoy//test/fuzz:common_proto", ], ) @@ -64,7 +64,7 @@ envoy_proto_library( name = "path_matcher_filter_proto", srcs = ["path_matcher_filter.proto"], deps = [ - "//api/envoy/v7/http/path_matcher:config_proto", + "//api/envoy/v8/http/path_matcher:config_proto", "@envoy//test/fuzz:common_proto", ], ) diff --git a/tests/fuzz/structured_inputs/backend_routing_filter.proto b/tests/fuzz/structured_inputs/backend_routing_filter.proto index 9001959cd..0bced8a61 100644 --- a/tests/fuzz/structured_inputs/backend_routing_filter.proto +++ b/tests/fuzz/structured_inputs/backend_routing_filter.proto @@ -3,13 +3,13 @@ syntax = "proto3"; package espv2.tests.fuzz.protos; import "test/fuzz/common.proto"; -import "api/envoy/v7/http/backend_routing/config.proto"; +import "api/envoy/v8/http/backend_routing/config.proto"; import "validate/validate.proto"; message BackendRoutingFilterInput { // The fuzzed filter config for this test. - espv2.api.envoy.v7.http.backend_routing.FilterConfig config = 1 [(validate.rules).message.required = true]; + espv2.api.envoy.v8.http.backend_routing.FilterConfig config = 1 [(validate.rules).message.required = true]; // The query params extracted by the path matcher filter for variable bindings in the backend rule. string binding_query_params = 2 [(validate.rules).string = { diff --git a/tests/fuzz/structured_inputs/path_matcher_filter.proto b/tests/fuzz/structured_inputs/path_matcher_filter.proto index 78aabc4c5..8a6b2229b 100644 --- a/tests/fuzz/structured_inputs/path_matcher_filter.proto +++ b/tests/fuzz/structured_inputs/path_matcher_filter.proto @@ -3,13 +3,13 @@ syntax = "proto3"; package espv2.tests.fuzz.protos; import "test/fuzz/common.proto"; -import "api/envoy/v7/http/path_matcher/config.proto"; +import "api/envoy/v8/http/path_matcher/config.proto"; import "validate/validate.proto"; message PathMatcherFilterInput { // The fuzzed filter config for this test. - espv2.api.envoy.v7.http.path_matcher.FilterConfig config = 1 [(validate.rules).message.required = true]; + espv2.api.envoy.v8.http.path_matcher.FilterConfig config = 1 [(validate.rules).message.required = true]; // The user's HTTP request to the filter. test.fuzz.HttpData downstream_request = 3 [(validate.rules).message.required = true]; diff --git a/tests/fuzz/structured_inputs/service_control_filter.proto b/tests/fuzz/structured_inputs/service_control_filter.proto index 070e74114..87c6c8560 100644 --- a/tests/fuzz/structured_inputs/service_control_filter.proto +++ b/tests/fuzz/structured_inputs/service_control_filter.proto @@ -3,13 +3,13 @@ syntax = "proto3"; package espv2.tests.fuzz.protos; import "test/fuzz/common.proto"; -import "api/envoy/v7/http/service_control/config.proto"; +import "api/envoy/v8/http/service_control/config.proto"; import "validate/validate.proto"; message ServiceControlFilterInput { // Filter config. - espv2.api.envoy.v7.http.service_control.FilterConfig config = 1 [(validate.rules).message.required = true]; + espv2.api.envoy.v8.http.service_control.FilterConfig config = 1 [(validate.rules).message.required = true]; // The user's HTTP request to the filter. test.fuzz.HttpData downstream_request = 2 [(validate.rules).message.required = true];