From 65f1af8dddbde8a38547d0690a771bcca66760ba Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Mon, 23 Dec 2019 20:50:42 +0000 Subject: [PATCH] api: handle moving file to another package (#9452) Signed-off-by: Lizan Zhou Mirrored from https://github.com/envoyproxy/envoy @ e4d6f195a5457835fc7d8877323adeb46cc47763 --- bazel/repository_locations.bzl | 4 ++-- envoy/admin/v3alpha/BUILD | 1 + envoy/admin/v3alpha/config_dump.proto | 6 +++--- envoy/api/v2/ratelimit/BUILD | 4 +++- envoy/api/v2/ratelimit/ratelimit.proto | 2 ++ envoy/api/v2/srds.proto | 2 ++ .../network/http_connection_manager/v3alpha/BUILD | 1 + .../v3alpha/http_connection_manager.proto | 11 ++++++----- .../config/filter/network/rate_limit/v3alpha/BUILD | 1 - .../network/rate_limit/v3alpha/rate_limit.proto | 4 ++-- envoy/config/ratelimit/v3alpha/BUILD | 1 + .../ratelimit/v3alpha}/ratelimit.proto | 4 ++-- envoy/service/ratelimit/v3alpha/BUILD | 2 +- envoy/service/ratelimit/v3alpha/rls.proto | 4 ++-- .../ratelimit => service/route/v3alpha}/BUILD | 4 +++- envoy/{api => service/route}/v3alpha/srds.proto | 14 ++++++++------ 16 files changed, 39 insertions(+), 26 deletions(-) rename envoy/{api/v3alpha/ratelimit => config/ratelimit/v3alpha}/ratelimit.proto (95%) rename envoy/{api/v3alpha/ratelimit => service/route/v3alpha}/BUILD (74%) rename envoy/{api => service/route}/v3alpha/srds.proto (89%) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 2fe98108..2acc9e88 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -15,8 +15,8 @@ PROMETHEUS_SHA = "783bdaf8ee0464b35ec0c8704871e1e72afa0005c3f3587f65d9d6694bf391 KAFKA_SOURCE_SHA = "ae7a1696c0a0302b43c5b21e515c37e6ecd365941f68a510a7e442eebddf39a1" # 2.2.0-rc2 -UDPA_GIT_SHA = "d1f2ba7f5ba62c55b7466409e7f972c93e957d2b" # Dec 6, 2019 -UDPA_SHA256 = "0271fb8ad2ec9ade21e4c7737dd128d2a8d8edebe911b777e2fc2585414aa045" +UDPA_GIT_SHA = "f4306cbaebf0f69d6e7077534a21f1cfdcde557e" # Dec 23, 2019 +UDPA_SHA256 = "19970965227edc34c491ae447e278b40e192ef54a947df43d586683e88b496bf" ZIPKINAPI_RELEASE = "0.2.2" # Aug 23, 2019 ZIPKINAPI_SHA256 = "688c4fe170821dd589f36ec45aaadc03a618a40283bc1f97da8fa11686fc816b" diff --git a/envoy/admin/v3alpha/BUILD b/envoy/admin/v3alpha/BUILD index 6d1ad80b..d150c5b8 100644 --- a/envoy/admin/v3alpha/BUILD +++ b/envoy/admin/v3alpha/BUILD @@ -11,6 +11,7 @@ api_proto_package( "//envoy/api/v3alpha/auth:pkg", "//envoy/api/v3alpha/core:pkg", "//envoy/config/bootstrap/v3alpha:pkg", + "//envoy/service/route/v3alpha:pkg", "//envoy/service/tap/v3alpha:pkg", "//envoy/type/v3alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", diff --git a/envoy/admin/v3alpha/config_dump.proto b/envoy/admin/v3alpha/config_dump.proto index d634e94e..94ec351a 100644 --- a/envoy/admin/v3alpha/config_dump.proto +++ b/envoy/admin/v3alpha/config_dump.proto @@ -6,8 +6,8 @@ import "envoy/api/v3alpha/auth/cert.proto"; import "envoy/api/v3alpha/cds.proto"; import "envoy/api/v3alpha/lds.proto"; import "envoy/api/v3alpha/rds.proto"; -import "envoy/api/v3alpha/srds.proto"; import "envoy/config/bootstrap/v3alpha/bootstrap.proto"; +import "envoy/service/route/v3alpha/srds.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; @@ -264,7 +264,7 @@ message ScopedRoutesConfigDump { string name = 1; // The scoped route configurations. - repeated api.v3alpha.ScopedRouteConfiguration scoped_route_configs = 2; + repeated service.route.v3alpha.ScopedRouteConfiguration scoped_route_configs = 2; // The timestamp when the scoped route config set was last updated. google.protobuf.Timestamp last_updated = 3; @@ -283,7 +283,7 @@ message ScopedRoutesConfigDump { string version_info = 2; // The scoped route configurations. - repeated api.v3alpha.ScopedRouteConfiguration scoped_route_configs = 3; + repeated service.route.v3alpha.ScopedRouteConfiguration scoped_route_configs = 3; // The timestamp when the scoped route config set was last updated. google.protobuf.Timestamp last_updated = 4; diff --git a/envoy/api/v2/ratelimit/BUILD b/envoy/api/v2/ratelimit/BUILD index 5dc095ad..ef3541eb 100644 --- a/envoy/api/v2/ratelimit/BUILD +++ b/envoy/api/v2/ratelimit/BUILD @@ -4,4 +4,6 @@ load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 -api_proto_package() +api_proto_package( + deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"], +) diff --git a/envoy/api/v2/ratelimit/ratelimit.proto b/envoy/api/v2/ratelimit/ratelimit.proto index 63fe2fbe..4afb9b4f 100644 --- a/envoy/api/v2/ratelimit/ratelimit.proto +++ b/envoy/api/v2/ratelimit/ratelimit.proto @@ -2,11 +2,13 @@ syntax = "proto3"; package envoy.api.v2.ratelimit; +import "udpa/annotations/migrate.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.ratelimit"; option java_outer_classname = "RatelimitProto"; option java_multiple_files = true; +option (udpa.annotations.file_migrate).move_to_package = "envoy.config.ratelimit.v3alpha"; // [#protodoc-title: Common rate limit components] diff --git a/envoy/api/v2/srds.proto b/envoy/api/v2/srds.proto index c0644112..52593923 100644 --- a/envoy/api/v2/srds.proto +++ b/envoy/api/v2/srds.proto @@ -6,12 +6,14 @@ import "envoy/api/v2/discovery.proto"; import "google/api/annotations.proto"; +import "udpa/annotations/migrate.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2"; option java_outer_classname = "SrdsProto"; option java_multiple_files = true; option java_generic_services = true; +option (udpa.annotations.file_migrate).move_to_package = "envoy.service.route.v3alpha"; // [#protodoc-title: HTTP scoped routing configuration] // * Routing :ref:`architecture overview ` diff --git a/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD b/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD index 20cc473c..f7a00a82 100644 --- a/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD +++ b/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD @@ -10,6 +10,7 @@ api_proto_package( "//envoy/api/v3alpha/core:pkg", "//envoy/config/filter/accesslog/v3alpha:pkg", "//envoy/config/filter/network/http_connection_manager/v2:pkg", + "//envoy/service/route/v3alpha:pkg", "//envoy/type/tracing/v2:pkg", "//envoy/type/v3alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", diff --git a/envoy/config/filter/network/http_connection_manager/v3alpha/http_connection_manager.proto b/envoy/config/filter/network/http_connection_manager/v3alpha/http_connection_manager.proto index 40a0343b..394d3871 100644 --- a/envoy/config/filter/network/http_connection_manager/v3alpha/http_connection_manager.proto +++ b/envoy/config/filter/network/http_connection_manager/v3alpha/http_connection_manager.proto @@ -5,8 +5,8 @@ package envoy.config.filter.network.http_connection_manager.v3alpha; import "envoy/api/v3alpha/core/config_source.proto"; import "envoy/api/v3alpha/core/protocol.proto"; import "envoy/api/v3alpha/rds.proto"; -import "envoy/api/v3alpha/srds.proto"; import "envoy/config/filter/accesslog/v3alpha/accesslog.proto"; +import "envoy/service/route/v3alpha/srds.proto"; import "envoy/type/tracing/v2/custom_tag.proto"; import "envoy/type/v3alpha/percent.proto"; @@ -495,7 +495,7 @@ message ScopedRouteConfigurationsList { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList"; - repeated api.v3alpha.ScopedRouteConfiguration scoped_route_configurations = 1 + repeated service.route.v3alpha.ScopedRouteConfiguration scoped_route_configurations = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -506,9 +506,10 @@ message ScopedRoutes { // Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These // keys are matched against a set of - // :ref:`Key` objects assembled from - // :ref:`ScopedRouteConfiguration` messages - // distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via + // :ref:`Key` objects assembled + // from + // :ref:`ScopedRouteConfiguration` + // messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via // :ref:`scoped_route_configurations_list`. // // Upon receiving a request's headers, the Router will build a key using the algorithm specified diff --git a/envoy/config/filter/network/rate_limit/v3alpha/BUILD b/envoy/config/filter/network/rate_limit/v3alpha/BUILD index e4ed6647..a3449a26 100644 --- a/envoy/config/filter/network/rate_limit/v3alpha/BUILD +++ b/envoy/config/filter/network/rate_limit/v3alpha/BUILD @@ -6,7 +6,6 @@ licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/ratelimit:pkg", "//envoy/config/filter/network/rate_limit/v2:pkg", "//envoy/config/ratelimit/v3alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", diff --git a/envoy/config/filter/network/rate_limit/v3alpha/rate_limit.proto b/envoy/config/filter/network/rate_limit/v3alpha/rate_limit.proto index 48c43855..c7c69f8a 100644 --- a/envoy/config/filter/network/rate_limit/v3alpha/rate_limit.proto +++ b/envoy/config/filter/network/rate_limit/v3alpha/rate_limit.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package envoy.config.filter.network.rate_limit.v3alpha; -import "envoy/api/v3alpha/ratelimit/ratelimit.proto"; +import "envoy/config/ratelimit/v3alpha/ratelimit.proto"; import "envoy/config/ratelimit/v3alpha/rls.proto"; import "google/protobuf/duration.proto"; @@ -31,7 +31,7 @@ message RateLimit { string domain = 2 [(validate.rules).string = {min_bytes: 1}]; // The rate limit descriptor list to use in the rate limit service request. - repeated api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 3 + repeated ratelimit.v3alpha.RateLimitDescriptor descriptors = 3 [(validate.rules).repeated = {min_items: 1}]; // The timeout in milliseconds for the rate limit service RPC. If not diff --git a/envoy/config/ratelimit/v3alpha/BUILD b/envoy/config/ratelimit/v3alpha/BUILD index 4b7fbe18..85fe3d5c 100644 --- a/envoy/config/ratelimit/v3alpha/BUILD +++ b/envoy/config/ratelimit/v3alpha/BUILD @@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2 api_proto_package( deps = [ + "//envoy/api/v2/ratelimit:pkg", "//envoy/api/v3alpha/core:pkg", "//envoy/config/ratelimit/v2:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", diff --git a/envoy/api/v3alpha/ratelimit/ratelimit.proto b/envoy/config/ratelimit/v3alpha/ratelimit.proto similarity index 95% rename from envoy/api/v3alpha/ratelimit/ratelimit.proto rename to envoy/config/ratelimit/v3alpha/ratelimit.proto index 88466bf4..01633bc8 100644 --- a/envoy/api/v3alpha/ratelimit/ratelimit.proto +++ b/envoy/config/ratelimit/v3alpha/ratelimit.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package envoy.api.v3alpha.ratelimit; +package envoy.config.ratelimit.v3alpha; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.api.v3alpha.ratelimit"; +option java_package = "io.envoyproxy.envoy.config.ratelimit.v3alpha"; option java_outer_classname = "RatelimitProto"; option java_multiple_files = true; diff --git a/envoy/service/ratelimit/v3alpha/BUILD b/envoy/service/ratelimit/v3alpha/BUILD index 2881cd28..267b5f1a 100644 --- a/envoy/service/ratelimit/v3alpha/BUILD +++ b/envoy/service/ratelimit/v3alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/api/v3alpha/core:pkg", - "//envoy/api/v3alpha/ratelimit:pkg", + "//envoy/config/ratelimit/v3alpha:pkg", "//envoy/service/ratelimit/v2:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/envoy/service/ratelimit/v3alpha/rls.proto b/envoy/service/ratelimit/v3alpha/rls.proto index 34389d29..cf969602 100644 --- a/envoy/service/ratelimit/v3alpha/rls.proto +++ b/envoy/service/ratelimit/v3alpha/rls.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.ratelimit.v3alpha; import "envoy/api/v3alpha/core/base.proto"; -import "envoy/api/v3alpha/ratelimit/ratelimit.proto"; +import "envoy/config/ratelimit/v3alpha/ratelimit.proto"; import "udpa/annotations/versioning.proto"; @@ -40,7 +40,7 @@ message RateLimitRequest { // All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is // processed by the service (see below). If any of the descriptors are over limit, the entire // request is considered to be over limit. - repeated api.v3alpha.ratelimit.RateLimitDescriptor descriptors = 2; + repeated config.ratelimit.v3alpha.RateLimitDescriptor descriptors = 2; // Rate limit requests can optionally specify the number of hits a request adds to the matched // limit. If the value is not set in the message, a request increases the matched limit by 1. diff --git a/envoy/api/v3alpha/ratelimit/BUILD b/envoy/service/route/v3alpha/BUILD similarity index 74% rename from envoy/api/v3alpha/ratelimit/BUILD rename to envoy/service/route/v3alpha/BUILD index ee90746a..bf6e346b 100644 --- a/envoy/api/v3alpha/ratelimit/BUILD +++ b/envoy/service/route/v3alpha/BUILD @@ -5,8 +5,10 @@ load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( + has_services = True, deps = [ - "//envoy/api/v2/ratelimit:pkg", + "//envoy/api/v2:pkg", + "//envoy/api/v3alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], ) diff --git a/envoy/api/v3alpha/srds.proto b/envoy/service/route/v3alpha/srds.proto similarity index 89% rename from envoy/api/v3alpha/srds.proto rename to envoy/service/route/v3alpha/srds.proto index 8732609c..ef165eb2 100644 --- a/envoy/api/v3alpha/srds.proto +++ b/envoy/service/route/v3alpha/srds.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package envoy.api.v3alpha; +package envoy.service.route.v3alpha; import "envoy/api/v3alpha/discovery.proto"; @@ -10,7 +10,7 @@ import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.api.v3alpha"; +option java_package = "io.envoyproxy.envoy.service.route.v3alpha"; option java_outer_classname = "SrdsProto"; option java_multiple_files = true; option java_generic_services = true; @@ -26,20 +26,22 @@ option java_generic_services = true; // :ref:`RouteConfiguration` message) to each // HTTP request. service ScopedRoutesDiscoveryService { - rpc StreamScopedRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) { + rpc StreamScopedRoutes(stream api.v3alpha.DiscoveryRequest) + returns (stream api.v3alpha.DiscoveryResponse) { } - rpc DeltaScopedRoutes(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { + rpc DeltaScopedRoutes(stream api.v3alpha.DeltaDiscoveryRequest) + returns (stream api.v3alpha.DeltaDiscoveryResponse) { } - rpc FetchScopedRoutes(DiscoveryRequest) returns (DiscoveryResponse) { + rpc FetchScopedRoutes(api.v3alpha.DiscoveryRequest) returns (api.v3alpha.DiscoveryResponse) { option (google.api.http).post = "/v3alpha/discovery:scoped-routes"; option (google.api.http).body = "*"; } } // Specifies a routing scope, which associates a -// :ref:`Key` to a +// :ref:`Key` to a // :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name). // // The HTTP connection manager builds up a table consisting of these Key to