diff --git a/.clang-tidy b/.clang-tidy index 64f4a36b7ac9..6f561d1c77f4 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -4,6 +4,7 @@ Checks: 'abseil-*, clang-diagnostic-*, misc-unused-using-decls, modernize-*, + -modernize-use-trailing-return-type, performance-*, readability-braces-around-statements, readability-container-size-empty, diff --git a/STYLE.md b/STYLE.md index c06d6d5282d7..0109169a0d55 100644 --- a/STYLE.md +++ b/STYLE.md @@ -165,7 +165,7 @@ environment. In general, there should be no non-local network access. In additio * Paths should be constructed using: * The methods in [`TestEnvironment`](test/test_common/environment.h) for C++ tests. - * With `${TEST_TMPDIR}` (for writable temporary space) or `${TEST_RUNDIR}` for read-only access to + * With `${TEST_TMPDIR}` (for writable temporary space) or `${TEST_SRCDIR}` for read-only access to test inputs in shell tests. * With `{{ test_tmpdir }}`, `{{ test_rundir }}` and `{{ test_udsdir }}` respectively for JSON templates. `{{ test_udsdir }}` is provided for pathname based Unix Domain Sockets, which must fit within a diff --git a/api/bazel/api_build_system.bzl b/api/bazel/api_build_system.bzl index 25bca4673541..8000f18e0d4e 100644 --- a/api/bazel/api_build_system.bzl +++ b/api/bazel/api_build_system.bzl @@ -3,11 +3,16 @@ load("@com_envoyproxy_protoc_gen_validate//bazel:pgv_proto_library.bzl", "pgv_cc load("@io_bazel_rules_go//proto:def.bzl", "go_grpc_library", "go_proto_library") load("@io_bazel_rules_go//go:def.bzl", "go_test") load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library") - -_PY_SUFFIX = "_py" -_CC_SUFFIX = "_cc" +load( + "//bazel:external_proto_deps.bzl", + "EXTERNAL_PROTO_CC_BAZEL_DEP_MAP", + "EXTERNAL_PROTO_GO_BAZEL_DEP_MAP", + "EXTERNAL_PROTO_PY_BAZEL_DEP_MAP", +) + +_PY_PROTO_SUFFIX = "_py_proto" +_CC_PROTO_SUFFIX = "_cc_proto" _CC_GRPC_SUFFIX = "_cc_grpc" -_CC_EXPORT_SUFFIX = "_export_cc" _GO_PROTO_SUFFIX = "_go_proto" _GO_IMPORTPATH_PREFIX = "github.com/envoyproxy/go-control-plane/" @@ -20,30 +25,38 @@ _COMMON_PROTO_DEPS = [ "@com_google_protobuf//:timestamp_proto", "@com_google_protobuf//:wrappers_proto", "@com_google_googleapis//google/api:http_proto", + "@com_google_googleapis//google/api:httpbody_proto", "@com_google_googleapis//google/api:annotations_proto", "@com_google_googleapis//google/rpc:status_proto", "@com_envoyproxy_protoc_gen_validate//validate:validate_proto", ] -def _Suffix(d, suffix): - return d + suffix +def _proto_mapping(dep, proto_dep_map, proto_suffix): + mapped = proto_dep_map.get(dep) + if mapped == None: + prefix = "@" + Label(dep).workspace_name if not dep.startswith("//") else "" + return prefix + "//" + Label(dep).package + ":" + Label(dep).name + proto_suffix + return mapped + +def _go_proto_mapping(dep): + return _proto_mapping(dep, EXTERNAL_PROTO_GO_BAZEL_DEP_MAP, _GO_PROTO_SUFFIX) + +def _cc_proto_mapping(dep): + return _proto_mapping(dep, EXTERNAL_PROTO_CC_BAZEL_DEP_MAP, _CC_PROTO_SUFFIX) -def _LibrarySuffix(library_name, suffix): - # Transform //a/b/c to //a/b/c:c in preparation for suffix operation below. - if library_name.startswith("//") and ":" not in library_name: - library_name += ":" + Label(library_name).name - return _Suffix(library_name, suffix) +def _py_proto_mapping(dep): + return _proto_mapping(dep, EXTERNAL_PROTO_PY_BAZEL_DEP_MAP, _PY_PROTO_SUFFIX) # TODO(htuch): Convert this to native py_proto_library once # https://github.com/bazelbuild/bazel/issues/3935 and/or # https://github.com/bazelbuild/bazel/issues/2626 are resolved. -def api_py_proto_library(name, srcs = [], deps = [], external_py_proto_deps = []): +def _api_py_proto_library(name, srcs = [], deps = []): _py_proto_library( - name = _Suffix(name, _PY_SUFFIX), + name = name + _PY_PROTO_SUFFIX, srcs = srcs, default_runtime = "@com_google_protobuf//:protobuf_python", protoc = "@com_google_protobuf//:protoc", - deps = [_LibrarySuffix(d, _PY_SUFFIX) for d in deps] + external_py_proto_deps + [ + deps = [_py_proto_mapping(dep) for dep in deps] + [ "@com_envoyproxy_protoc_gen_validate//validate:validate_py", "@com_google_googleapis//google/rpc:status_py_proto", "@com_google_googleapis//google/api:annotations_py_proto", @@ -83,113 +96,65 @@ def _api_cc_grpc_library(name, proto, deps = []): visibility = ["//visibility:public"], ) -def _ToCanonicalLabel(label): - # //my/app and //my/app:app are the same label. In places we mutate the incoming label adding different suffixes - # in order to generate multiple targets in a single rule. //my/app:app_grpc_cc. - # Skylark formatters and linters prefer the shorthand label whilst we need the latter. - rel = Label("//" + native.package_name()).relative(label) - return "//" + rel.package + ":" + rel.name - -# This is api_proto_library plus some logic internal to //envoy/api. -def api_proto_library_internal(visibility = ["//visibility:private"], **kwargs): - # //envoy/docs/build.sh needs visibility in order to generate documents. - if visibility == ["//visibility:private"]: - visibility = ["//docs"] - elif visibility != ["//visibility:public"]: - visibility = visibility + ["//docs"] - - api_proto_library(visibility = visibility, **kwargs) - -def api_proto_library( +def api_cc_py_proto_library( name, visibility = ["//visibility:private"], srcs = [], deps = [], - tags = [], - external_proto_deps = [], - external_cc_proto_deps = [], - external_py_proto_deps = [], - has_services = 0, - linkstatic = None, - require_py = 1): + linkstatic = 0, + has_services = 0): relative_name = ":" + name native.proto_library( name = name, srcs = srcs, - deps = deps + external_proto_deps + _COMMON_PROTO_DEPS, - tags = tags, + deps = deps + _COMMON_PROTO_DEPS, visibility = visibility, ) - cc_proto_library_name = _Suffix(name, _CC_SUFFIX) + cc_proto_library_name = name + _CC_PROTO_SUFFIX pgv_cc_proto_library( name = cc_proto_library_name, linkstatic = linkstatic, - cc_deps = [_LibrarySuffix(d, _CC_SUFFIX) for d in deps] + external_cc_proto_deps + [ + cc_deps = [_cc_proto_mapping(dep) for dep in deps] + [ "@com_google_googleapis//google/api:http_cc_proto", + "@com_google_googleapis//google/api:httpbody_cc_proto", "@com_google_googleapis//google/api:annotations_cc_proto", "@com_google_googleapis//google/rpc:status_cc_proto", ], deps = [relative_name], visibility = ["//visibility:public"], ) - py_export_suffixes = [] - if require_py: - api_py_proto_library(name, srcs, deps, external_py_proto_deps) - py_export_suffixes = ["_py", "_py_genproto"] + _api_py_proto_library(name, srcs, deps) # Optionally define gRPC services if has_services: # TODO: when Python services are required, add to the below stub generations. - cc_grpc_name = _Suffix(name, _CC_GRPC_SUFFIX) - cc_proto_deps = [cc_proto_library_name] + [_Suffix(_ToCanonicalLabel(x), _CC_SUFFIX) for x in deps] + cc_grpc_name = name + _CC_GRPC_SUFFIX + cc_proto_deps = [cc_proto_library_name] + [_cc_proto_mapping(dep) for dep in deps] _api_cc_grpc_library(name = cc_grpc_name, proto = relative_name, deps = cc_proto_deps) - # Allow unlimited visibility for consumers - export_suffixes = ["", "_cc", "_cc_validate"] + py_export_suffixes - for s in export_suffixes: - native.alias( - name = name + "_export" + s, - actual = name + s, - visibility = ["//visibility:public"], - ) - -def api_cc_test(name, srcs, proto_deps): +def api_cc_test(name, **kwargs): native.cc_test( name = name, - srcs = srcs, - deps = [_LibrarySuffix(d, _CC_EXPORT_SUFFIX) for d in proto_deps], + **kwargs ) -def api_go_test(name, size, importpath, srcs = [], deps = []): +def api_go_test(name, **kwargs): go_test( name = name, - size = size, - srcs = srcs, - importpath = importpath, - deps = deps, + **kwargs ) -_GO_BAZEL_RULE_MAPPING = { - "@opencensus_proto//opencensus/proto/trace/v1:trace_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_proto_go", - "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_and_config_proto_go", - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:cel_go_proto", -} - -def go_proto_mapping(dep): - mapped = _GO_BAZEL_RULE_MAPPING.get(dep) - if mapped == None: - return _Suffix("@" + Label(dep).workspace_name + "//" + Label(dep).package + ":" + Label(dep).name, _GO_PROTO_SUFFIX) - return mapped - -def api_proto_package(name = "pkg", srcs = [], deps = [], has_services = False, visibility = ["//visibility:public"]): +def api_proto_package(srcs = [], deps = [], has_services = False, visibility = ["//visibility:public"]): if srcs == []: srcs = native.glob(["*.proto"]) - native.proto_library( + name = "pkg" + api_cc_py_proto_library( name = name, - srcs = srcs, - deps = deps + _COMMON_PROTO_DEPS, visibility = visibility, + srcs = srcs, + deps = deps, + has_services = has_services, ) compilers = ["@io_bazel_rules_go//proto:go_proto", "//bazel:pgv_plugin_go"] @@ -197,12 +162,12 @@ def api_proto_package(name = "pkg", srcs = [], deps = [], has_services = False, compilers = ["@io_bazel_rules_go//proto:go_grpc", "//bazel:pgv_plugin_go"] go_proto_library( - name = _Suffix(name, _GO_PROTO_SUFFIX), + name = name + _GO_PROTO_SUFFIX, compilers = compilers, - importpath = _Suffix(_GO_IMPORTPATH_PREFIX, native.package_name()), + importpath = _GO_IMPORTPATH_PREFIX + native.package_name(), proto = name, visibility = ["//visibility:public"], - deps = [go_proto_mapping(dep) for dep in deps] + [ + deps = [_go_proto_mapping(dep) for dep in deps] + [ "@com_github_golang_protobuf//ptypes:go_default_library", "@com_github_golang_protobuf//ptypes/any:go_default_library", "@com_github_golang_protobuf//ptypes/duration:go_default_library", diff --git a/api/bazel/external_proto_deps.bzl b/api/bazel/external_proto_deps.bzl new file mode 100644 index 000000000000..2c4752efbf0a --- /dev/null +++ b/api/bazel/external_proto_deps.bzl @@ -0,0 +1,37 @@ +# Any external dependency imported in the api/ .protos requires entries in +# the maps below, to allow the Bazel proto and language specific bindings to be +# inferred from the import directives. +# +# This file needs to be interpreted as both Python 3 and Starlark, so only the +# common subset of Python should be used. + +# This maps from .proto import directive path to the Bazel dependency path for +# external dependencies. Since BUILD files are generated, this is the canonical +# place to define this mapping. +EXTERNAL_PROTO_IMPORT_BAZEL_DEP_MAP = { + "google/api/expr/v1alpha1/syntax.proto": "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", + "metrics.proto": "@prometheus_metrics_model//:client_model", + "opencensus/proto/trace/v1/trace.proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_proto", + "opencensus/proto/trace/v1/trace_config.proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto", +} + +# This maps from the Bazel proto_library target to the Go language binding target for external dependencies. +EXTERNAL_PROTO_GO_BAZEL_DEP_MAP = { + "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:cel_go_proto", + "@opencensus_proto//opencensus/proto/trace/v1:trace_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_proto_go", + "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_and_config_proto_go", +} + +# This maps from the Bazel proto_library target to the C++ language binding target for external dependencies. +EXTERNAL_PROTO_CC_BAZEL_DEP_MAP = { + "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto", + "@opencensus_proto//opencensus/proto/trace/v1:trace_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_proto_cc", + "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto_cc", +} + +# This maps from the Bazel proto_library target to the Python language binding target for external dependencies. +EXTERNAL_PROTO_PY_BAZEL_DEP_MAP = { + "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto": "@com_google_googleapis//google/api/expr/v1alpha1:syntax_py_proto", + "@opencensus_proto//opencensus/proto/trace/v1:trace_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_proto_py", + "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto": "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto_py", +} diff --git a/api/bazel/repositories.bzl b/api/bazel/repositories.bzl index 27d0219ae8af..f2c40ef9808e 100644 --- a/api/bazel/repositories.bzl +++ b/api/bazel/repositories.bzl @@ -41,10 +41,10 @@ def api_dependencies(): ) PROMETHEUSMETRICS_BUILD_CONTENT = """ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library") +load("@envoy_api//bazel:api_build_system.bzl", "api_cc_py_proto_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") -api_proto_library( +api_cc_py_proto_library( name = "client_model", srcs = [ "metrics.proto", @@ -61,10 +61,10 @@ go_proto_library( """ OPENCENSUSTRACE_BUILD_CONTENT = """ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library") +load("@envoy_api//bazel:api_build_system.bzl", "api_cc_py_proto_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") -api_proto_library( +api_cc_py_proto_library( name = "trace_model", srcs = [ "trace.proto", @@ -102,10 +102,10 @@ filegroup( ZIPKINAPI_BUILD_CONTENT = """ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library") +load("@envoy_api//bazel:api_build_system.bzl", "api_cc_py_proto_library") load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") -api_proto_library( +api_cc_py_proto_library( name = "zipkin", srcs = [ "zipkin-jsonv2.proto", diff --git a/api/docs/BUILD b/api/docs/BUILD index 31ed1ee5bae6..6d82e95d55a4 100644 --- a/api/docs/BUILD +++ b/api/docs/BUILD @@ -12,82 +12,74 @@ proto_library( name = "protos", deps = [ "//envoy/admin/v2alpha:pkg", - "//envoy/api/v2", - "//envoy/api/v2/auth", - "//envoy/api/v2/cluster", - "//envoy/api/v2/core", - "//envoy/api/v2/endpoint", + "//envoy/api/v2:pkg", + "//envoy/api/v2/auth:pkg", + "//envoy/api/v2/cluster:pkg", + "//envoy/api/v2/core:pkg", + "//envoy/api/v2/endpoint:pkg", "//envoy/api/v2/listener:pkg", - "//envoy/api/v2/ratelimit", - "//envoy/api/v2/route", - "//envoy/config/accesslog/v2:als", - "//envoy/config/accesslog/v2:file", - "//envoy/config/bootstrap/v2:bootstrap", - "//envoy/config/cluster/dynamic_forward_proxy/v2alpha:cluster", - "//envoy/config/cluster/redis:redis_cluster", - "//envoy/config/common/dynamic_forward_proxy/v2alpha:dns_cache", - "//envoy/config/common/tap/v2alpha:common", - "//envoy/config/filter/accesslog/v2:accesslog", - "//envoy/config/filter/dubbo/router/v2alpha1:router", - "//envoy/config/filter/fault/v2:fault", - "//envoy/config/filter/http/buffer/v2:buffer", - "//envoy/config/filter/http/csrf/v2:csrf", - "//envoy/config/filter/http/dynamic_forward_proxy/v2alpha:dynamic_forward_proxy", - "//envoy/config/filter/http/ext_authz/v2:ext_authz", - "//envoy/config/filter/http/fault/v2:fault", - "//envoy/config/filter/http/gzip/v2:gzip", - "//envoy/config/filter/http/header_to_metadata/v2:header_to_metadata", - "//envoy/config/filter/http/health_check/v2:health_check", - "//envoy/config/filter/http/ip_tagging/v2:ip_tagging", - "//envoy/config/filter/http/jwt_authn/v2alpha:jwt_authn", - "//envoy/config/filter/http/lua/v2:lua", - "//envoy/config/filter/http/original_src/v2alpha1:original_src", - "//envoy/config/filter/http/rate_limit/v2:rate_limit", - "//envoy/config/filter/http/rbac/v2:rbac", - "//envoy/config/filter/http/router/v2:router", - "//envoy/config/filter/http/squash/v2:squash", - "//envoy/config/filter/http/tap/v2alpha:tap", - "//envoy/config/filter/http/transcoder/v2:transcoder", - "//envoy/config/filter/listener/original_src/v2alpha1:original_src", - "//envoy/config/filter/network/client_ssl_auth/v2:client_ssl_auth", - "//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy", - "//envoy/config/filter/network/ext_authz/v2:ext_authz", - "//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager", - "//envoy/config/filter/network/mongo_proxy/v2:mongo_proxy", - "//envoy/config/filter/network/rate_limit/v2:rate_limit", - "//envoy/config/filter/network/rbac/v2:rbac", - "//envoy/config/filter/network/redis_proxy/v2:redis_proxy", - "//envoy/config/filter/network/tcp_proxy/v2:tcp_proxy", - "//envoy/config/filter/network/thrift_proxy/v2alpha1:thrift_proxy", - "//envoy/config/filter/thrift/rate_limit/v2alpha1:rate_limit", - "//envoy/config/filter/thrift/router/v2alpha1:router", - "//envoy/config/grpc_credential/v2alpha:aws_iam", - "//envoy/config/grpc_credential/v2alpha:file_based_metadata", - "//envoy/config/health_checker/redis/v2:redis", - "//envoy/config/metrics/v2:metrics_service", - "//envoy/config/metrics/v2:stats", - "//envoy/config/overload/v2alpha:overload", - "//envoy/config/ratelimit/v2:rls", - "//envoy/config/rbac/v2:rbac", - "//envoy/config/resource_monitor/fixed_heap/v2alpha:fixed_heap", - "//envoy/config/resource_monitor/injected_resource/v2alpha:injected_resource", - "//envoy/config/trace/v2:trace", - "//envoy/config/transport_socket/tap/v2alpha:tap", - "//envoy/data/accesslog/v2:accesslog", - "//envoy/data/cluster/v2alpha:outlier_detection_event", - "//envoy/data/core/v2alpha:health_check_event", - "//envoy/data/tap/v2alpha:common", - "//envoy/data/tap/v2alpha:http", - "//envoy/data/tap/v2alpha:transport", - "//envoy/data/tap/v2alpha:wrapper", - "//envoy/service/accesslog/v2:als", - "//envoy/service/auth/v2:attribute_context", - "//envoy/service/auth/v2:external_auth", - "//envoy/service/discovery/v2:ads", - "//envoy/service/discovery/v2:rtds", - "//envoy/service/ratelimit/v2:rls", - "//envoy/service/tap/v2alpha:common", - "//envoy/type", - "//envoy/type/matcher", + "//envoy/api/v2/ratelimit:pkg", + "//envoy/api/v2/route:pkg", + "//envoy/config/accesslog/v2:pkg", + "//envoy/config/bootstrap/v2:pkg", + "//envoy/config/cluster/dynamic_forward_proxy/v2alpha:pkg", + "//envoy/config/cluster/redis:pkg", + "//envoy/config/common/dynamic_forward_proxy/v2alpha:pkg", + "//envoy/config/common/tap/v2alpha:pkg", + "//envoy/config/filter/accesslog/v2:pkg", + "//envoy/config/filter/dubbo/router/v2alpha1:pkg", + "//envoy/config/filter/fault/v2:pkg", + "//envoy/config/filter/http/buffer/v2:pkg", + "//envoy/config/filter/http/csrf/v2:pkg", + "//envoy/config/filter/http/dynamic_forward_proxy/v2alpha:pkg", + "//envoy/config/filter/http/ext_authz/v2:pkg", + "//envoy/config/filter/http/fault/v2:pkg", + "//envoy/config/filter/http/gzip/v2:pkg", + "//envoy/config/filter/http/header_to_metadata/v2:pkg", + "//envoy/config/filter/http/health_check/v2:pkg", + "//envoy/config/filter/http/ip_tagging/v2:pkg", + "//envoy/config/filter/http/jwt_authn/v2alpha:pkg", + "//envoy/config/filter/http/lua/v2:pkg", + "//envoy/config/filter/http/original_src/v2alpha1:pkg", + "//envoy/config/filter/http/rate_limit/v2:pkg", + "//envoy/config/filter/http/rbac/v2:pkg", + "//envoy/config/filter/http/router/v2:pkg", + "//envoy/config/filter/http/squash/v2:pkg", + "//envoy/config/filter/http/tap/v2alpha:pkg", + "//envoy/config/filter/http/transcoder/v2:pkg", + "//envoy/config/filter/listener/original_src/v2alpha1:pkg", + "//envoy/config/filter/network/client_ssl_auth/v2:pkg", + "//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg", + "//envoy/config/filter/network/ext_authz/v2:pkg", + "//envoy/config/filter/network/http_connection_manager/v2:pkg", + "//envoy/config/filter/network/mongo_proxy/v2:pkg", + "//envoy/config/filter/network/rate_limit/v2:pkg", + "//envoy/config/filter/network/rbac/v2:pkg", + "//envoy/config/filter/network/redis_proxy/v2:pkg", + "//envoy/config/filter/network/tcp_proxy/v2:pkg", + "//envoy/config/filter/network/thrift_proxy/v2alpha1:pkg", + "//envoy/config/filter/thrift/rate_limit/v2alpha1:pkg", + "//envoy/config/filter/thrift/router/v2alpha1:pkg", + "//envoy/config/grpc_credential/v2alpha:pkg", + "//envoy/config/health_checker/redis/v2:pkg", + "//envoy/config/metrics/v2:pkg", + "//envoy/config/overload/v2alpha:pkg", + "//envoy/config/ratelimit/v2:pkg", + "//envoy/config/rbac/v2:pkg", + "//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg", + "//envoy/config/resource_monitor/injected_resource/v2alpha:pkg", + "//envoy/config/trace/v2:pkg", + "//envoy/config/transport_socket/tap/v2alpha:pkg", + "//envoy/data/accesslog/v2:pkg", + "//envoy/data/cluster/v2alpha:pkg", + "//envoy/data/core/v2alpha:pkg", + "//envoy/data/tap/v2alpha:pkg", + "//envoy/service/accesslog/v2:pkg", + "//envoy/service/auth/v2:pkg", + "//envoy/service/discovery/v2:pkg", + "//envoy/service/ratelimit/v2:pkg", + "//envoy/service/tap/v2alpha:pkg", + "//envoy/type:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/admin/v2alpha/BUILD b/api/envoy/admin/v2alpha/BUILD index 850eb0515865..38a121362b73 100644 --- a/api/envoy/admin/v2alpha/BUILD +++ b/api/envoy/admin/v2alpha/BUILD @@ -1,87 +1,16 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2", - "//envoy/api/v2/auth", - "//envoy/api/v2/core", + "//envoy/api/v2:pkg", + "//envoy/api/v2/auth:pkg", + "//envoy/api/v2/core:pkg", "//envoy/config/bootstrap/v2:pkg", "//envoy/service/tap/v2alpha:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "config_dump", - srcs = ["config_dump.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2:cds", - "//envoy/api/v2:lds", - "//envoy/api/v2:rds", - "//envoy/api/v2:srds", - "//envoy/api/v2/auth:cert", - "//envoy/config/bootstrap/v2:bootstrap", - ], -) - -api_proto_library_internal( - name = "clusters", - srcs = ["clusters.proto"], - visibility = ["//visibility:public"], - deps = [ - ":metrics", - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:health_check", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "listeners", - srcs = ["listeners.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2/core:address", - ], -) - -api_proto_library_internal( - name = "metrics", - srcs = ["metrics.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "memory", - srcs = ["memory.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "mutex_stats", - srcs = ["mutex_stats.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "certs", - srcs = ["certs.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "server_info", - srcs = ["server_info.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - deps = [ - "//envoy/service/tap/v2alpha:common", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/admin/v3alpha/BUILD b/api/envoy/admin/v3alpha/BUILD index 9849282084a6..1643f1bc1fa8 100644 --- a/api/envoy/admin/v3alpha/BUILD +++ b/api/envoy/admin/v3alpha/BUILD @@ -1,87 +1,16 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha", - "//envoy/api/v3alpha/auth", - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha:pkg", + "//envoy/api/v3alpha/auth:pkg", + "//envoy/api/v3alpha/core:pkg", "//envoy/config/bootstrap/v3alpha:pkg", "//envoy/service/tap/v3alpha:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "config_dump", - srcs = ["config_dump.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha:cds", - "//envoy/api/v3alpha:lds", - "//envoy/api/v3alpha:rds", - "//envoy/api/v3alpha:srds", - "//envoy/api/v3alpha/auth:cert", - "//envoy/config/bootstrap/v3alpha:bootstrap", - ], -) - -api_proto_library_internal( - name = "clusters", - srcs = ["clusters.proto"], - visibility = ["//visibility:public"], - deps = [ - ":metrics", - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:health_check", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "listeners", - srcs = ["listeners.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha/core:address", - ], -) - -api_proto_library_internal( - name = "metrics", - srcs = ["metrics.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "memory", - srcs = ["memory.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "mutex_stats", - srcs = ["mutex_stats.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "certs", - srcs = ["certs.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "server_info", - srcs = ["server_info.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - deps = [ - "//envoy/service/tap/v3alpha:common", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/api/v2/BUILD b/api/envoy/api/v2/BUILD index 9bffa27360ee..d2e303826210 100644 --- a/api/envoy/api/v2/BUILD +++ b/api/envoy/api/v2/BUILD @@ -1,118 +1,19 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -# Friends of core API packages - filters, services, service configs. -# Package //envoy/api/v2 contains xDS and discovery definitions that should -# be in //envoy/service/discovery, but remain here for backwards compatibility. -package_group( - name = "friends", - packages = [ - "//envoy/admin/...", - "//envoy/api/v2", - "//envoy/config/...", - "//envoy/data/...", - "//envoy/service/...", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package( - name = "v2", has_services = True, deps = [ - "//envoy/api/v2/auth", - "//envoy/api/v2/cluster", - "//envoy/api/v2/core", + "//envoy/api/v2/auth:pkg", + "//envoy/api/v2/cluster:pkg", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/endpoint:pkg", "//envoy/api/v2/listener:pkg", - "//envoy/api/v2/ratelimit:pkg", "//envoy/api/v2/route:pkg", "//envoy/config/listener/v2:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "discovery", - srcs = ["discovery.proto"], - has_services = 1, - visibility = [":friends"], - deps = ["//envoy/api/v2/core:base"], -) - -api_proto_library_internal( - name = "eds", - srcs = ["eds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:health_check", - "//envoy/api/v2/endpoint", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "cds", - srcs = ["cds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - ":eds", - "//envoy/api/v2/auth:cert", - "//envoy/api/v2/cluster:circuit_breaker", - "//envoy/api/v2/cluster:filter", - "//envoy/api/v2/cluster:outlier_detection", - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:config_source", - "//envoy/api/v2/core:health_check", - "//envoy/api/v2/core:protocol", - "//envoy/api/v2/endpoint", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "lds", - srcs = ["lds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - "//envoy/api/v2/listener", - "//envoy/api/v2/listener:udp_listener_config", - "//envoy/config/listener/v2:api_listener", - ], -) - -api_proto_library_internal( - name = "rds", - srcs = ["rds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:config_source", - "//envoy/api/v2/route", - ], -) - -api_proto_library_internal( - name = "srds", - srcs = ["srds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v2/core:base", - "//envoy/api/v2/route", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/api/v2/auth/BUILD b/api/envoy/api/v2/auth/BUILD index bb3951fb95aa..97eb16ccddad 100644 --- a/api/envoy/api/v2/auth/BUILD +++ b/api/envoy/api/v2/auth/BUILD @@ -1,33 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -package_group( - name = "friends", - includes = [ - "//envoy/api/v2:friends", - ], - packages = [ - "//envoy/api/v2/cluster", - "//envoy/api/v2/endpoint", - "//envoy/api/v2/listener", - "//envoy/api/v2/route", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package( - name = "auth", - deps = [ - "//envoy/api/v2/core", - ], -) - -api_proto_library_internal( - name = "cert", - srcs = ["cert.proto"], - visibility = [":friends"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:config_source", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/api/v2/cluster/BUILD b/api/envoy/api/v2/cluster/BUILD index baf9a4bfdeb7..97eb16ccddad 100644 --- a/api/envoy/api/v2/cluster/BUILD +++ b/api/envoy/api/v2/cluster/BUILD @@ -1,37 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - name = "cluster", - deps = [ - "//envoy/api/v2/core", - ], -) - -api_proto_library_internal( - name = "circuit_breaker", - srcs = ["circuit_breaker.proto"], - visibility = [ - "//envoy/api/v2:__pkg__", - ], - deps = [ - "//envoy/api/v2/core:base", - ], -) - -api_proto_library_internal( - name = "outlier_detection", - srcs = ["outlier_detection.proto"], - visibility = [ - "//envoy/api/v2:__pkg__", - ], -) - -api_proto_library_internal( - name = "filter", - srcs = ["filter.proto"], - visibility = [ - "//envoy/api/v2:__pkg__", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/api/v2/core/BUILD b/api/envoy/api/v2/core/BUILD index 01234d07b198..8ac33b5554e8 100644 --- a/api/envoy/api/v2/core/BUILD +++ b/api/envoy/api/v2/core/BUILD @@ -1,94 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -package_group( - name = "friends", - includes = [ - "//envoy/api/v2:friends", - ], - packages = [ - "//envoy/api/v2/auth", - "//envoy/api/v2/cluster", - "//envoy/api/v2/endpoint", - "//envoy/api/v2/listener", - "//envoy/api/v2/route", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package( - name = "core", - deps = [ - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "address", - srcs = ["address.proto"], - visibility = [ - ":friends", - ], - deps = [":base"], -) - -api_proto_library_internal( - name = "base", - srcs = ["base.proto"], - visibility = [ - ":friends", - ], - deps = [ - ":http_uri", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "health_check", - srcs = ["health_check.proto"], - visibility = [ - ":friends", - ], - deps = [ - ":base", - "//envoy/type:range", - ], -) - -api_proto_library_internal( - name = "config_source", - srcs = ["config_source.proto"], - visibility = [ - ":friends", - ], - deps = [ - ":base", - ":grpc_service", - ], -) - -api_proto_library_internal( - name = "http_uri", - srcs = ["http_uri.proto"], - visibility = [ - ":friends", - ], -) - -api_proto_library_internal( - name = "grpc_service", - srcs = ["grpc_service.proto"], - visibility = [ - ":friends", - ], - deps = [":base"], -) - -api_proto_library_internal( - name = "protocol", - srcs = ["protocol.proto"], - visibility = [ - ":friends", - ], + deps = ["//envoy/type:pkg"], ) diff --git a/api/envoy/api/v2/endpoint/BUILD b/api/envoy/api/v2/endpoint/BUILD index a12db37309ce..97eb16ccddad 100644 --- a/api/envoy/api/v2/endpoint/BUILD +++ b/api/envoy/api/v2/endpoint/BUILD @@ -1,34 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v2/auth", - "//envoy/api/v2/core", - ], -) - -api_proto_library_internal( - name = "endpoint", - srcs = ["endpoint.proto"], - visibility = ["//envoy/api/v2:friends"], - deps = [ - "//envoy/api/v2/auth:cert", - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:config_source", - "//envoy/api/v2/core:health_check", - "//envoy/api/v2/core:protocol", - ], -) - -api_proto_library_internal( - name = "load_report", - srcs = ["load_report.proto"], - visibility = ["//envoy/api/v2:friends"], - deps = [ - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/api/v2/endpoint/load_report.proto b/api/envoy/api/v2/endpoint/load_report.proto index b44313ba4ee3..fdaa08115f30 100644 --- a/api/envoy/api/v2/endpoint/load_report.proto +++ b/api/envoy/api/v2/endpoint/load_report.proto @@ -53,6 +53,7 @@ message UpstreamLocalityStats { uint32 priority = 6; } +// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. message UpstreamEndpointStats { // Upstream host address. core.Address address = 1; @@ -109,8 +110,16 @@ message EndpointLoadMetricStats { // [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. // Next ID: 7 message ClusterStats { + message DroppedRequests { + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_bytes: 1}]; + + // Total number of deliberately dropped requests for the category. + uint64 dropped_count = 2; + } + // The name of the cluster. - string cluster_name = 1 [(validate.rules).string.min_bytes = 1]; + string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}]; // The eds_cluster_config service_name of the cluster. // It's possible that two clusters send the same service_name to EDS, @@ -119,7 +128,7 @@ message ClusterStats { // Need at least one. repeated UpstreamLocalityStats upstream_locality_stats = 2 - [(validate.rules).repeated .min_items = 1]; + [(validate.rules).repeated = {min_items: 1}]; // Cluster-level stats such as total_successful_requests may be computed by // summing upstream_locality_stats. In addition, below there are additional @@ -129,12 +138,6 @@ message ClusterStats { // deliberately dropped by the drop_overload policy and circuit breaking. uint64 total_dropped_requests = 3; - message DroppedRequests { - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string.min_bytes = 1]; - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } // Information about deliberately dropped requests for each category specified // in the DropOverload policy. repeated DroppedRequests dropped_requests = 5; diff --git a/api/envoy/api/v2/listener/BUILD b/api/envoy/api/v2/listener/BUILD index 99a82254d165..3a88d9fd94c5 100644 --- a/api/envoy/api/v2/listener/BUILD +++ b/api/envoy/api/v2/listener/BUILD @@ -1,36 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/auth", - "//envoy/api/v2/core", - ], -) - -api_proto_library_internal( - name = "listener", - srcs = ["listener.proto"], - visibility = ["//envoy/api/v2:friends"], - deps = [ - "//envoy/api/v2/auth:cert", - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", + "//envoy/api/v2/auth:pkg", + "//envoy/api/v2/core:pkg", ], ) - -api_proto_library_internal( - name = "udp_listener_config", - srcs = ["udp_listener_config.proto"], - visibility = ["//envoy/api/v2:friends"], - deps = [ - "//envoy/api/v2/core:base", - ], -) - -api_proto_library_internal( - name = "quic_config", - srcs = ["quic_config.proto"], - visibility = ["//envoy/api/v2:friends"], -) diff --git a/api/envoy/api/v2/ratelimit/BUILD b/api/envoy/api/v2/ratelimit/BUILD index 234a3b20f16b..5dc095ade27a 100644 --- a/api/envoy/api/v2/ratelimit/BUILD +++ b/api/envoy/api/v2/ratelimit/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "ratelimit", - srcs = ["ratelimit.proto"], - visibility = ["//envoy/api/v2:friends"], -) diff --git a/api/envoy/api/v2/route/BUILD b/api/envoy/api/v2/route/BUILD index 163281ca35df..d3b85c4c63dd 100644 --- a/api/envoy/api/v2/route/BUILD +++ b/api/envoy/api/v2/route/BUILD @@ -1,24 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", - "//envoy/type", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "route", - srcs = ["route.proto"], - visibility = ["//envoy/api/v2:friends"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/type:percent", - "//envoy/type:range", - "//envoy/type/matcher:regex", - "//envoy/type/matcher:string", + "//envoy/api/v2/core:pkg", + "//envoy/type:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/api/v3alpha/BUILD b/api/envoy/api/v3alpha/BUILD index 87f1f03a3b1d..630c7e4aaba0 100644 --- a/api/envoy/api/v3alpha/BUILD +++ b/api/envoy/api/v3alpha/BUILD @@ -1,118 +1,19 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -# Friends of core API packages - filters, services, service configs. -# Package //envoy/api/v3alpha contains xDS and discovery definitions that should -# be in //envoy/service/discovery, but remain here for backwards compatibility. -package_group( - name = "friends", - packages = [ - "//envoy/admin/...", - "//envoy/api/v3alpha", - "//envoy/config/...", - "//envoy/data/...", - "//envoy/service/...", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package( - name = "v3alpha", has_services = True, deps = [ - "//envoy/api/v3alpha/auth", - "//envoy/api/v3alpha/cluster", - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/auth:pkg", + "//envoy/api/v3alpha/cluster:pkg", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/endpoint:pkg", "//envoy/api/v3alpha/listener:pkg", - "//envoy/api/v3alpha/ratelimit:pkg", "//envoy/api/v3alpha/route:pkg", "//envoy/config/listener/v3alpha:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "discovery", - srcs = ["discovery.proto"], - has_services = 1, - visibility = [":friends"], - deps = ["//envoy/api/v3alpha/core:base"], -) - -api_proto_library_internal( - name = "eds", - srcs = ["eds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:health_check", - "//envoy/api/v3alpha/endpoint", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "cds", - srcs = ["cds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - ":eds", - "//envoy/api/v3alpha/auth:cert", - "//envoy/api/v3alpha/cluster:circuit_breaker", - "//envoy/api/v3alpha/cluster:filter", - "//envoy/api/v3alpha/cluster:outlier_detection", - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:config_source", - "//envoy/api/v3alpha/core:health_check", - "//envoy/api/v3alpha/core:protocol", - "//envoy/api/v3alpha/endpoint", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "lds", - srcs = ["lds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/listener", - "//envoy/api/v3alpha/listener:udp_listener_config", - "//envoy/config/listener/v3alpha:api_listener", - ], -) - -api_proto_library_internal( - name = "rds", - srcs = ["rds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:config_source", - "//envoy/api/v3alpha/route", - ], -) - -api_proto_library_internal( - name = "srds", - srcs = ["srds.proto"], - has_services = 1, - visibility = [":friends"], - deps = [ - ":discovery", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/route", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/api/v3alpha/auth/BUILD b/api/envoy/api/v3alpha/auth/BUILD index 6c47aff6e2a3..4e89d949ab9d 100644 --- a/api/envoy/api/v3alpha/auth/BUILD +++ b/api/envoy/api/v3alpha/auth/BUILD @@ -1,33 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -package_group( - name = "friends", - includes = [ - "//envoy/api/v3alpha:friends", - ], - packages = [ - "//envoy/api/v3alpha/cluster", - "//envoy/api/v3alpha/endpoint", - "//envoy/api/v3alpha/listener", - "//envoy/api/v3alpha/route", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package( - name = "auth", - deps = [ - "//envoy/api/v3alpha/core", - ], -) - -api_proto_library_internal( - name = "cert", - srcs = ["cert.proto"], - visibility = [":friends"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:config_source", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/api/v3alpha/cluster/BUILD b/api/envoy/api/v3alpha/cluster/BUILD index ef01624057e0..4e89d949ab9d 100644 --- a/api/envoy/api/v3alpha/cluster/BUILD +++ b/api/envoy/api/v3alpha/cluster/BUILD @@ -1,37 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - name = "cluster", - deps = [ - "//envoy/api/v3alpha/core", - ], -) - -api_proto_library_internal( - name = "circuit_breaker", - srcs = ["circuit_breaker.proto"], - visibility = [ - "//envoy/api/v3alpha:__pkg__", - ], - deps = [ - "//envoy/api/v3alpha/core:base", - ], -) - -api_proto_library_internal( - name = "outlier_detection", - srcs = ["outlier_detection.proto"], - visibility = [ - "//envoy/api/v3alpha:__pkg__", - ], -) - -api_proto_library_internal( - name = "filter", - srcs = ["filter.proto"], - visibility = [ - "//envoy/api/v3alpha:__pkg__", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/api/v3alpha/core/BUILD b/api/envoy/api/v3alpha/core/BUILD index 871c9fe0e838..8ac33b5554e8 100644 --- a/api/envoy/api/v3alpha/core/BUILD +++ b/api/envoy/api/v3alpha/core/BUILD @@ -1,94 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -package_group( - name = "friends", - includes = [ - "//envoy/api/v3alpha:friends", - ], - packages = [ - "//envoy/api/v3alpha/auth", - "//envoy/api/v3alpha/cluster", - "//envoy/api/v3alpha/endpoint", - "//envoy/api/v3alpha/listener", - "//envoy/api/v3alpha/route", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package( - name = "core", - deps = [ - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "address", - srcs = ["address.proto"], - visibility = [ - ":friends", - ], - deps = [":base"], -) - -api_proto_library_internal( - name = "base", - srcs = ["base.proto"], - visibility = [ - ":friends", - ], - deps = [ - ":http_uri", - "//envoy/type:percent", - ], -) - -api_proto_library_internal( - name = "health_check", - srcs = ["health_check.proto"], - visibility = [ - ":friends", - ], - deps = [ - ":base", - "//envoy/type:range", - ], -) - -api_proto_library_internal( - name = "config_source", - srcs = ["config_source.proto"], - visibility = [ - ":friends", - ], - deps = [ - ":base", - ":grpc_service", - ], -) - -api_proto_library_internal( - name = "http_uri", - srcs = ["http_uri.proto"], - visibility = [ - ":friends", - ], -) - -api_proto_library_internal( - name = "grpc_service", - srcs = ["grpc_service.proto"], - visibility = [ - ":friends", - ], - deps = [":base"], -) - -api_proto_library_internal( - name = "protocol", - srcs = ["protocol.proto"], - visibility = [ - ":friends", - ], + deps = ["//envoy/type:pkg"], ) diff --git a/api/envoy/api/v3alpha/endpoint/BUILD b/api/envoy/api/v3alpha/endpoint/BUILD index 733560514dbd..4e89d949ab9d 100644 --- a/api/envoy/api/v3alpha/endpoint/BUILD +++ b/api/envoy/api/v3alpha/endpoint/BUILD @@ -1,34 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v3alpha/auth", - "//envoy/api/v3alpha/core", - ], -) - -api_proto_library_internal( - name = "endpoint", - srcs = ["endpoint.proto"], - visibility = ["//envoy/api/v3alpha:friends"], - deps = [ - "//envoy/api/v3alpha/auth:cert", - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:config_source", - "//envoy/api/v3alpha/core:health_check", - "//envoy/api/v3alpha/core:protocol", - ], -) - -api_proto_library_internal( - name = "load_report", - srcs = ["load_report.proto"], - visibility = ["//envoy/api/v3alpha:friends"], - deps = [ - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/api/v3alpha/endpoint/load_report.proto b/api/envoy/api/v3alpha/endpoint/load_report.proto index 9ab814d30db2..e70581d208b7 100644 --- a/api/envoy/api/v3alpha/endpoint/load_report.proto +++ b/api/envoy/api/v3alpha/endpoint/load_report.proto @@ -53,6 +53,7 @@ message UpstreamLocalityStats { uint32 priority = 6; } +// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. message UpstreamEndpointStats { // Upstream host address. core.Address address = 1; @@ -109,8 +110,16 @@ message EndpointLoadMetricStats { // [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. // Next ID: 7 message ClusterStats { + message DroppedRequests { + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_bytes: 1}]; + + // Total number of deliberately dropped requests for the category. + uint64 dropped_count = 2; + } + // The name of the cluster. - string cluster_name = 1 [(validate.rules).string.min_bytes = 1]; + string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}]; // The eds_cluster_config service_name of the cluster. // It's possible that two clusters send the same service_name to EDS, @@ -119,7 +128,7 @@ message ClusterStats { // Need at least one. repeated UpstreamLocalityStats upstream_locality_stats = 2 - [(validate.rules).repeated .min_items = 1]; + [(validate.rules).repeated = {min_items: 1}]; // Cluster-level stats such as total_successful_requests may be computed by // summing upstream_locality_stats. In addition, below there are additional @@ -129,12 +138,6 @@ message ClusterStats { // deliberately dropped by the drop_overload policy and circuit breaking. uint64 total_dropped_requests = 3; - message DroppedRequests { - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string.min_bytes = 1]; - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } // Information about deliberately dropped requests for each category specified // in the DropOverload policy. repeated DroppedRequests dropped_requests = 5; diff --git a/api/envoy/api/v3alpha/listener/BUILD b/api/envoy/api/v3alpha/listener/BUILD index 4a4836db9412..1e9b4f7feaf6 100644 --- a/api/envoy/api/v3alpha/listener/BUILD +++ b/api/envoy/api/v3alpha/listener/BUILD @@ -1,36 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/auth", - "//envoy/api/v3alpha/core", - ], -) - -api_proto_library_internal( - name = "listener", - srcs = ["listener.proto"], - visibility = ["//envoy/api/v3alpha:friends"], - deps = [ - "//envoy/api/v3alpha/auth:cert", - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", + "//envoy/api/v3alpha/auth:pkg", + "//envoy/api/v3alpha/core:pkg", ], ) - -api_proto_library_internal( - name = "udp_listener_config", - srcs = ["udp_listener_config.proto"], - visibility = ["//envoy/api/v3alpha:friends"], - deps = [ - "//envoy/api/v3alpha/core:base", - ], -) - -api_proto_library_internal( - name = "quic_config", - srcs = ["quic_config.proto"], - visibility = ["//envoy/api/v3alpha:friends"], -) diff --git a/api/envoy/api/v3alpha/ratelimit/BUILD b/api/envoy/api/v3alpha/ratelimit/BUILD index a99624b1c421..5dc095ade27a 100644 --- a/api/envoy/api/v3alpha/ratelimit/BUILD +++ b/api/envoy/api/v3alpha/ratelimit/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "ratelimit", - srcs = ["ratelimit.proto"], - visibility = ["//envoy/api/v3alpha:friends"], -) diff --git a/api/envoy/api/v3alpha/route/BUILD b/api/envoy/api/v3alpha/route/BUILD index cbed3ec01f4b..344edfebaa36 100644 --- a/api/envoy/api/v3alpha/route/BUILD +++ b/api/envoy/api/v3alpha/route/BUILD @@ -1,24 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "route", - srcs = ["route.proto"], - visibility = ["//envoy/api/v3alpha:friends"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/type:percent", - "//envoy/type:range", - "//envoy/type/matcher:regex", - "//envoy/type/matcher:string", + "//envoy/api/v3alpha/core:pkg", + "//envoy/type:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/accesslog/v2/BUILD b/api/envoy/config/accesslog/v2/BUILD index 22c48f795224..97eb16ccddad 100644 --- a/api/envoy/config/accesslog/v2/BUILD +++ b/api/envoy/config/accesslog/v2/BUILD @@ -1,20 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library_internal( - name = "als", - srcs = ["als.proto"], - deps = [ - "//envoy/api/v2/core:grpc_service", - ], -) - -api_proto_library_internal( - name = "file", - srcs = ["file.proto"], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/config/accesslog/v3alpha/BUILD b/api/envoy/config/accesslog/v3alpha/BUILD index 8409598da650..4e89d949ab9d 100644 --- a/api/envoy/config/accesslog/v3alpha/BUILD +++ b/api/envoy/config/accesslog/v3alpha/BUILD @@ -1,20 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library_internal( - name = "als", - srcs = ["als.proto"], - deps = [ - "//envoy/api/v3alpha/core:grpc_service", - ], -) - -api_proto_library_internal( - name = "file", - srcs = ["file.proto"], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/config/bootstrap/v2/BUILD b/api/envoy/config/bootstrap/v2/BUILD index 1f3a79104b60..ade709544815 100644 --- a/api/envoy/config/bootstrap/v2/BUILD +++ b/api/envoy/config/bootstrap/v2/BUILD @@ -1,34 +1,16 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2", - "//envoy/api/v2/auth", - "//envoy/api/v2/core", + "//envoy/api/v2:pkg", + "//envoy/api/v2/auth:pkg", + "//envoy/api/v2/core:pkg", "//envoy/config/metrics/v2:pkg", "//envoy/config/overload/v2alpha:pkg", - "//envoy/config/ratelimit/v2:pkg", "//envoy/config/trace/v2:pkg", ], ) - -api_proto_library_internal( - name = "bootstrap", - srcs = ["bootstrap.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2:cds", - "//envoy/api/v2:lds", - "//envoy/api/v2/auth:cert", - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:config_source", - "//envoy/config/metrics/v2:metrics_service", - "//envoy/config/metrics/v2:stats", - "//envoy/config/overload/v2alpha:overload", - "//envoy/config/ratelimit/v2:rls", - "//envoy/config/trace/v2:trace", - ], -) diff --git a/api/envoy/config/bootstrap/v3alpha/BUILD b/api/envoy/config/bootstrap/v3alpha/BUILD index c88b982492ce..8ce92ade1e2f 100644 --- a/api/envoy/config/bootstrap/v3alpha/BUILD +++ b/api/envoy/config/bootstrap/v3alpha/BUILD @@ -1,34 +1,16 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha", - "//envoy/api/v3alpha/auth", - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha:pkg", + "//envoy/api/v3alpha/auth:pkg", + "//envoy/api/v3alpha/core:pkg", "//envoy/config/metrics/v3alpha:pkg", "//envoy/config/overload/v3alpha:pkg", - "//envoy/config/ratelimit/v3alpha:pkg", "//envoy/config/trace/v3alpha:pkg", ], ) - -api_proto_library_internal( - name = "bootstrap", - srcs = ["bootstrap.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha:cds", - "//envoy/api/v3alpha:lds", - "//envoy/api/v3alpha/auth:cert", - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:config_source", - "//envoy/config/metrics/v3alpha:metrics_service", - "//envoy/config/metrics/v3alpha:stats", - "//envoy/config/overload/v3alpha:overload", - "//envoy/config/ratelimit/v3alpha:rls", - "//envoy/config/trace/v3alpha:trace", - ], -) diff --git a/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/BUILD b/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/BUILD index 669b6745ab74..f6ae67b2e3a6 100644 --- a/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/BUILD +++ b/api/envoy/config/cluster/dynamic_forward_proxy/v2alpha/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/common/dynamic_forward_proxy/v2alpha:pkg"], ) - -api_proto_library_internal( - name = "cluster", - srcs = ["cluster.proto"], - deps = [ - "//envoy/config/common/dynamic_forward_proxy/v2alpha:dns_cache", - ], -) diff --git a/api/envoy/config/cluster/dynamic_forward_proxy/v3alpha/BUILD b/api/envoy/config/cluster/dynamic_forward_proxy/v3alpha/BUILD index 3c1d737802cb..d0df543383dc 100644 --- a/api/envoy/config/cluster/dynamic_forward_proxy/v3alpha/BUILD +++ b/api/envoy/config/cluster/dynamic_forward_proxy/v3alpha/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/common/dynamic_forward_proxy/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "cluster", - srcs = ["cluster.proto"], - deps = [ - "//envoy/config/common/dynamic_forward_proxy/v3alpha:dns_cache", - ], -) diff --git a/api/envoy/config/cluster/redis/BUILD b/api/envoy/config/cluster/redis/BUILD index 760ae606c05d..5dc095ade27a 100644 --- a/api/envoy/config/cluster/redis/BUILD +++ b/api/envoy/config/cluster/redis/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "redis_cluster", - srcs = ["redis_cluster.proto"], -) diff --git a/api/envoy/config/common/dynamic_forward_proxy/v2alpha/BUILD b/api/envoy/config/common/dynamic_forward_proxy/v2alpha/BUILD index 312ae36b3762..f8e33065331c 100644 --- a/api/envoy/config/common/dynamic_forward_proxy/v2alpha/BUILD +++ b/api/envoy/config/common/dynamic_forward_proxy/v2alpha/BUILD @@ -1,16 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2"], -) - -api_proto_library_internal( - name = "dns_cache", - srcs = ["dns_cache.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2:cds", - ], + deps = ["//envoy/api/v2:pkg"], ) diff --git a/api/envoy/config/common/dynamic_forward_proxy/v3alpha/BUILD b/api/envoy/config/common/dynamic_forward_proxy/v3alpha/BUILD index e1853725da14..31d6642f9a16 100644 --- a/api/envoy/config/common/dynamic_forward_proxy/v3alpha/BUILD +++ b/api/envoy/config/common/dynamic_forward_proxy/v3alpha/BUILD @@ -1,16 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha"], -) - -api_proto_library_internal( - name = "dns_cache", - srcs = ["dns_cache.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha:cds", - ], + deps = ["//envoy/api/v3alpha:pkg"], ) diff --git a/api/envoy/config/common/tap/v2alpha/BUILD b/api/envoy/config/common/tap/v2alpha/BUILD index 898773297b51..05b3d6cb19eb 100644 --- a/api/envoy/config/common/tap/v2alpha/BUILD +++ b/api/envoy/config/common/tap/v2alpha/BUILD @@ -1,20 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", + "//envoy/api/v2/core:pkg", "//envoy/service/tap/v2alpha:pkg", ], ) - -api_proto_library_internal( - name = "common", - srcs = ["common.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2/core:config_source", - "//envoy/service/tap/v2alpha:common", - ], -) diff --git a/api/envoy/config/common/tap/v3alpha/BUILD b/api/envoy/config/common/tap/v3alpha/BUILD index 55147b12ba3d..2c75bdcc328c 100644 --- a/api/envoy/config/common/tap/v3alpha/BUILD +++ b/api/envoy/config/common/tap/v3alpha/BUILD @@ -1,20 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/service/tap/v3alpha:pkg", ], ) - -api_proto_library_internal( - name = "common", - srcs = ["common.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha/core:config_source", - "//envoy/service/tap/v3alpha:common", - ], -) diff --git a/api/envoy/config/filter/accesslog/v2/BUILD b/api/envoy/config/filter/accesslog/v2/BUILD index d9b740921357..bef88b7f3238 100644 --- a/api/envoy/config/filter/accesslog/v2/BUILD +++ b/api/envoy/config/filter/accesslog/v2/BUILD @@ -1,26 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/route:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "accesslog", - srcs = ["accesslog.proto"], - visibility = [ - "//envoy/config/filter/http/router/v2:__pkg__", - "//envoy/config/filter/network/http_connection_manager/v2:__pkg__", - "//envoy/config/filter/network/tcp_proxy/v2:__pkg__", - ], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/route", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/accesslog/v3alpha/BUILD b/api/envoy/config/filter/accesslog/v3alpha/BUILD index 454a1ab4a135..5c5ac8726465 100644 --- a/api/envoy/config/filter/accesslog/v3alpha/BUILD +++ b/api/envoy/config/filter/accesslog/v3alpha/BUILD @@ -1,26 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/route:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "accesslog", - srcs = ["accesslog.proto"], - visibility = [ - "//envoy/config/filter/http/router/v3alpha:__pkg__", - "//envoy/config/filter/network/http_connection_manager/v3alpha:__pkg__", - "//envoy/config/filter/network/tcp_proxy/v3alpha:__pkg__", - ], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/route", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/dubbo/router/v2alpha1/BUILD b/api/envoy/config/filter/dubbo/router/v2alpha1/BUILD index 68bd8c126b80..5dc095ade27a 100644 --- a/api/envoy/config/filter/dubbo/router/v2alpha1/BUILD +++ b/api/envoy/config/filter/dubbo/router/v2alpha1/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "router", - srcs = ["router.proto"], -) diff --git a/api/envoy/config/filter/dubbo/router/v3alpha/BUILD b/api/envoy/config/filter/dubbo/router/v3alpha/BUILD index 68bd8c126b80..5dc095ade27a 100644 --- a/api/envoy/config/filter/dubbo/router/v3alpha/BUILD +++ b/api/envoy/config/filter/dubbo/router/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "router", - srcs = ["router.proto"], -) diff --git a/api/envoy/config/filter/fault/v2/BUILD b/api/envoy/config/filter/fault/v2/BUILD index 78687f4e4da4..8ac33b5554e8 100644 --- a/api/envoy/config/filter/fault/v2/BUILD +++ b/api/envoy/config/filter/fault/v2/BUILD @@ -1,17 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/type"], -) - -api_proto_library_internal( - name = "fault", - srcs = ["fault.proto"], - visibility = [ - "//envoy/config/filter/http/fault/v2:__pkg__", - "//envoy/config/filter/network/mongo_proxy/v2:__pkg__", - ], - deps = ["//envoy/type:percent"], + deps = ["//envoy/type:pkg"], ) diff --git a/api/envoy/config/filter/fault/v3alpha/BUILD b/api/envoy/config/filter/fault/v3alpha/BUILD index 61bc8dc6bc5e..8ac33b5554e8 100644 --- a/api/envoy/config/filter/fault/v3alpha/BUILD +++ b/api/envoy/config/filter/fault/v3alpha/BUILD @@ -1,17 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/type"], -) - -api_proto_library_internal( - name = "fault", - srcs = ["fault.proto"], - visibility = [ - "//envoy/config/filter/http/fault/v3alpha:__pkg__", - "//envoy/config/filter/network/mongo_proxy/v3alpha:__pkg__", - ], - deps = ["//envoy/type:percent"], + deps = ["//envoy/type:pkg"], ) diff --git a/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/BUILD b/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/BUILD index a02fc542756c..8ac33b5554e8 100644 --- a/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/BUILD +++ b/api/envoy/config/filter/http/adaptive_concurrency/v2alpha/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "adaptive_concurrency", - srcs = ["adaptive_concurrency.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/type:percent", - ], + deps = ["//envoy/type:pkg"], ) diff --git a/api/envoy/config/filter/http/adaptive_concurrency/v3alpha/BUILD b/api/envoy/config/filter/http/adaptive_concurrency/v3alpha/BUILD index a02fc542756c..8ac33b5554e8 100644 --- a/api/envoy/config/filter/http/adaptive_concurrency/v3alpha/BUILD +++ b/api/envoy/config/filter/http/adaptive_concurrency/v3alpha/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "adaptive_concurrency", - srcs = ["adaptive_concurrency.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/type:percent", - ], + deps = ["//envoy/type:pkg"], ) diff --git a/api/envoy/config/filter/http/buffer/v2/BUILD b/api/envoy/config/filter/http/buffer/v2/BUILD index 039ebb63e6d2..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/buffer/v2/BUILD +++ b/api/envoy/config/filter/http/buffer/v2/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "buffer", - srcs = ["buffer.proto"], -) diff --git a/api/envoy/config/filter/http/buffer/v3alpha/BUILD b/api/envoy/config/filter/http/buffer/v3alpha/BUILD index 039ebb63e6d2..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/buffer/v3alpha/BUILD +++ b/api/envoy/config/filter/http/buffer/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "buffer", - srcs = ["buffer.proto"], -) diff --git a/api/envoy/config/filter/http/csrf/v2/BUILD b/api/envoy/config/filter/http/csrf/v2/BUILD index af3a87b07c05..a0eac27f8a5d 100644 --- a/api/envoy/config/filter/http/csrf/v2/BUILD +++ b/api/envoy/config/filter/http/csrf/v2/BUILD @@ -1,19 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "csrf", - srcs = ["csrf.proto"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/type/matcher:string", + "//envoy/api/v2/core:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/filter/http/csrf/v3alpha/BUILD b/api/envoy/config/filter/http/csrf/v3alpha/BUILD index 676559830c1f..7a38e127e145 100644 --- a/api/envoy/config/filter/http/csrf/v3alpha/BUILD +++ b/api/envoy/config/filter/http/csrf/v3alpha/BUILD @@ -1,19 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "csrf", - srcs = ["csrf.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/type/matcher:string", + "//envoy/api/v3alpha/core:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/BUILD b/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/BUILD index 15d184377ef7..f6ae67b2e3a6 100644 --- a/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/BUILD +++ b/api/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/common/dynamic_forward_proxy/v2alpha:pkg"], ) - -api_proto_library_internal( - name = "dynamic_forward_proxy", - srcs = ["dynamic_forward_proxy.proto"], - deps = [ - "//envoy/config/common/dynamic_forward_proxy/v2alpha:dns_cache", - ], -) diff --git a/api/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/BUILD b/api/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/BUILD index c06227674a08..d0df543383dc 100644 --- a/api/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/BUILD +++ b/api/envoy/config/filter/http/dynamic_forward_proxy/v3alpha/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/common/dynamic_forward_proxy/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "dynamic_forward_proxy", - srcs = ["dynamic_forward_proxy.proto"], - deps = [ - "//envoy/config/common/dynamic_forward_proxy/v3alpha:dns_cache", - ], -) diff --git a/api/envoy/config/filter/http/ext_authz/v2/BUILD b/api/envoy/config/filter/http/ext_authz/v2/BUILD index 10187f48bd2c..d3b85c4c63dd 100644 --- a/api/envoy/config/filter/http/ext_authz/v2/BUILD +++ b/api/envoy/config/filter/http/ext_authz/v2/BUILD @@ -1,23 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", - "//envoy/type", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "ext_authz", - srcs = ["ext_authz.proto"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:grpc_service", - "//envoy/api/v2/core:http_uri", - "//envoy/type:http_status", - "//envoy/type/matcher:string", + "//envoy/api/v2/core:pkg", + "//envoy/type:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/filter/http/ext_authz/v3alpha/BUILD b/api/envoy/config/filter/http/ext_authz/v3alpha/BUILD index cb0d25a3eebf..344edfebaa36 100644 --- a/api/envoy/config/filter/http/ext_authz/v3alpha/BUILD +++ b/api/envoy/config/filter/http/ext_authz/v3alpha/BUILD @@ -1,23 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "ext_authz", - srcs = ["ext_authz.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:grpc_service", - "//envoy/api/v3alpha/core:http_uri", - "//envoy/type:http_status", - "//envoy/type/matcher:string", + "//envoy/api/v3alpha/core:pkg", + "//envoy/type:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/filter/http/fault/v2/BUILD b/api/envoy/config/filter/http/fault/v2/BUILD index b169a0904860..e33406ae6c6b 100644 --- a/api/envoy/config/filter/http/fault/v2/BUILD +++ b/api/envoy/config/filter/http/fault/v2/BUILD @@ -1,4 +1,6 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 @@ -6,16 +8,6 @@ api_proto_package( deps = [ "//envoy/api/v2/route:pkg", "//envoy/config/filter/fault/v2:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "fault", - srcs = ["fault.proto"], - deps = [ - "//envoy/api/v2/route", - "//envoy/config/filter/fault/v2:fault", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/http/fault/v3alpha/BUILD b/api/envoy/config/filter/http/fault/v3alpha/BUILD index 508e2d3c92d2..7917d1a4ee62 100644 --- a/api/envoy/config/filter/http/fault/v3alpha/BUILD +++ b/api/envoy/config/filter/http/fault/v3alpha/BUILD @@ -1,4 +1,6 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 @@ -6,16 +8,6 @@ api_proto_package( deps = [ "//envoy/api/v3alpha/route:pkg", "//envoy/config/filter/fault/v3alpha:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "fault", - srcs = ["fault.proto"], - deps = [ - "//envoy/api/v3alpha/route", - "//envoy/config/filter/fault/v3alpha:fault", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/BUILD b/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/BUILD index a88ba2443cad..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/BUILD +++ b/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library( - name = "config", - srcs = ["config.proto"], -) diff --git a/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v3alpha/BUILD b/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v3alpha/BUILD index a88ba2443cad..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v3alpha/BUILD +++ b/api/envoy/config/filter/http/grpc_http1_reverse_bridge/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library( - name = "config", - srcs = ["config.proto"], -) diff --git a/api/envoy/config/filter/http/gzip/v2/BUILD b/api/envoy/config/filter/http/gzip/v2/BUILD index a3f4b0af2a44..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/gzip/v2/BUILD +++ b/api/envoy/config/filter/http/gzip/v2/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "gzip", - srcs = ["gzip.proto"], -) diff --git a/api/envoy/config/filter/http/gzip/v3alpha/BUILD b/api/envoy/config/filter/http/gzip/v3alpha/BUILD index a3f4b0af2a44..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/gzip/v3alpha/BUILD +++ b/api/envoy/config/filter/http/gzip/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "gzip", - srcs = ["gzip.proto"], -) diff --git a/api/envoy/config/filter/http/header_to_metadata/v2/BUILD b/api/envoy/config/filter/http/header_to_metadata/v2/BUILD index cfd34fcf2b08..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/header_to_metadata/v2/BUILD +++ b/api/envoy/config/filter/http/header_to_metadata/v2/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "header_to_metadata", - srcs = ["header_to_metadata.proto"], -) diff --git a/api/envoy/config/filter/http/header_to_metadata/v3alpha/BUILD b/api/envoy/config/filter/http/header_to_metadata/v3alpha/BUILD index cfd34fcf2b08..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/header_to_metadata/v3alpha/BUILD +++ b/api/envoy/config/filter/http/header_to_metadata/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "header_to_metadata", - srcs = ["header_to_metadata.proto"], -) diff --git a/api/envoy/config/filter/http/health_check/v2/BUILD b/api/envoy/config/filter/http/health_check/v2/BUILD index 8a995f1694af..2abb32391e1d 100644 --- a/api/envoy/config/filter/http/health_check/v2/BUILD +++ b/api/envoy/config/filter/http/health_check/v2/BUILD @@ -1,19 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ "//envoy/api/v2/route:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "health_check", - srcs = ["health_check.proto"], - deps = [ - "//envoy/api/v2/route", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/http/health_check/v3alpha/BUILD b/api/envoy/config/filter/http/health_check/v3alpha/BUILD index b583685750da..491322b8579d 100644 --- a/api/envoy/config/filter/http/health_check/v3alpha/BUILD +++ b/api/envoy/config/filter/http/health_check/v3alpha/BUILD @@ -1,19 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ "//envoy/api/v3alpha/route:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "health_check", - srcs = ["health_check.proto"], - deps = [ - "//envoy/api/v3alpha/route", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/http/ip_tagging/v2/BUILD b/api/envoy/config/filter/http/ip_tagging/v2/BUILD index b318ae58f381..97eb16ccddad 100644 --- a/api/envoy/config/filter/http/ip_tagging/v2/BUILD +++ b/api/envoy/config/filter/http/ip_tagging/v2/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library_internal( - name = "ip_tagging", - srcs = ["ip_tagging.proto"], - deps = ["//envoy/api/v2/core:address"], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/config/filter/http/ip_tagging/v3alpha/BUILD b/api/envoy/config/filter/http/ip_tagging/v3alpha/BUILD index a05f0fd96bb0..4e89d949ab9d 100644 --- a/api/envoy/config/filter/http/ip_tagging/v3alpha/BUILD +++ b/api/envoy/config/filter/http/ip_tagging/v3alpha/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library_internal( - name = "ip_tagging", - srcs = ["ip_tagging.proto"], - deps = ["//envoy/api/v3alpha/core:address"], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/config/filter/http/jwt_authn/v2alpha/BUILD b/api/envoy/config/filter/http/jwt_authn/v2alpha/BUILD index 80b4345f6151..16f7580fe7ee 100644 --- a/api/envoy/config/filter/http/jwt_authn/v2alpha/BUILD +++ b/api/envoy/config/filter/http/jwt_authn/v2alpha/BUILD @@ -1,20 +1,12 @@ -licenses(["notice"]) # Apache 2 +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/route:pkg", ], ) - -api_proto_library_internal( - name = "jwt_authn", - srcs = ["config.proto"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:http_uri", - "//envoy/api/v2/route", - ], -) diff --git a/api/envoy/config/filter/http/jwt_authn/v3alpha/BUILD b/api/envoy/config/filter/http/jwt_authn/v3alpha/BUILD index ea5d0d17b16a..900a0545c66e 100644 --- a/api/envoy/config/filter/http/jwt_authn/v3alpha/BUILD +++ b/api/envoy/config/filter/http/jwt_authn/v3alpha/BUILD @@ -1,20 +1,12 @@ -licenses(["notice"]) # Apache 2 +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/route:pkg", ], ) - -api_proto_library_internal( - name = "jwt_authn", - srcs = ["config.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:http_uri", - "//envoy/api/v3alpha/route", - ], -) diff --git a/api/envoy/config/filter/http/lua/v2/BUILD b/api/envoy/config/filter/http/lua/v2/BUILD index 7aaf74617c96..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/lua/v2/BUILD +++ b/api/envoy/config/filter/http/lua/v2/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "lua", - srcs = ["lua.proto"], -) diff --git a/api/envoy/config/filter/http/lua/v3alpha/BUILD b/api/envoy/config/filter/http/lua/v3alpha/BUILD index 7aaf74617c96..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/lua/v3alpha/BUILD +++ b/api/envoy/config/filter/http/lua/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "lua", - srcs = ["lua.proto"], -) diff --git a/api/envoy/config/filter/http/original_src/v2alpha1/BUILD b/api/envoy/config/filter/http/original_src/v2alpha1/BUILD index a7435bb55cfc..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/original_src/v2alpha1/BUILD +++ b/api/envoy/config/filter/http/original_src/v2alpha1/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "original_src", - srcs = ["original_src.proto"], -) diff --git a/api/envoy/config/filter/http/original_src/v3alpha/BUILD b/api/envoy/config/filter/http/original_src/v3alpha/BUILD index a7435bb55cfc..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/original_src/v3alpha/BUILD +++ b/api/envoy/config/filter/http/original_src/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "original_src", - srcs = ["original_src.proto"], -) diff --git a/api/envoy/config/filter/http/rate_limit/v2/BUILD b/api/envoy/config/filter/http/rate_limit/v2/BUILD index 4a6d451da981..5d32e2ddd406 100644 --- a/api/envoy/config/filter/http/rate_limit/v2/BUILD +++ b/api/envoy/config/filter/http/rate_limit/v2/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/ratelimit/v2:pkg"], ) - -api_proto_library_internal( - name = "rate_limit", - srcs = ["rate_limit.proto"], - deps = [ - "//envoy/config/ratelimit/v2:rls", - ], -) diff --git a/api/envoy/config/filter/http/rate_limit/v3alpha/BUILD b/api/envoy/config/filter/http/rate_limit/v3alpha/BUILD index 7060f7e9ce38..bdfffc73a735 100644 --- a/api/envoy/config/filter/http/rate_limit/v3alpha/BUILD +++ b/api/envoy/config/filter/http/rate_limit/v3alpha/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/ratelimit/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "rate_limit", - srcs = ["rate_limit.proto"], - deps = [ - "//envoy/config/ratelimit/v3alpha:rls", - ], -) diff --git a/api/envoy/config/filter/http/rbac/v2/BUILD b/api/envoy/config/filter/http/rbac/v2/BUILD index ca9aa2ca410c..f00321f47b09 100644 --- a/api/envoy/config/filter/http/rbac/v2/BUILD +++ b/api/envoy/config/filter/http/rbac/v2/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/rbac/v2:pkg"], ) - -api_proto_library_internal( - name = "rbac", - srcs = ["rbac.proto"], - deps = ["//envoy/config/rbac/v2:rbac"], -) diff --git a/api/envoy/config/filter/http/rbac/v3alpha/BUILD b/api/envoy/config/filter/http/rbac/v3alpha/BUILD index 1e4d51b50453..886af1e0d81b 100644 --- a/api/envoy/config/filter/http/rbac/v3alpha/BUILD +++ b/api/envoy/config/filter/http/rbac/v3alpha/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/rbac/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "rbac", - srcs = ["rbac.proto"], - deps = ["//envoy/config/rbac/v3alpha:rbac"], -) diff --git a/api/envoy/config/filter/http/router/v2/BUILD b/api/envoy/config/filter/http/router/v2/BUILD index 9ddaf54b2845..0370290d4c79 100644 --- a/api/envoy/config/filter/http/router/v2/BUILD +++ b/api/envoy/config/filter/http/router/v2/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/filter/accesslog/v2:pkg"], ) - -api_proto_library_internal( - name = "router", - srcs = ["router.proto"], - deps = ["//envoy/config/filter/accesslog/v2:accesslog"], -) diff --git a/api/envoy/config/filter/http/router/v2/router.proto b/api/envoy/config/filter/http/router/v2/router.proto index 7543069af029..6fe6093a26b6 100644 --- a/api/envoy/config/filter/http/router/v2/router.proto +++ b/api/envoy/config/filter/http/router/v2/router.proto @@ -65,4 +65,9 @@ message Router { } } }]; + + // If not set, ingress Envoy will ignore + // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress + // Envoy, when deriving timeout for upstream cluster. + bool respect_expected_rq_timeout = 6; } diff --git a/api/envoy/config/filter/http/router/v3alpha/BUILD b/api/envoy/config/filter/http/router/v3alpha/BUILD index d68a0ac2c2ee..f2a38cd5405c 100644 --- a/api/envoy/config/filter/http/router/v3alpha/BUILD +++ b/api/envoy/config/filter/http/router/v3alpha/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/filter/accesslog/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "router", - srcs = ["router.proto"], - deps = ["//envoy/config/filter/accesslog/v3alpha:accesslog"], -) diff --git a/api/envoy/config/filter/http/router/v3alpha/router.proto b/api/envoy/config/filter/http/router/v3alpha/router.proto index 168bbbd8f2b1..b2f109238a50 100644 --- a/api/envoy/config/filter/http/router/v3alpha/router.proto +++ b/api/envoy/config/filter/http/router/v3alpha/router.proto @@ -65,4 +65,9 @@ message Router { } } }]; + + // If not set, ingress Envoy will ignore + // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress + // Envoy, when deriving timeout for upstream cluster. + bool respect_expected_rq_timeout = 6; } diff --git a/api/envoy/config/filter/http/squash/v2/BUILD b/api/envoy/config/filter/http/squash/v2/BUILD index 2a0c1c8e30fa..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/squash/v2/BUILD +++ b/api/envoy/config/filter/http/squash/v2/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "squash", - srcs = ["squash.proto"], -) diff --git a/api/envoy/config/filter/http/squash/v3alpha/BUILD b/api/envoy/config/filter/http/squash/v3alpha/BUILD index 2a0c1c8e30fa..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/squash/v3alpha/BUILD +++ b/api/envoy/config/filter/http/squash/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "squash", - srcs = ["squash.proto"], -) diff --git a/api/envoy/config/filter/http/tap/v2alpha/BUILD b/api/envoy/config/filter/http/tap/v2alpha/BUILD index 0949dad0c6ac..b7a637988e5a 100644 --- a/api/envoy/config/filter/http/tap/v2alpha/BUILD +++ b/api/envoy/config/filter/http/tap/v2alpha/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/common/tap/v2alpha:pkg"], ) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - deps = [ - "//envoy/config/common/tap/v2alpha:common", - ], -) diff --git a/api/envoy/config/filter/http/tap/v3alpha/BUILD b/api/envoy/config/filter/http/tap/v3alpha/BUILD index 0535cfbc21ae..73167eb9145d 100644 --- a/api/envoy/config/filter/http/tap/v3alpha/BUILD +++ b/api/envoy/config/filter/http/tap/v3alpha/BUILD @@ -1,15 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/common/tap/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - deps = [ - "//envoy/config/common/tap/v3alpha:common", - ], -) diff --git a/api/envoy/config/filter/http/transcoder/v2/BUILD b/api/envoy/config/filter/http/transcoder/v2/BUILD index 33a99a23a061..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/transcoder/v2/BUILD +++ b/api/envoy/config/filter/http/transcoder/v2/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "transcoder", - srcs = ["transcoder.proto"], -) diff --git a/api/envoy/config/filter/http/transcoder/v3alpha/BUILD b/api/envoy/config/filter/http/transcoder/v3alpha/BUILD index 33a99a23a061..5dc095ade27a 100644 --- a/api/envoy/config/filter/http/transcoder/v3alpha/BUILD +++ b/api/envoy/config/filter/http/transcoder/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "transcoder", - srcs = ["transcoder.proto"], -) diff --git a/api/envoy/config/filter/listener/original_src/v2alpha1/BUILD b/api/envoy/config/filter/listener/original_src/v2alpha1/BUILD index a7435bb55cfc..5dc095ade27a 100644 --- a/api/envoy/config/filter/listener/original_src/v2alpha1/BUILD +++ b/api/envoy/config/filter/listener/original_src/v2alpha1/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "original_src", - srcs = ["original_src.proto"], -) diff --git a/api/envoy/config/filter/listener/original_src/v3alpha/BUILD b/api/envoy/config/filter/listener/original_src/v3alpha/BUILD index a7435bb55cfc..5dc095ade27a 100644 --- a/api/envoy/config/filter/listener/original_src/v3alpha/BUILD +++ b/api/envoy/config/filter/listener/original_src/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "original_src", - srcs = ["original_src.proto"], -) diff --git a/api/envoy/config/filter/network/client_ssl_auth/v2/BUILD b/api/envoy/config/filter/network/client_ssl_auth/v2/BUILD index 96b5e9d0d47c..97eb16ccddad 100644 --- a/api/envoy/config/filter/network/client_ssl_auth/v2/BUILD +++ b/api/envoy/config/filter/network/client_ssl_auth/v2/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library_internal( - name = "client_ssl_auth", - srcs = ["client_ssl_auth.proto"], - deps = ["//envoy/api/v2/core:address"], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/config/filter/network/client_ssl_auth/v3alpha/BUILD b/api/envoy/config/filter/network/client_ssl_auth/v3alpha/BUILD index 540d8b4aa1a4..4e89d949ab9d 100644 --- a/api/envoy/config/filter/network/client_ssl_auth/v3alpha/BUILD +++ b/api/envoy/config/filter/network/client_ssl_auth/v3alpha/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library_internal( - name = "client_ssl_auth", - srcs = ["client_ssl_auth.proto"], - deps = ["//envoy/api/v3alpha/core:address"], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/BUILD b/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/BUILD index c6cee209c654..e1cc9ef6f91c 100644 --- a/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/BUILD +++ b/api/envoy/config/filter/network/dubbo_proxy/v2alpha1/BUILD @@ -1,26 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", "//envoy/api/v2/route:pkg", - "//envoy/type", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "dubbo_proxy", - srcs = [ - "dubbo_proxy.proto", - "route.proto", - ], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/route", - "//envoy/type:range", - "//envoy/type/matcher:string", + "//envoy/type:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/filter/network/dubbo_proxy/v3alpha/BUILD b/api/envoy/config/filter/network/dubbo_proxy/v3alpha/BUILD index db73dfbd0848..1837fe64fe92 100644 --- a/api/envoy/config/filter/network/dubbo_proxy/v3alpha/BUILD +++ b/api/envoy/config/filter/network/dubbo_proxy/v3alpha/BUILD @@ -1,26 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", "//envoy/api/v3alpha/route:pkg", - "//envoy/type", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "dubbo_proxy", - srcs = [ - "dubbo_proxy.proto", - "route.proto", - ], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/route", - "//envoy/type:range", - "//envoy/type/matcher:string", + "//envoy/type:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/filter/network/ext_authz/v2/BUILD b/api/envoy/config/filter/network/ext_authz/v2/BUILD index 3bdae60659a1..97eb16ccddad 100644 --- a/api/envoy/config/filter/network/ext_authz/v2/BUILD +++ b/api/envoy/config/filter/network/ext_authz/v2/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library_internal( - name = "ext_authz", - srcs = ["ext_authz.proto"], - deps = ["//envoy/api/v2/core:grpc_service"], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/config/filter/network/ext_authz/v3alpha/BUILD b/api/envoy/config/filter/network/ext_authz/v3alpha/BUILD index 58aa28906331..4e89d949ab9d 100644 --- a/api/envoy/config/filter/network/ext_authz/v3alpha/BUILD +++ b/api/envoy/config/filter/network/ext_authz/v3alpha/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library_internal( - name = "ext_authz", - srcs = ["ext_authz.proto"], - deps = ["//envoy/api/v3alpha/core:grpc_service"], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/config/filter/network/http_connection_manager/v2/BUILD b/api/envoy/config/filter/network/http_connection_manager/v2/BUILD index 6a090f3a115d..a9f3622df0d0 100644 --- a/api/envoy/config/filter/network/http_connection_manager/v2/BUILD +++ b/api/envoy/config/filter/network/http_connection_manager/v2/BUILD @@ -1,26 +1,14 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2", - "//envoy/api/v2/core", + "//envoy/api/v2:pkg", + "//envoy/api/v2/core:pkg", "//envoy/config/filter/accesslog/v2:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "http_connection_manager", - srcs = ["http_connection_manager.proto"], - deps = [ - "//envoy/api/v2:rds", - "//envoy/api/v2:srds", - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:config_source", - "//envoy/api/v2/core:protocol", - "//envoy/config/filter/accesslog/v2:accesslog", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD b/api/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD index 57e0528c2ea6..d1eed6d92d46 100644 --- a/api/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD +++ b/api/envoy/config/filter/network/http_connection_manager/v3alpha/BUILD @@ -1,26 +1,14 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha", - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha:pkg", + "//envoy/api/v3alpha/core:pkg", "//envoy/config/filter/accesslog/v3alpha:pkg", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "http_connection_manager", - srcs = ["http_connection_manager.proto"], - deps = [ - "//envoy/api/v3alpha:rds", - "//envoy/api/v3alpha:srds", - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:config_source", - "//envoy/api/v3alpha/core:protocol", - "//envoy/config/filter/accesslog/v3alpha:accesslog", - "//envoy/type:percent", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/config/filter/network/mongo_proxy/v2/BUILD b/api/envoy/config/filter/network/mongo_proxy/v2/BUILD index 59bad30ed94d..577e2ed2b156 100644 --- a/api/envoy/config/filter/network/mongo_proxy/v2/BUILD +++ b/api/envoy/config/filter/network/mongo_proxy/v2/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/filter/fault/v2:pkg"], ) - -api_proto_library_internal( - name = "mongo_proxy", - srcs = ["mongo_proxy.proto"], - deps = ["//envoy/config/filter/fault/v2:fault"], -) diff --git a/api/envoy/config/filter/network/mongo_proxy/v3alpha/BUILD b/api/envoy/config/filter/network/mongo_proxy/v3alpha/BUILD index 67dca3bb139a..0ef883d1e76a 100644 --- a/api/envoy/config/filter/network/mongo_proxy/v3alpha/BUILD +++ b/api/envoy/config/filter/network/mongo_proxy/v3alpha/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/filter/fault/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "mongo_proxy", - srcs = ["mongo_proxy.proto"], - deps = ["//envoy/config/filter/fault/v3alpha:fault"], -) diff --git a/api/envoy/config/filter/network/mysql_proxy/v1alpha1/BUILD b/api/envoy/config/filter/network/mysql_proxy/v1alpha1/BUILD index 7f7da3af9276..5dc095ade27a 100644 --- a/api/envoy/config/filter/network/mysql_proxy/v1alpha1/BUILD +++ b/api/envoy/config/filter/network/mysql_proxy/v1alpha1/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "mysql_proxy", - srcs = ["mysql_proxy.proto"], -) diff --git a/api/envoy/config/filter/network/rate_limit/v2/BUILD b/api/envoy/config/filter/network/rate_limit/v2/BUILD index fcdcd0dfa5ef..577a073d6de2 100644 --- a/api/envoy/config/filter/network/rate_limit/v2/BUILD +++ b/api/envoy/config/filter/network/rate_limit/v2/BUILD @@ -1,4 +1,6 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 @@ -8,12 +10,3 @@ api_proto_package( "//envoy/config/ratelimit/v2:pkg", ], ) - -api_proto_library_internal( - name = "rate_limit", - srcs = ["rate_limit.proto"], - deps = [ - "//envoy/api/v2/ratelimit", - "//envoy/config/ratelimit/v2:rls", - ], -) diff --git a/api/envoy/config/filter/network/rate_limit/v3alpha/BUILD b/api/envoy/config/filter/network/rate_limit/v3alpha/BUILD index a13183b9eb75..7d49a9f51282 100644 --- a/api/envoy/config/filter/network/rate_limit/v3alpha/BUILD +++ b/api/envoy/config/filter/network/rate_limit/v3alpha/BUILD @@ -1,4 +1,6 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 @@ -8,12 +10,3 @@ api_proto_package( "//envoy/config/ratelimit/v3alpha:pkg", ], ) - -api_proto_library_internal( - name = "rate_limit", - srcs = ["rate_limit.proto"], - deps = [ - "//envoy/api/v3alpha/ratelimit", - "//envoy/config/ratelimit/v3alpha:rls", - ], -) diff --git a/api/envoy/config/filter/network/rbac/v2/BUILD b/api/envoy/config/filter/network/rbac/v2/BUILD index ca9aa2ca410c..f00321f47b09 100644 --- a/api/envoy/config/filter/network/rbac/v2/BUILD +++ b/api/envoy/config/filter/network/rbac/v2/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/rbac/v2:pkg"], ) - -api_proto_library_internal( - name = "rbac", - srcs = ["rbac.proto"], - deps = ["//envoy/config/rbac/v2:rbac"], -) diff --git a/api/envoy/config/filter/network/rbac/v3alpha/BUILD b/api/envoy/config/filter/network/rbac/v3alpha/BUILD index 1e4d51b50453..886af1e0d81b 100644 --- a/api/envoy/config/filter/network/rbac/v3alpha/BUILD +++ b/api/envoy/config/filter/network/rbac/v3alpha/BUILD @@ -1,13 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = ["//envoy/config/rbac/v3alpha:pkg"], ) - -api_proto_library_internal( - name = "rbac", - srcs = ["rbac.proto"], - deps = ["//envoy/config/rbac/v3alpha:rbac"], -) diff --git a/api/envoy/config/filter/network/redis_proxy/v2/BUILD b/api/envoy/config/filter/network/redis_proxy/v2/BUILD index d23450a55d1e..97eb16ccddad 100644 --- a/api/envoy/config/filter/network/redis_proxy/v2/BUILD +++ b/api/envoy/config/filter/network/redis_proxy/v2/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v2/core", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "redis_proxy", - srcs = ["redis_proxy.proto"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/type:percent", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/config/filter/network/redis_proxy/v3alpha/BUILD b/api/envoy/config/filter/network/redis_proxy/v3alpha/BUILD index 4db47e3bb664..4e89d949ab9d 100644 --- a/api/envoy/config/filter/network/redis_proxy/v3alpha/BUILD +++ b/api/envoy/config/filter/network/redis_proxy/v3alpha/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "redis_proxy", - srcs = ["redis_proxy.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/type:percent", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/config/filter/network/tcp_proxy/v2/BUILD b/api/envoy/config/filter/network/tcp_proxy/v2/BUILD index a0cc067086cc..824463e441ce 100644 --- a/api/envoy/config/filter/network/tcp_proxy/v2/BUILD +++ b/api/envoy/config/filter/network/tcp_proxy/v2/BUILD @@ -1,20 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", + "//envoy/api/v2/core:pkg", "//envoy/config/filter/accesslog/v2:pkg", ], ) - -api_proto_library_internal( - name = "tcp_proxy", - srcs = ["tcp_proxy.proto"], - deps = [ - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - "//envoy/config/filter/accesslog/v2:accesslog", - ], -) diff --git a/api/envoy/config/filter/network/tcp_proxy/v3alpha/BUILD b/api/envoy/config/filter/network/tcp_proxy/v3alpha/BUILD index 305e06bc8bfb..ba8540be455c 100644 --- a/api/envoy/config/filter/network/tcp_proxy/v3alpha/BUILD +++ b/api/envoy/config/filter/network/tcp_proxy/v3alpha/BUILD @@ -1,20 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/config/filter/accesslog/v3alpha:pkg", ], ) - -api_proto_library_internal( - name = "tcp_proxy", - srcs = ["tcp_proxy.proto"], - deps = [ - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - "//envoy/config/filter/accesslog/v3alpha:accesslog", - ], -) diff --git a/api/envoy/config/filter/network/thrift_proxy/v2alpha1/BUILD b/api/envoy/config/filter/network/thrift_proxy/v2alpha1/BUILD index 28a64a0a329e..16f7580fe7ee 100644 --- a/api/envoy/config/filter/network/thrift_proxy/v2alpha1/BUILD +++ b/api/envoy/config/filter/network/thrift_proxy/v2alpha1/BUILD @@ -1,22 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/route:pkg", ], ) - -api_proto_library_internal( - name = "thrift_proxy", - srcs = [ - "route.proto", - "thrift_proxy.proto", - ], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/route", - ], -) diff --git a/api/envoy/config/filter/network/thrift_proxy/v3alpha/BUILD b/api/envoy/config/filter/network/thrift_proxy/v3alpha/BUILD index 34a2c397ccb8..900a0545c66e 100644 --- a/api/envoy/config/filter/network/thrift_proxy/v3alpha/BUILD +++ b/api/envoy/config/filter/network/thrift_proxy/v3alpha/BUILD @@ -1,22 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/route:pkg", ], ) - -api_proto_library_internal( - name = "thrift_proxy", - srcs = [ - "route.proto", - "thrift_proxy.proto", - ], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/route", - ], -) diff --git a/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/BUILD b/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/BUILD index 02594c24b8ae..5dc095ade27a 100644 --- a/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/BUILD +++ b/api/envoy/config/filter/network/zookeeper_proxy/v1alpha1/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "zookeeper_proxy", - srcs = ["zookeeper_proxy.proto"], -) diff --git a/api/envoy/config/filter/thrift/rate_limit/v2alpha1/BUILD b/api/envoy/config/filter/thrift/rate_limit/v2alpha1/BUILD index fcdcd0dfa5ef..5d32e2ddd406 100644 --- a/api/envoy/config/filter/thrift/rate_limit/v2alpha1/BUILD +++ b/api/envoy/config/filter/thrift/rate_limit/v2alpha1/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v2/ratelimit:pkg", - "//envoy/config/ratelimit/v2:pkg", - ], -) - -api_proto_library_internal( - name = "rate_limit", - srcs = ["rate_limit.proto"], - deps = [ - "//envoy/api/v2/ratelimit", - "//envoy/config/ratelimit/v2:rls", - ], + deps = ["//envoy/config/ratelimit/v2:pkg"], ) diff --git a/api/envoy/config/filter/thrift/rate_limit/v3alpha/BUILD b/api/envoy/config/filter/thrift/rate_limit/v3alpha/BUILD index a13183b9eb75..bdfffc73a735 100644 --- a/api/envoy/config/filter/thrift/rate_limit/v3alpha/BUILD +++ b/api/envoy/config/filter/thrift/rate_limit/v3alpha/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = [ - "//envoy/api/v3alpha/ratelimit:pkg", - "//envoy/config/ratelimit/v3alpha:pkg", - ], -) - -api_proto_library_internal( - name = "rate_limit", - srcs = ["rate_limit.proto"], - deps = [ - "//envoy/api/v3alpha/ratelimit", - "//envoy/config/ratelimit/v3alpha:rls", - ], + deps = ["//envoy/config/ratelimit/v3alpha:pkg"], ) diff --git a/api/envoy/config/filter/thrift/router/v2alpha1/BUILD b/api/envoy/config/filter/thrift/router/v2alpha1/BUILD index 68bd8c126b80..5dc095ade27a 100644 --- a/api/envoy/config/filter/thrift/router/v2alpha1/BUILD +++ b/api/envoy/config/filter/thrift/router/v2alpha1/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "router", - srcs = ["router.proto"], -) diff --git a/api/envoy/config/filter/thrift/router/v3alpha/BUILD b/api/envoy/config/filter/thrift/router/v3alpha/BUILD index 68bd8c126b80..5dc095ade27a 100644 --- a/api/envoy/config/filter/thrift/router/v3alpha/BUILD +++ b/api/envoy/config/filter/thrift/router/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "router", - srcs = ["router.proto"], -) diff --git a/api/envoy/config/grpc_credential/v2alpha/BUILD b/api/envoy/config/grpc_credential/v2alpha/BUILD index 484aa5680d12..97eb16ccddad 100644 --- a/api/envoy/config/grpc_credential/v2alpha/BUILD +++ b/api/envoy/config/grpc_credential/v2alpha/BUILD @@ -1,18 +1,9 @@ -licenses(["notice"]) # Apache 2 - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -api_proto_package( - deps = ["//envoy/api/v2/core"], -) +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -api_proto_library_internal( - name = "file_based_metadata", - srcs = ["file_based_metadata.proto"], - deps = ["//envoy/api/v2/core:base"], -) +licenses(["notice"]) # Apache 2 -api_proto_library_internal( - name = "aws_iam", - srcs = ["aws_iam.proto"], +api_proto_package( + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/config/grpc_credential/v3alpha/BUILD b/api/envoy/config/grpc_credential/v3alpha/BUILD index 7c327f91f031..4e89d949ab9d 100644 --- a/api/envoy/config/grpc_credential/v3alpha/BUILD +++ b/api/envoy/config/grpc_credential/v3alpha/BUILD @@ -1,18 +1,9 @@ -licenses(["notice"]) # Apache 2 - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -api_proto_library_internal( - name = "file_based_metadata", - srcs = ["file_based_metadata.proto"], - deps = ["//envoy/api/v3alpha/core:base"], -) +licenses(["notice"]) # Apache 2 -api_proto_library_internal( - name = "aws_iam", - srcs = ["aws_iam.proto"], +api_proto_package( + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/config/health_checker/redis/v2/BUILD b/api/envoy/config/health_checker/redis/v2/BUILD index f7b289b08f69..5dc095ade27a 100644 --- a/api/envoy/config/health_checker/redis/v2/BUILD +++ b/api/envoy/config/health_checker/redis/v2/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "redis", - srcs = ["redis.proto"], -) diff --git a/api/envoy/config/health_checker/redis/v3alpha/BUILD b/api/envoy/config/health_checker/redis/v3alpha/BUILD index f7b289b08f69..5dc095ade27a 100644 --- a/api/envoy/config/health_checker/redis/v3alpha/BUILD +++ b/api/envoy/config/health_checker/redis/v3alpha/BUILD @@ -1,10 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "redis", - srcs = ["redis.proto"], -) diff --git a/api/envoy/config/listener/v2/BUILD b/api/envoy/config/listener/v2/BUILD index 031cd7ce37cd..5dc095ade27a 100644 --- a/api/envoy/config/listener/v2/BUILD +++ b/api/envoy/config/listener/v2/BUILD @@ -1,18 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -package_group( - name = "friends", - packages = [ - "//envoy/api/v2", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "api_listener", - srcs = ["api_listener.proto"], - visibility = [":friends"], -) diff --git a/api/envoy/config/listener/v3alpha/BUILD b/api/envoy/config/listener/v3alpha/BUILD index cd728ed17ad1..5dc095ade27a 100644 --- a/api/envoy/config/listener/v3alpha/BUILD +++ b/api/envoy/config/listener/v3alpha/BUILD @@ -1,18 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -package_group( - name = "friends", - packages = [ - "//envoy/api/v3alpha", - ], -) +licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "api_listener", - srcs = ["api_listener.proto"], - visibility = [":friends"], -) diff --git a/api/envoy/config/metrics/v2/BUILD b/api/envoy/config/metrics/v2/BUILD index 13ac8bdd9992..a0eac27f8a5d 100644 --- a/api/envoy/config/metrics/v2/BUILD +++ b/api/envoy/config/metrics/v2/BUILD @@ -1,33 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "metrics_service", - srcs = ["metrics_service.proto"], - visibility = [ - "//envoy/config/bootstrap/v2:__pkg__", - ], - deps = [ - "//envoy/api/v2/core:grpc_service", - ], -) - -api_proto_library_internal( - name = "stats", - srcs = ["stats.proto"], - visibility = [ - "//envoy/config/bootstrap/v2:__pkg__", - ], - deps = [ - "//envoy/api/v2/core:address", - "//envoy/type/matcher:string", + "//envoy/api/v2/core:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/metrics/v3alpha/BUILD b/api/envoy/config/metrics/v3alpha/BUILD index 399ec444208d..7a38e127e145 100644 --- a/api/envoy/config/metrics/v3alpha/BUILD +++ b/api/envoy/config/metrics/v3alpha/BUILD @@ -1,33 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type/matcher", - ], -) - -api_proto_library_internal( - name = "metrics_service", - srcs = ["metrics_service.proto"], - visibility = [ - "//envoy/config/bootstrap/v3alpha:__pkg__", - ], - deps = [ - "//envoy/api/v3alpha/core:grpc_service", - ], -) - -api_proto_library_internal( - name = "stats", - srcs = ["stats.proto"], - visibility = [ - "//envoy/config/bootstrap/v3alpha:__pkg__", - ], - deps = [ - "//envoy/api/v3alpha/core:address", - "//envoy/type/matcher:string", + "//envoy/api/v3alpha/core:pkg", + "//envoy/type/matcher:pkg", ], ) diff --git a/api/envoy/config/overload/v2alpha/BUILD b/api/envoy/config/overload/v2alpha/BUILD index e247848d07a9..5dc095ade27a 100644 --- a/api/envoy/config/overload/v2alpha/BUILD +++ b/api/envoy/config/overload/v2alpha/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "overload", - srcs = ["overload.proto"], - visibility = ["//visibility:public"], -) diff --git a/api/envoy/config/overload/v3alpha/BUILD b/api/envoy/config/overload/v3alpha/BUILD index e247848d07a9..5dc095ade27a 100644 --- a/api/envoy/config/overload/v3alpha/BUILD +++ b/api/envoy/config/overload/v3alpha/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "overload", - srcs = ["overload.proto"], - visibility = ["//visibility:public"], -) diff --git a/api/envoy/config/ratelimit/v2/BUILD b/api/envoy/config/ratelimit/v2/BUILD index 432f4b9592d3..97eb16ccddad 100644 --- a/api/envoy/config/ratelimit/v2/BUILD +++ b/api/envoy/config/ratelimit/v2/BUILD @@ -1,16 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library_internal( - name = "rls", - srcs = ["rls.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2/core:grpc_service", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/config/ratelimit/v3alpha/BUILD b/api/envoy/config/ratelimit/v3alpha/BUILD index 1d009164ba64..4e89d949ab9d 100644 --- a/api/envoy/config/ratelimit/v3alpha/BUILD +++ b/api/envoy/config/ratelimit/v3alpha/BUILD @@ -1,16 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library_internal( - name = "rls", - srcs = ["rls.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha/core:grpc_service", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/config/rbac/v2/BUILD b/api/envoy/config/rbac/v2/BUILD index 18b1bb24f29d..064f8f79e0b8 100644 --- a/api/envoy/config/rbac/v2/BUILD +++ b/api/envoy/config/rbac/v2/BUILD @@ -1,33 +1,14 @@ -licenses(["notice"]) # Apache 2 +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/route:pkg", - "//envoy/type/matcher", + "//envoy/type/matcher:pkg", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", ], ) - -api_proto_library_internal( - name = "rbac", - srcs = ["rbac.proto"], - external_cc_proto_deps = [ - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto", - ], - external_proto_deps = [ - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", - ], - external_py_proto_deps = [ - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_py_proto", - ], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2/core:address", - "//envoy/api/v2/route", - "//envoy/type/matcher:metadata", - "//envoy/type/matcher:string", - ], -) diff --git a/api/envoy/config/rbac/v3alpha/BUILD b/api/envoy/config/rbac/v3alpha/BUILD index 60200f034ea1..0e2a74f74b4c 100644 --- a/api/envoy/config/rbac/v3alpha/BUILD +++ b/api/envoy/config/rbac/v3alpha/BUILD @@ -1,33 +1,14 @@ -licenses(["notice"]) # Apache 2 +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/route:pkg", - "//envoy/type/matcher", + "//envoy/type/matcher:pkg", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", ], ) - -api_proto_library_internal( - name = "rbac", - srcs = ["rbac.proto"], - external_cc_proto_deps = [ - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_cc_proto", - ], - external_proto_deps = [ - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", - ], - external_py_proto_deps = [ - "@com_google_googleapis//google/api/expr/v1alpha1:syntax_py_proto", - ], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/route", - "//envoy/type/matcher:metadata", - "//envoy/type/matcher:string", - ], -) diff --git a/api/envoy/config/resource_monitor/fixed_heap/v2alpha/BUILD b/api/envoy/config/resource_monitor/fixed_heap/v2alpha/BUILD index a5003e219c8a..5dc095ade27a 100644 --- a/api/envoy/config/resource_monitor/fixed_heap/v2alpha/BUILD +++ b/api/envoy/config/resource_monitor/fixed_heap/v2alpha/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "fixed_heap", - srcs = ["fixed_heap.proto"], - visibility = ["//visibility:public"], -) diff --git a/api/envoy/config/resource_monitor/fixed_heap/v3alpha/BUILD b/api/envoy/config/resource_monitor/fixed_heap/v3alpha/BUILD index a5003e219c8a..5dc095ade27a 100644 --- a/api/envoy/config/resource_monitor/fixed_heap/v3alpha/BUILD +++ b/api/envoy/config/resource_monitor/fixed_heap/v3alpha/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "fixed_heap", - srcs = ["fixed_heap.proto"], - visibility = ["//visibility:public"], -) diff --git a/api/envoy/config/resource_monitor/injected_resource/v2alpha/BUILD b/api/envoy/config/resource_monitor/injected_resource/v2alpha/BUILD index 3a1764216b00..5dc095ade27a 100644 --- a/api/envoy/config/resource_monitor/injected_resource/v2alpha/BUILD +++ b/api/envoy/config/resource_monitor/injected_resource/v2alpha/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "injected_resource", - srcs = ["injected_resource.proto"], - visibility = ["//visibility:public"], -) diff --git a/api/envoy/config/resource_monitor/injected_resource/v3alpha/BUILD b/api/envoy/config/resource_monitor/injected_resource/v3alpha/BUILD index 3a1764216b00..5dc095ade27a 100644 --- a/api/envoy/config/resource_monitor/injected_resource/v3alpha/BUILD +++ b/api/envoy/config/resource_monitor/injected_resource/v3alpha/BUILD @@ -1,11 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library_internal( - name = "injected_resource", - srcs = ["injected_resource.proto"], - visibility = ["//visibility:public"], -) diff --git a/api/envoy/config/retry/previous_priorities/BUILD b/api/envoy/config/retry/previous_priorities/BUILD index 8140346d4747..5dc095ade27a 100644 --- a/api/envoy/config/retry/previous_priorities/BUILD +++ b/api/envoy/config/retry/previous_priorities/BUILD @@ -1,15 +1,7 @@ -licenses(["notice"]) # Apache 2 +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -api_proto_package( - deps = ["//envoy/api/v2/core"], -) +licenses(["notice"]) # Apache 2 -api_proto_library_internal( - name = "previous_priorities", - srcs = ["previous_priorities_config.proto"], - deps = [ - "//envoy/api/v2/core:base", - ], -) +api_proto_package() diff --git a/api/envoy/config/trace/v2/BUILD b/api/envoy/config/trace/v2/BUILD index f894a5289fd5..7b8bb5b1abf8 100644 --- a/api/envoy/config/trace/v2/BUILD +++ b/api/envoy/config/trace/v2/BUILD @@ -1,22 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", - "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto", - ], -) - -api_proto_library_internal( - name = "trace", - srcs = ["trace.proto"], - visibility = [ - "//envoy/config/bootstrap/v2:__pkg__", - ], - deps = [ - "//envoy/api/v2/core:grpc_service", + "//envoy/api/v2/core:pkg", "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto", ], ) diff --git a/api/envoy/config/trace/v3alpha/BUILD b/api/envoy/config/trace/v3alpha/BUILD index 97014ca68f6f..6fb1ebd57dbc 100644 --- a/api/envoy/config/trace/v3alpha/BUILD +++ b/api/envoy/config/trace/v3alpha/BUILD @@ -1,22 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", - "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto", - ], -) - -api_proto_library_internal( - name = "trace", - srcs = ["trace.proto"], - visibility = [ - "//envoy/config/bootstrap/v3alpha:__pkg__", - ], - deps = [ - "//envoy/api/v3alpha/core:grpc_service", + "//envoy/api/v3alpha/core:pkg", "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto", ], ) diff --git a/api/envoy/config/transport_socket/alts/v2alpha/BUILD b/api/envoy/config/transport_socket/alts/v2alpha/BUILD index eb247ae14b04..5dc095ade27a 100644 --- a/api/envoy/config/transport_socket/alts/v2alpha/BUILD +++ b/api/envoy/config/transport_socket/alts/v2alpha/BUILD @@ -1,15 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -api_proto_package( - deps = ["//envoy/api/v2/core"], -) +licenses(["notice"]) # Apache 2 -api_proto_library( - name = "alts", - srcs = ["alts.proto"], - deps = [ - "//envoy/api/v2/core:base", - ], -) +api_proto_package() diff --git a/api/envoy/config/transport_socket/alts/v3alpha/BUILD b/api/envoy/config/transport_socket/alts/v3alpha/BUILD index 4e6642283e3a..5dc095ade27a 100644 --- a/api/envoy/config/transport_socket/alts/v3alpha/BUILD +++ b/api/envoy/config/transport_socket/alts/v3alpha/BUILD @@ -1,15 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) +licenses(["notice"]) # Apache 2 -api_proto_library( - name = "alts", - srcs = ["alts.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - ], -) +api_proto_package() diff --git a/api/envoy/config/transport_socket/tap/v2alpha/BUILD b/api/envoy/config/transport_socket/tap/v2alpha/BUILD index e18d4fc1c128..ced8abbaf968 100644 --- a/api/envoy/config/transport_socket/tap/v2alpha/BUILD +++ b/api/envoy/config/transport_socket/tap/v2alpha/BUILD @@ -1,19 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v2/core", + "//envoy/api/v2/core:pkg", "//envoy/config/common/tap/v2alpha:pkg", ], ) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/config/common/tap/v2alpha:common", - ], -) diff --git a/api/envoy/config/transport_socket/tap/v3alpha/BUILD b/api/envoy/config/transport_socket/tap/v3alpha/BUILD index 0f24cca4c1a1..e582af3881c0 100644 --- a/api/envoy/config/transport_socket/tap/v3alpha/BUILD +++ b/api/envoy/config/transport_socket/tap/v3alpha/BUILD @@ -1,19 +1,12 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/config/common/tap/v3alpha:pkg", ], ) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/config/common/tap/v3alpha:common", - ], -) diff --git a/api/envoy/data/accesslog/v2/BUILD b/api/envoy/data/accesslog/v2/BUILD index 22c4c45ee847..97eb16ccddad 100644 --- a/api/envoy/data/accesslog/v2/BUILD +++ b/api/envoy/data/accesslog/v2/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library_internal( - name = "accesslog", - srcs = ["accesslog.proto"], - visibility = [ - "//envoy/service/accesslog/v2:__pkg__", - ], - deps = [ - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/data/accesslog/v3alpha/BUILD b/api/envoy/data/accesslog/v3alpha/BUILD index e1fafc00343b..4e89d949ab9d 100644 --- a/api/envoy/data/accesslog/v3alpha/BUILD +++ b/api/envoy/data/accesslog/v3alpha/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library_internal( - name = "accesslog", - srcs = ["accesslog.proto"], - visibility = [ - "//envoy/service/accesslog/v3alpha:__pkg__", - ], - deps = [ - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/data/cluster/v2alpha/BUILD b/api/envoy/data/cluster/v2alpha/BUILD index 4d921f4d97ac..5dc095ade27a 100644 --- a/api/envoy/data/cluster/v2alpha/BUILD +++ b/api/envoy/data/cluster/v2alpha/BUILD @@ -1,13 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library( - name = "outlier_detection_event", - srcs = ["outlier_detection_event.proto"], - visibility = [ - "//visibility:public", - ], -) diff --git a/api/envoy/data/cluster/v3alpha/BUILD b/api/envoy/data/cluster/v3alpha/BUILD index 4d921f4d97ac..5dc095ade27a 100644 --- a/api/envoy/data/cluster/v3alpha/BUILD +++ b/api/envoy/data/cluster/v3alpha/BUILD @@ -1,13 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package() - -api_proto_library( - name = "outlier_detection_event", - srcs = ["outlier_detection_event.proto"], - visibility = [ - "//visibility:public", - ], -) diff --git a/api/envoy/data/core/v2alpha/BUILD b/api/envoy/data/core/v2alpha/BUILD index 331032348388..97eb16ccddad 100644 --- a/api/envoy/data/core/v2alpha/BUILD +++ b/api/envoy/data/core/v2alpha/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library( - name = "health_check_event", - srcs = ["health_check_event.proto"], - visibility = [ - "//visibility:public", - ], - deps = [ - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/data/core/v3alpha/BUILD b/api/envoy/data/core/v3alpha/BUILD index 6c44f3e4d79e..4e89d949ab9d 100644 --- a/api/envoy/data/core/v3alpha/BUILD +++ b/api/envoy/data/core/v3alpha/BUILD @@ -1,19 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library( - name = "health_check_event", - srcs = ["health_check_event.proto"], - visibility = [ - "//visibility:public", - ], - deps = [ - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/data/tap/v2alpha/BUILD b/api/envoy/data/tap/v2alpha/BUILD index bf108c4792a1..97eb16ccddad 100644 --- a/api/envoy/data/tap/v2alpha/BUILD +++ b/api/envoy/data/tap/v2alpha/BUILD @@ -1,41 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core"], -) - -api_proto_library_internal( - name = "common", - srcs = ["common.proto"], -) - -api_proto_library_internal( - name = "transport", - srcs = ["transport.proto"], - deps = [ - ":common", - "//envoy/api/v2/core:address", - ], -) - -api_proto_library_internal( - name = "http", - srcs = ["http.proto"], - deps = [ - ":common", - "//envoy/api/v2/core:base", - ], -) - -api_proto_library_internal( - name = "wrapper", - srcs = ["wrapper.proto"], - visibility = ["//visibility:public"], - deps = [ - ":http", - ":transport", - "//envoy/api/v2/core:address", - ], + deps = ["//envoy/api/v2/core:pkg"], ) diff --git a/api/envoy/data/tap/v3alpha/BUILD b/api/envoy/data/tap/v3alpha/BUILD index 33d151e333a9..4e89d949ab9d 100644 --- a/api/envoy/data/tap/v3alpha/BUILD +++ b/api/envoy/data/tap/v3alpha/BUILD @@ -1,41 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core"], -) - -api_proto_library_internal( - name = "common", - srcs = ["common.proto"], -) - -api_proto_library_internal( - name = "transport", - srcs = ["transport.proto"], - deps = [ - ":common", - "//envoy/api/v3alpha/core:address", - ], -) - -api_proto_library_internal( - name = "http", - srcs = ["http.proto"], - deps = [ - ":common", - "//envoy/api/v3alpha/core:base", - ], -) - -api_proto_library_internal( - name = "wrapper", - srcs = ["wrapper.proto"], - visibility = ["//visibility:public"], - deps = [ - ":http", - ":transport", - "//envoy/api/v3alpha/core:address", - ], + deps = ["//envoy/api/v3alpha/core:pkg"], ) diff --git a/api/envoy/service/accesslog/v2/BUILD b/api/envoy/service/accesslog/v2/BUILD index d4f7c300361e..b25083a6222f 100644 --- a/api/envoy/service/accesslog/v2/BUILD +++ b/api/envoy/service/accesslog/v2/BUILD @@ -1,22 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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/core", + "//envoy/api/v2/core:pkg", "//envoy/data/accesslog/v2:pkg", ], ) - -api_proto_library_internal( - name = "als", - srcs = ["als.proto"], - has_services = 1, - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:grpc_service", - "//envoy/data/accesslog/v2:accesslog", - ], -) diff --git a/api/envoy/service/accesslog/v3alpha/BUILD b/api/envoy/service/accesslog/v3alpha/BUILD index 0bb8716b82ab..7a7083bcbd5c 100644 --- a/api/envoy/service/accesslog/v3alpha/BUILD +++ b/api/envoy/service/accesslog/v3alpha/BUILD @@ -1,22 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/data/accesslog/v3alpha:pkg", ], ) - -api_proto_library_internal( - name = "als", - srcs = ["als.proto"], - has_services = 1, - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:grpc_service", - "//envoy/data/accesslog/v3alpha:accesslog", - ], -) diff --git a/api/envoy/service/auth/v2/BUILD b/api/envoy/service/auth/v2/BUILD index 91a4eeebbf13..80ff3abc0c3b 100644 --- a/api/envoy/service/auth/v2/BUILD +++ b/api/envoy/service/auth/v2/BUILD @@ -1,36 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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/core", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "attribute_context", - srcs = [ - "attribute_context.proto", - ], - deps = [ - "//envoy/api/v2/core:address", - "//envoy/api/v2/core:base", - ], -) - -api_proto_library_internal( - name = "external_auth", - srcs = [ - "external_auth.proto", - ], - has_services = 1, - visibility = ["//visibility:public"], - deps = [ - ":attribute_context", - "//envoy/api/v2/core:base", - "//envoy/type:http_status", + "//envoy/api/v2/core:pkg", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/service/auth/v2alpha/BUILD b/api/envoy/service/auth/v2alpha/BUILD index 1940f4f2f885..bbf5838b4962 100644 --- a/api/envoy/service/auth/v2alpha/BUILD +++ b/api/envoy/service/auth/v2alpha/BUILD @@ -1,19 +1,10 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, - deps = [ - "//envoy/service/auth/v2:pkg", - ], -) - -api_proto_library_internal( - name = "external_auth", - srcs = [ - "external_auth.proto", - ], - has_services = 1, - deps = ["//envoy/service/auth/v2:external_auth"], + deps = ["//envoy/service/auth/v2:pkg"], ) diff --git a/api/envoy/service/auth/v3alpha/BUILD b/api/envoy/service/auth/v3alpha/BUILD index f6a70cb5b9bd..c8358f4c9484 100644 --- a/api/envoy/service/auth/v3alpha/BUILD +++ b/api/envoy/service/auth/v3alpha/BUILD @@ -1,36 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha/core", - "//envoy/type", - ], -) - -api_proto_library_internal( - name = "attribute_context", - srcs = [ - "attribute_context.proto", - ], - deps = [ - "//envoy/api/v3alpha/core:address", - "//envoy/api/v3alpha/core:base", - ], -) - -api_proto_library_internal( - name = "external_auth", - srcs = [ - "external_auth.proto", - ], - has_services = 1, - visibility = ["//visibility:public"], - deps = [ - ":attribute_context", - "//envoy/api/v3alpha/core:base", - "//envoy/type:http_status", + "//envoy/api/v3alpha/core:pkg", + "//envoy/type:pkg", ], ) diff --git a/api/envoy/service/discovery/v2/BUILD b/api/envoy/service/discovery/v2/BUILD index 13db2701c2a5..99f581d43cb0 100644 --- a/api/envoy/service/discovery/v2/BUILD +++ b/api/envoy/service/discovery/v2/BUILD @@ -1,50 +1,14 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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", - "//envoy/api/v2/core", + "//envoy/api/v2:pkg", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/endpoint:pkg", ], ) - -api_proto_library_internal( - name = "ads", - srcs = ["ads.proto"], - has_services = 1, - deps = [ - "//envoy/api/v2:discovery", - ], -) - -api_proto_library_internal( - name = "hds", - srcs = ["hds.proto"], - has_services = 1, - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:health_check", - "//envoy/api/v2/endpoint", - ], -) - -api_proto_library_internal( - name = "sds", - srcs = ["sds.proto"], - has_services = 1, - deps = [ - "//envoy/api/v2:discovery", - ], -) - -api_proto_library_internal( - name = "rtds", - srcs = ["rtds.proto"], - has_services = 1, - deps = [ - "//envoy/api/v2:discovery", - ], -) diff --git a/api/envoy/service/discovery/v2/hds.proto b/api/envoy/service/discovery/v2/hds.proto index d1136831229d..fe96f06a8977 100644 --- a/api/envoy/service/discovery/v2/hds.proto +++ b/api/envoy/service/discovery/v2/hds.proto @@ -5,7 +5,6 @@ package envoy.service.discovery.v2; option java_outer_classname = "HdsProto"; option java_multiple_files = true; option java_package = "io.envoyproxy.envoy.service.discovery.v2"; - option java_generic_services = true; import "envoy/api/v2/core/base.proto"; @@ -80,17 +79,20 @@ message Capability { TCP = 1; REDIS = 2; } + repeated Protocol health_check_protocols = 1; } message HealthCheckRequest { - envoy.api.v2.core.Node node = 1; + api.v2.core.Node node = 1; + Capability capability = 2; } message EndpointHealth { - envoy.api.v2.endpoint.Endpoint endpoint = 1; - envoy.api.v2.core.HealthStatus health_status = 2; + api.v2.endpoint.Endpoint endpoint = 1; + + api.v2.core.HealthStatus health_status = 2; } message EndpointHealthResponse { @@ -100,13 +102,15 @@ message EndpointHealthResponse { message HealthCheckRequestOrEndpointHealthResponse { oneof request_type { HealthCheckRequest health_check_request = 1; + EndpointHealthResponse endpoint_health_response = 2; } } message LocalityEndpoints { - envoy.api.v2.core.Locality locality = 1; - repeated envoy.api.v2.endpoint.Endpoint endpoints = 2; + api.v2.core.Locality locality = 1; + + repeated api.v2.endpoint.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it @@ -115,12 +119,15 @@ message LocalityEndpoints { // same cluster structure as that provided by EDS. message ClusterHealthCheck { string cluster_name = 1; - repeated envoy.api.v2.core.HealthCheck health_checks = 2; + + repeated api.v2.core.HealthCheck health_checks = 2; + repeated LocalityEndpoints locality_endpoints = 3; } message HealthCheckSpecifier { repeated ClusterHealthCheck cluster_health_checks = 1; + // The default is 1 second. google.protobuf.Duration interval = 2; } diff --git a/api/envoy/service/discovery/v2/sds.proto b/api/envoy/service/discovery/v2/sds.proto index 7e9ae261a369..3a61947ed2bb 100644 --- a/api/envoy/service/discovery/v2/sds.proto +++ b/api/envoy/service/discovery/v2/sds.proto @@ -5,29 +5,29 @@ package envoy.service.discovery.v2; option java_outer_classname = "SdsProto"; option java_multiple_files = true; option java_package = "io.envoyproxy.envoy.service.discovery.v2"; +option java_generic_services = true; import "envoy/api/v2/discovery.proto"; import "google/api/annotations.proto"; -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message SdsDummy { -} - service SecretDiscoveryService { - rpc DeltaSecrets(stream envoy.api.v2.DeltaDiscoveryRequest) - returns (stream envoy.api.v2.DeltaDiscoveryResponse) { + rpc DeltaSecrets(stream api.v2.DeltaDiscoveryRequest) + returns (stream api.v2.DeltaDiscoveryResponse) { } - rpc StreamSecrets(stream envoy.api.v2.DiscoveryRequest) - returns (stream envoy.api.v2.DiscoveryResponse) { + rpc StreamSecrets(stream api.v2.DiscoveryRequest) returns (stream api.v2.DiscoveryResponse) { } - rpc FetchSecrets(envoy.api.v2.DiscoveryRequest) returns (envoy.api.v2.DiscoveryResponse) { + rpc FetchSecrets(api.v2.DiscoveryRequest) returns (api.v2.DiscoveryResponse) { option (google.api.http) = { post: "/v2/discovery:secrets" body: "*" }; } } + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 +message SdsDummy { +} diff --git a/api/envoy/service/discovery/v3alpha/BUILD b/api/envoy/service/discovery/v3alpha/BUILD index 138186e6ea05..1e8e081ae295 100644 --- a/api/envoy/service/discovery/v3alpha/BUILD +++ b/api/envoy/service/discovery/v3alpha/BUILD @@ -1,50 +1,14 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha", - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha:pkg", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/endpoint:pkg", ], ) - -api_proto_library_internal( - name = "ads", - srcs = ["ads.proto"], - has_services = 1, - deps = [ - "//envoy/api/v3alpha:discovery", - ], -) - -api_proto_library_internal( - name = "hds", - srcs = ["hds.proto"], - has_services = 1, - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:health_check", - "//envoy/api/v3alpha/endpoint", - ], -) - -api_proto_library_internal( - name = "sds", - srcs = ["sds.proto"], - has_services = 1, - deps = [ - "//envoy/api/v3alpha:discovery", - ], -) - -api_proto_library_internal( - name = "rtds", - srcs = ["rtds.proto"], - has_services = 1, - deps = [ - "//envoy/api/v3alpha:discovery", - ], -) diff --git a/api/envoy/service/discovery/v3alpha/hds.proto b/api/envoy/service/discovery/v3alpha/hds.proto index 31c0cc77d588..242ae6f36b5f 100644 --- a/api/envoy/service/discovery/v3alpha/hds.proto +++ b/api/envoy/service/discovery/v3alpha/hds.proto @@ -5,7 +5,6 @@ package envoy.service.discovery.v3alpha; option java_outer_classname = "HdsProto"; option java_multiple_files = true; option java_package = "io.envoyproxy.envoy.service.discovery.v3alpha"; - option java_generic_services = true; import "envoy/api/v3alpha/core/base.proto"; @@ -80,17 +79,20 @@ message Capability { TCP = 1; REDIS = 2; } + repeated Protocol health_check_protocols = 1; } message HealthCheckRequest { - envoy.api.v3alpha.core.Node node = 1; + api.v3alpha.core.Node node = 1; + Capability capability = 2; } message EndpointHealth { - envoy.api.v3alpha.endpoint.Endpoint endpoint = 1; - envoy.api.v3alpha.core.HealthStatus health_status = 2; + api.v3alpha.endpoint.Endpoint endpoint = 1; + + api.v3alpha.core.HealthStatus health_status = 2; } message EndpointHealthResponse { @@ -100,13 +102,15 @@ message EndpointHealthResponse { message HealthCheckRequestOrEndpointHealthResponse { oneof request_type { HealthCheckRequest health_check_request = 1; + EndpointHealthResponse endpoint_health_response = 2; } } message LocalityEndpoints { - envoy.api.v3alpha.core.Locality locality = 1; - repeated envoy.api.v3alpha.endpoint.Endpoint endpoints = 2; + api.v3alpha.core.Locality locality = 1; + + repeated api.v3alpha.endpoint.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it @@ -115,12 +119,15 @@ message LocalityEndpoints { // same cluster structure as that provided by EDS. message ClusterHealthCheck { string cluster_name = 1; - repeated envoy.api.v3alpha.core.HealthCheck health_checks = 2; + + repeated api.v3alpha.core.HealthCheck health_checks = 2; + repeated LocalityEndpoints locality_endpoints = 3; } message HealthCheckSpecifier { repeated ClusterHealthCheck cluster_health_checks = 1; + // The default is 1 second. google.protobuf.Duration interval = 2; } diff --git a/api/envoy/service/discovery/v3alpha/sds.proto b/api/envoy/service/discovery/v3alpha/sds.proto index 814edd07196d..df3dee17d867 100644 --- a/api/envoy/service/discovery/v3alpha/sds.proto +++ b/api/envoy/service/discovery/v3alpha/sds.proto @@ -5,30 +5,30 @@ package envoy.service.discovery.v3alpha; option java_outer_classname = "SdsProto"; option java_multiple_files = true; option java_package = "io.envoyproxy.envoy.service.discovery.v3alpha"; +option java_generic_services = true; import "envoy/api/v3alpha/discovery.proto"; import "google/api/annotations.proto"; -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message SdsDummy { -} - service SecretDiscoveryService { - rpc DeltaSecrets(stream envoy.api.v3alpha.DeltaDiscoveryRequest) - returns (stream envoy.api.v3alpha.DeltaDiscoveryResponse) { + rpc DeltaSecrets(stream api.v3alpha.DeltaDiscoveryRequest) + returns (stream api.v3alpha.DeltaDiscoveryResponse) { } - rpc StreamSecrets(stream envoy.api.v3alpha.DiscoveryRequest) - returns (stream envoy.api.v3alpha.DiscoveryResponse) { + rpc StreamSecrets(stream api.v3alpha.DiscoveryRequest) + returns (stream api.v3alpha.DiscoveryResponse) { } - rpc FetchSecrets(envoy.api.v3alpha.DiscoveryRequest) - returns (envoy.api.v3alpha.DiscoveryResponse) { + rpc FetchSecrets(api.v3alpha.DiscoveryRequest) returns (api.v3alpha.DiscoveryResponse) { option (google.api.http) = { post: "/v3alpha/discovery:secrets" body: "*" }; } } + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 +message SdsDummy { +} diff --git a/api/envoy/service/load_stats/v2/BUILD b/api/envoy/service/load_stats/v2/BUILD index af07d8aa101c..e58fe9bd9a3f 100644 --- a/api/envoy/service/load_stats/v2/BUILD +++ b/api/envoy/service/load_stats/v2/BUILD @@ -1,21 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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/core", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/endpoint:pkg", ], ) - -api_proto_library_internal( - name = "lrs", - srcs = ["lrs.proto"], - has_services = 1, - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/endpoint:load_report", - ], -) diff --git a/api/envoy/service/load_stats/v3alpha/BUILD b/api/envoy/service/load_stats/v3alpha/BUILD index bc4ff2642c6d..826dda1511e6 100644 --- a/api/envoy/service/load_stats/v3alpha/BUILD +++ b/api/envoy/service/load_stats/v3alpha/BUILD @@ -1,21 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/endpoint:pkg", ], ) - -api_proto_library_internal( - name = "lrs", - srcs = ["lrs.proto"], - has_services = 1, - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/endpoint:load_report", - ], -) diff --git a/api/envoy/service/metrics/v2/BUILD b/api/envoy/service/metrics/v2/BUILD index b2ff6a4cdac1..be8920efa9a0 100644 --- a/api/envoy/service/metrics/v2/BUILD +++ b/api/envoy/service/metrics/v2/BUILD @@ -1,23 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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/core", - "@prometheus_metrics_model//:client_model", - ], -) - -api_proto_library_internal( - name = "metrics_service", - srcs = ["metrics_service.proto"], - has_services = 0, - require_py = 0, - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:grpc_service", + "//envoy/api/v2/core:pkg", "@prometheus_metrics_model//:client_model", ], ) diff --git a/api/envoy/service/metrics/v3alpha/BUILD b/api/envoy/service/metrics/v3alpha/BUILD index 2a4076611e5b..1ea4f2b0b07b 100644 --- a/api/envoy/service/metrics/v3alpha/BUILD +++ b/api/envoy/service/metrics/v3alpha/BUILD @@ -1,23 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha/core", - "@prometheus_metrics_model//:client_model", - ], -) - -api_proto_library_internal( - name = "metrics_service", - srcs = ["metrics_service.proto"], - has_services = 0, - require_py = 0, - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:grpc_service", + "//envoy/api/v3alpha/core:pkg", "@prometheus_metrics_model//:client_model", ], ) diff --git a/api/envoy/service/ratelimit/v2/BUILD b/api/envoy/service/ratelimit/v2/BUILD index 7bc5db7113e7..206e27296172 100644 --- a/api/envoy/service/ratelimit/v2/BUILD +++ b/api/envoy/service/ratelimit/v2/BUILD @@ -1,22 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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/core", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/ratelimit:pkg", ], ) - -api_proto_library_internal( - name = "rls", - srcs = ["rls.proto"], - has_services = 1, - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:grpc_service", - "//envoy/api/v2/ratelimit", - ], -) diff --git a/api/envoy/service/ratelimit/v3alpha/BUILD b/api/envoy/service/ratelimit/v3alpha/BUILD index 965458beaec6..054af9a28b5b 100644 --- a/api/envoy/service/ratelimit/v3alpha/BUILD +++ b/api/envoy/service/ratelimit/v3alpha/BUILD @@ -1,22 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/ratelimit:pkg", ], ) - -api_proto_library_internal( - name = "rls", - srcs = ["rls.proto"], - has_services = 1, - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:grpc_service", - "//envoy/api/v3alpha/ratelimit", - ], -) diff --git a/api/envoy/service/tap/v2alpha/BUILD b/api/envoy/service/tap/v2alpha/BUILD index 621bf208d495..73a7e5d93096 100644 --- a/api/envoy/service/tap/v2alpha/BUILD +++ b/api/envoy/service/tap/v2alpha/BUILD @@ -1,46 +1,15 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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", - "//envoy/api/v2/core", + "//envoy/api/v2:pkg", + "//envoy/api/v2/core:pkg", "//envoy/api/v2/route:pkg", "//envoy/data/tap/v2alpha:pkg", ], ) - -api_proto_library_internal( - name = "common", - srcs = ["common.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2/core:base", - "//envoy/api/v2/core:grpc_service", - "//envoy/api/v2/route", - ], -) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2:discovery", - "//envoy/api/v2/core:base", - "//envoy/data/tap/v2alpha:wrapper", - ], -) - -api_proto_library_internal( - name = "tapds", - srcs = ["tapds.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v2:discovery", - "//envoy/api/v2/core:base", - "//envoy/service/tap/v2alpha:common", - ], -) diff --git a/api/envoy/service/tap/v2alpha/tap.proto b/api/envoy/service/tap/v2alpha/tap.proto index 9dccbb314bab..8294f254d224 100644 --- a/api/envoy/service/tap/v2alpha/tap.proto +++ b/api/envoy/service/tap/v2alpha/tap.proto @@ -1,24 +1,36 @@ syntax = "proto3"; -import "envoy/api/v2/core/base.proto"; -import "envoy/data/tap/v2alpha/wrapper.proto"; - package envoy.service.tap.v2alpha; -import "validate/validate.proto"; - option java_outer_classname = "TapProto"; option java_multiple_files = true; option java_package = "io.envoyproxy.envoy.service.tap.v2alpha"; +option java_generic_services = true; + +import "envoy/api/v2/core/base.proto"; +import "envoy/data/tap/v2alpha/wrapper.proto"; + +import "validate/validate.proto"; // [#protodoc-title: Tap Sink Service] +// [#not-implemented-hide:] A tap service to receive incoming taps. Envoy will call +// StreamTaps to deliver captured taps to the server +service TapSinkService { + // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. The server should + // disconnect if it expects Envoy to reconnect. + rpc StreamTaps(stream StreamTapsRequest) returns (StreamTapsResponse) { + } +} + // [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server // and stream taps without ever expecting a response. message StreamTapsRequest { message Identifier { // The node sending taps over the stream. - envoy.api.v2.core.Node node = 1 [(validate.rules).message.required = true]; + api.v2.core.Node node = 1 [(validate.rules).message = {required: true}]; + // The opaque identifier that was set in the :ref:`output config // `. string tap_id = 2; @@ -27,24 +39,15 @@ message StreamTapsRequest { // Identifier data effectively is a structured metadata. As a performance optimization this will // only be sent in the first message on the stream. Identifier identifier = 1; + // The trace id. this can be used to merge together a streaming trace. Note that the trace_id // is not guaranteed to be spatially or temporally unique. uint64 trace_id = 2; + // The trace data. - envoy.data.tap.v2alpha.TraceWrapper trace = 3; + data.tap.v2alpha.TraceWrapper trace = 3; } // [#not-implemented-hide:] message StreamTapsResponse { } - -// [#not-implemented-hide:] A tap service to receive incoming taps. Envoy will call -// StreamTaps to deliver captured taps to the server -service TapSinkService { - - // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. - rpc StreamTaps(stream StreamTapsRequest) returns (StreamTapsResponse) { - } -} \ No newline at end of file diff --git a/api/envoy/service/tap/v2alpha/tapds.proto b/api/envoy/service/tap/v2alpha/tapds.proto index 2f61074ca131..246d9d17ae2d 100644 --- a/api/envoy/service/tap/v2alpha/tapds.proto +++ b/api/envoy/service/tap/v2alpha/tapds.proto @@ -1,30 +1,31 @@ syntax = "proto3"; +package envoy.service.tap.v2alpha; + +option java_outer_classname = "TapdsProto"; +option java_multiple_files = true; +option java_package = "io.envoyproxy.envoy.service.tap.v2alpha"; +option java_generic_services = true; + import "envoy/api/v2/discovery.proto"; import "envoy/service/tap/v2alpha/common.proto"; -import "validate/validate.proto"; - -package envoy.service.tap.v2alpha; import "google/api/annotations.proto"; -option java_outer_classname = "TapDsProto"; -option java_multiple_files = true; -option java_package = "io.envoyproxy.envoy.service.tap.v2alpha"; +import "validate/validate.proto"; // [#protodoc-title: Tap discovery service] // [#not-implemented-hide:] Tap discovery service. service TapDiscoveryService { - rpc StreamTapConfigs(stream envoy.api.v2.DiscoveryRequest) - returns (stream envoy.api.v2.DiscoveryResponse) { + rpc StreamTapConfigs(stream api.v2.DiscoveryRequest) returns (stream api.v2.DiscoveryResponse) { } - rpc DeltaTapConfigs(stream envoy.api.v2.DeltaDiscoveryRequest) - returns (stream envoy.api.v2.DeltaDiscoveryResponse) { + rpc DeltaTapConfigs(stream api.v2.DeltaDiscoveryRequest) + returns (stream api.v2.DeltaDiscoveryResponse) { } - rpc FetchTapConfigs(envoy.api.v2.DiscoveryRequest) returns (envoy.api.v2.DiscoveryResponse) { + rpc FetchTapConfigs(api.v2.DiscoveryRequest) returns (api.v2.DiscoveryResponse) { option (google.api.http) = { post: "/v2/discovery:tap_configs" body: "*" @@ -36,8 +37,8 @@ service TapDiscoveryService { // The filter TapDS config references this name. message TapResource { // The name of the tap configuration. - string name = 1 [(validate.rules).string.min_bytes = 1]; + string name = 1 [(validate.rules).string = {min_bytes: 1}]; // Tap config to apply TapConfig config = 2; -} \ No newline at end of file +} diff --git a/api/envoy/service/tap/v3alpha/BUILD b/api/envoy/service/tap/v3alpha/BUILD index 005ef96b61a0..1db858abe610 100644 --- a/api/envoy/service/tap/v3alpha/BUILD +++ b/api/envoy/service/tap/v3alpha/BUILD @@ -1,46 +1,15 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha", - "//envoy/api/v3alpha/core", + "//envoy/api/v3alpha:pkg", + "//envoy/api/v3alpha/core:pkg", "//envoy/api/v3alpha/route:pkg", "//envoy/data/tap/v3alpha:pkg", ], ) - -api_proto_library_internal( - name = "common", - srcs = ["common.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha/core:base", - "//envoy/api/v3alpha/core:grpc_service", - "//envoy/api/v3alpha/route", - ], -) - -api_proto_library_internal( - name = "tap", - srcs = ["tap.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha:discovery", - "//envoy/api/v3alpha/core:base", - "//envoy/data/tap/v3alpha:wrapper", - ], -) - -api_proto_library_internal( - name = "tapds", - srcs = ["tapds.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/api/v3alpha:discovery", - "//envoy/api/v3alpha/core:base", - "//envoy/service/tap/v3alpha:common", - ], -) diff --git a/api/envoy/service/tap/v3alpha/tap.proto b/api/envoy/service/tap/v3alpha/tap.proto index 1e69d421915c..b3808eb9aeca 100644 --- a/api/envoy/service/tap/v3alpha/tap.proto +++ b/api/envoy/service/tap/v3alpha/tap.proto @@ -1,24 +1,36 @@ syntax = "proto3"; -import "envoy/api/v3alpha/core/base.proto"; -import "envoy/data/tap/v3alpha/wrapper.proto"; - package envoy.service.tap.v3alpha; -import "validate/validate.proto"; - option java_outer_classname = "TapProto"; option java_multiple_files = true; option java_package = "io.envoyproxy.envoy.service.tap.v3alpha"; +option java_generic_services = true; + +import "envoy/api/v3alpha/core/base.proto"; +import "envoy/data/tap/v3alpha/wrapper.proto"; + +import "validate/validate.proto"; // [#protodoc-title: Tap Sink Service] +// [#not-implemented-hide:] A tap service to receive incoming taps. Envoy will call +// StreamTaps to deliver captured taps to the server +service TapSinkService { + // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. The server should + // disconnect if it expects Envoy to reconnect. + rpc StreamTaps(stream StreamTapsRequest) returns (StreamTapsResponse) { + } +} + // [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server // and stream taps without ever expecting a response. message StreamTapsRequest { message Identifier { // The node sending taps over the stream. - envoy.api.v3alpha.core.Node node = 1 [(validate.rules).message.required = true]; + api.v3alpha.core.Node node = 1 [(validate.rules).message = {required: true}]; + // The opaque identifier that was set in the :ref:`output config // `. string tap_id = 2; @@ -27,24 +39,15 @@ message StreamTapsRequest { // Identifier data effectively is a structured metadata. As a performance optimization this will // only be sent in the first message on the stream. Identifier identifier = 1; + // The trace id. this can be used to merge together a streaming trace. Note that the trace_id // is not guaranteed to be spatially or temporally unique. uint64 trace_id = 2; + // The trace data. - envoy.data.tap.v3alpha.TraceWrapper trace = 3; + data.tap.v3alpha.TraceWrapper trace = 3; } // [#not-implemented-hide:] message StreamTapsResponse { } - -// [#not-implemented-hide:] A tap service to receive incoming taps. Envoy will call -// StreamTaps to deliver captured taps to the server -service TapSinkService { - - // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. - rpc StreamTaps(stream StreamTapsRequest) returns (StreamTapsResponse) { - } -} \ No newline at end of file diff --git a/api/envoy/service/tap/v3alpha/tapds.proto b/api/envoy/service/tap/v3alpha/tapds.proto index 11eea61a1dc8..68d00b4f7892 100644 --- a/api/envoy/service/tap/v3alpha/tapds.proto +++ b/api/envoy/service/tap/v3alpha/tapds.proto @@ -1,31 +1,32 @@ syntax = "proto3"; +package envoy.service.tap.v3alpha; + +option java_outer_classname = "TapdsProto"; +option java_multiple_files = true; +option java_package = "io.envoyproxy.envoy.service.tap.v3alpha"; +option java_generic_services = true; + import "envoy/api/v3alpha/discovery.proto"; import "envoy/service/tap/v3alpha/common.proto"; -import "validate/validate.proto"; - -package envoy.service.tap.v3alpha; import "google/api/annotations.proto"; -option java_outer_classname = "TapDsProto"; -option java_multiple_files = true; -option java_package = "io.envoyproxy.envoy.service.tap.v3alpha"; +import "validate/validate.proto"; // [#protodoc-title: Tap discovery service] // [#not-implemented-hide:] Tap discovery service. service TapDiscoveryService { - rpc StreamTapConfigs(stream envoy.api.v3alpha.DiscoveryRequest) - returns (stream envoy.api.v3alpha.DiscoveryResponse) { + rpc StreamTapConfigs(stream api.v3alpha.DiscoveryRequest) + returns (stream api.v3alpha.DiscoveryResponse) { } - rpc DeltaTapConfigs(stream envoy.api.v3alpha.DeltaDiscoveryRequest) - returns (stream envoy.api.v3alpha.DeltaDiscoveryResponse) { + rpc DeltaTapConfigs(stream api.v3alpha.DeltaDiscoveryRequest) + returns (stream api.v3alpha.DeltaDiscoveryResponse) { } - rpc FetchTapConfigs(envoy.api.v3alpha.DiscoveryRequest) - returns (envoy.api.v3alpha.DiscoveryResponse) { + rpc FetchTapConfigs(api.v3alpha.DiscoveryRequest) returns (api.v3alpha.DiscoveryResponse) { option (google.api.http) = { post: "/v3alpha/discovery:tap_configs" body: "*" @@ -37,8 +38,8 @@ service TapDiscoveryService { // The filter TapDS config references this name. message TapResource { // The name of the tap configuration. - string name = 1 [(validate.rules).string.min_bytes = 1]; + string name = 1 [(validate.rules).string = {min_bytes: 1}]; // Tap config to apply TapConfig config = 2; -} \ No newline at end of file +} diff --git a/api/envoy/service/trace/v2/BUILD b/api/envoy/service/trace/v2/BUILD index 9f4ff694748d..6fce6d2d917a 100644 --- a/api/envoy/service/trace/v2/BUILD +++ b/api/envoy/service/trace/v2/BUILD @@ -1,22 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +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/core", - "@opencensus_proto//opencensus/proto/trace/v1:trace_proto", - ], -) - -api_proto_library_internal( - name = "trace_service", - srcs = ["trace_service.proto"], - has_services = 0, - require_py = 0, - deps = [ - "//envoy/api/v2/core:base", + "//envoy/api/v2/core:pkg", "@opencensus_proto//opencensus/proto/trace/v1:trace_proto", ], ) diff --git a/api/envoy/service/trace/v3alpha/BUILD b/api/envoy/service/trace/v3alpha/BUILD index 8518b28b984a..85bf5d4a8744 100644 --- a/api/envoy/service/trace/v3alpha/BUILD +++ b/api/envoy/service/trace/v3alpha/BUILD @@ -1,22 +1,13 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( has_services = True, deps = [ - "//envoy/api/v3alpha/core", - "@opencensus_proto//opencensus/proto/trace/v1:trace_proto", - ], -) - -api_proto_library_internal( - name = "trace_service", - srcs = ["trace_service.proto"], - has_services = 0, - require_py = 0, - deps = [ - "//envoy/api/v3alpha/core:base", + "//envoy/api/v3alpha/core:pkg", "@opencensus_proto//opencensus/proto/trace/v1:trace_proto", ], ) diff --git a/api/envoy/type/BUILD b/api/envoy/type/BUILD index 26dd9730d9ea..5dc095ade27a 100644 --- a/api/envoy/type/BUILD +++ b/api/envoy/type/BUILD @@ -1,25 +1,7 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. -licenses(["notice"]) # Apache 2 - -api_proto_package( - name = "type", -) +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") -api_proto_library_internal( - name = "http_status", - srcs = ["http_status.proto"], - visibility = ["//visibility:public"], -) - -api_proto_library_internal( - name = "percent", - srcs = ["percent.proto"], - visibility = ["//visibility:public"], -) +licenses(["notice"]) # Apache 2 -api_proto_library_internal( - name = "range", - srcs = ["range.proto"], - visibility = ["//visibility:public"], -) +api_proto_package() diff --git a/api/envoy/type/matcher/BUILD b/api/envoy/type/matcher/BUILD index c7db01b6cdfe..8ac33b5554e8 100644 --- a/api/envoy/type/matcher/BUILD +++ b/api/envoy/type/matcher/BUILD @@ -1,51 +1,9 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library_internal", "api_proto_package") +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - name = "matcher", - deps = ["//envoy/type"], -) - -api_proto_library_internal( - name = "metadata", - srcs = ["metadata.proto"], - visibility = ["//visibility:public"], - deps = [ - ":value", - ], -) - -api_proto_library_internal( - name = "number", - srcs = ["number.proto"], - visibility = ["//visibility:public"], - deps = [ - "//envoy/type:range", - ], -) - -api_proto_library_internal( - name = "string", - srcs = ["string.proto"], - visibility = ["//visibility:public"], - deps = [ - ":regex", - ], -) - -api_proto_library_internal( - name = "value", - srcs = ["value.proto"], - visibility = ["//visibility:public"], - deps = [ - ":number", - ":string", - ], -) - -api_proto_library_internal( - name = "regex", - srcs = ["regex.proto"], - visibility = ["//visibility:public"], + deps = ["//envoy/type:pkg"], ) diff --git a/api/test/build/BUILD b/api/test/build/BUILD index c8390c1fede4..3e4a9bd8e940 100644 --- a/api/test/build/BUILD +++ b/api/test/build/BUILD @@ -5,18 +5,13 @@ licenses(["notice"]) # Apache 2 api_cc_test( name = "build_test", srcs = ["build_test.cc"], - proto_deps = [ - "//envoy/api/v2:cds", - "//envoy/api/v2:eds", - "//envoy/api/v2:lds", - "//envoy/api/v2:rds", - "//envoy/service/accesslog/v2:als", - "//envoy/service/discovery/v2:ads", - "//envoy/service/discovery/v2:hds", - "//envoy/service/discovery/v2:rtds", - "//envoy/service/metrics/v2:metrics_service", - "//envoy/service/ratelimit/v2:rls", - "@com_github_cncf_udpa//udpa/service/orca/v1:orca", + deps = [ + "//envoy/api/v2:pkg_cc_proto", + "//envoy/service/accesslog/v2:pkg_cc_proto", + "//envoy/service/discovery/v2:pkg_cc_proto", + "//envoy/service/metrics/v2:pkg_cc_proto", + "//envoy/service/ratelimit/v2:pkg_cc_proto", + "@com_github_cncf_udpa//udpa/service/orca/v1:orca_export_cc", ], ) @@ -26,8 +21,8 @@ api_go_test( srcs = ["go_build_test.go"], importpath = "go_build_test", deps = [ - "//envoy/api/v2:v2_go_proto", - "//envoy/api/v2/auth:auth_go_proto", + "//envoy/api/v2:pkg_go_proto", + "//envoy/api/v2/auth:pkg_go_proto", "//envoy/config/bootstrap/v2:pkg_go_proto", "//envoy/service/accesslog/v2:pkg_go_proto", "//envoy/service/discovery/v2:pkg_go_proto", diff --git a/api/test/validate/BUILD b/api/test/validate/BUILD index 0df5bf38177e..ba734377b177 100644 --- a/api/test/validate/BUILD +++ b/api/test/validate/BUILD @@ -1,34 +1,29 @@ -load("@envoy_api//bazel:api_build_system.bzl", "api_cc_test", "api_proto_library_internal") +load("@envoy_api//bazel:api_build_system.bzl", "api_cc_test") licenses(["notice"]) # Apache 2 api_cc_test( name = "pgv_test", srcs = ["pgv_test.cc"], - proto_deps = [ - "//envoy/api/v2:cds", - "//envoy/api/v2:eds", - "//envoy/api/v2:lds", - "//envoy/api/v2:rds", - "//envoy/api/v2/core:protocol", - "//envoy/api/v2/listener", - "//envoy/api/v2/route", - "//envoy/config/bootstrap/v2:bootstrap", - "//envoy/config/filter/accesslog/v2:accesslog", - "//envoy/config/filter/http/buffer/v2:buffer", - "//envoy/config/filter/http/fault/v2:fault", - "//envoy/config/filter/http/gzip/v2:gzip", - "//envoy/config/filter/http/header_to_metadata/v2:header_to_metadata", - "//envoy/config/filter/http/health_check/v2:health_check", - "//envoy/config/filter/http/ip_tagging/v2:ip_tagging", - "//envoy/config/filter/http/lua/v2:lua", - "//envoy/config/filter/http/router/v2:router", - "//envoy/config/filter/http/squash/v2:squash", - "//envoy/config/filter/http/transcoder/v2:transcoder", - "//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager", - "//envoy/config/filter/network/mongo_proxy/v2:mongo_proxy", - "//envoy/config/filter/network/redis_proxy/v2:redis_proxy", - "//envoy/config/filter/network/tcp_proxy/v2:tcp_proxy", - "//envoy/config/health_checker/redis/v2:redis", + deps = [ + "//envoy/api/v2:pkg_cc_proto", + "//envoy/api/v2/core:pkg_cc_proto", + "//envoy/config/bootstrap/v2:pkg_cc_proto", + "//envoy/config/filter/accesslog/v2:pkg_cc_proto", + "//envoy/config/filter/http/buffer/v2:pkg_cc_proto", + "//envoy/config/filter/http/fault/v2:pkg_cc_proto", + "//envoy/config/filter/http/gzip/v2:pkg_cc_proto", + "//envoy/config/filter/http/header_to_metadata/v2:pkg_cc_proto", + "//envoy/config/filter/http/health_check/v2:pkg_cc_proto", + "//envoy/config/filter/http/ip_tagging/v2:pkg_cc_proto", + "//envoy/config/filter/http/lua/v2:pkg_cc_proto", + "//envoy/config/filter/http/router/v2:pkg_cc_proto", + "//envoy/config/filter/http/squash/v2:pkg_cc_proto", + "//envoy/config/filter/http/transcoder/v2:pkg_cc_proto", + "//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", + "//envoy/config/filter/network/mongo_proxy/v2:pkg_cc_proto", + "//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", + "//envoy/config/filter/network/tcp_proxy/v2:pkg_cc_proto", + "//envoy/config/health_checker/redis/v2:pkg_cc_proto", ], ) diff --git a/api/tools/BUILD b/api/tools/BUILD index e90cfa0eef29..d94214d7bacd 100644 --- a/api/tools/BUILD +++ b/api/tools/BUILD @@ -6,9 +6,7 @@ py_binary( licenses = ["notice"], # Apache 2 python_version = "PY2", visibility = ["//visibility:public"], - deps = [ - "//envoy/data/tap/v2alpha:wrapper_py", - ], + deps = ["//envoy/data/tap/v2alpha:pkg_py_proto"], ) py_test( @@ -32,8 +30,8 @@ py_binary( licenses = ["notice"], # Apache 2 visibility = ["//visibility:public"], deps = [ - "//envoy/api/v2:lds_py", - "//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_py", + "//envoy/api/v2:pkg_py_proto", + "//envoy/config/filter/network/http_connection_manager/v2:pkg_py_proto", ], ) diff --git a/bazel/README.md b/bazel/README.md index 499dd46b80cf..78c4c48ca2c2 100644 --- a/bazel/README.md +++ b/bazel/README.md @@ -289,7 +289,8 @@ be installed. # Running a single Bazel test under GDB ``` -tools/bazel-test-gdb //test/common/http:async_client_impl_test -c dbg +bazel build -c dbg //test/common/http:async_client_impl_test +gdb bazel-bin/test/common/http/async_client_impl_test ``` Without the `-c dbg` Bazel option at the end of the command line the test diff --git a/bazel/envoy_library.bzl b/bazel/envoy_library.bzl index 661e64be6cce..9aecc019a90f 100644 --- a/bazel/envoy_library.bzl +++ b/bazel/envoy_library.bzl @@ -7,7 +7,7 @@ load( "envoy_linkstatic", ) load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library", "py_proto_library") -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_library") +load("@envoy_api//bazel:api_build_system.bzl", "api_cc_py_proto_library") # As above, but wrapped in list form for adding to dep lists. This smell seems needed as # SelectorValue values have to match the attribute type. See @@ -125,15 +125,8 @@ def envoy_include_prefix(path): # Envoy proto targets should be specified with this function. def envoy_proto_library(name, external_deps = [], **kwargs): - external_proto_deps = [] - external_cc_proto_deps = [] - if "api_httpbody_protos" in external_deps: - external_cc_proto_deps.append("@com_google_googleapis//google/api:httpbody_cc_proto") - external_proto_deps.append("@com_google_googleapis//google/api:httpbody_proto") - api_proto_library( + api_cc_py_proto_library( name, - external_cc_proto_deps = external_cc_proto_deps, - external_proto_deps = external_proto_deps, # Avoid generating .so, we don't need it, can interfere with builds # such as OSS-Fuzz. linkstatic = 1, diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 26690aa2a57b..8bdf4d5145f6 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -173,6 +173,10 @@ def envoy_dependencies(skip_targets = []): "py_proto_library": "@envoy_api//bazel:api_build_system.bzl", }, ) + native.bind( + name = "bazel_runfiles", + actual = "@bazel_tools//tools/cpp/runfiles", + ) def _boringssl(): _repository_impl("boringssl") diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index e950b51ef474..2a75ee4f5d5a 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -22,15 +22,15 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/envoyproxy/envoy-build-tools/archive/4433e52437af6936d0af95ebc3b16b4b6df38618.tar.gz"], ), boringssl = dict( - sha256 = "c712766ddc844de2a38e686e1cdd7288795e9a6fe7f699c6636f1b76703db84e", - strip_prefix = "boringssl-265728decec4370cd02b941f72fba9f0735e2923", + sha256 = "891352824e0f7977bc0c291b8c65076e3ed23630334841b93f346f12d4484b06", + strip_prefix = "boringssl-5565939d4203234ddc742c02241ce4523e7b3beb", # To update BoringSSL, which tracks Chromium releases: # 1. Open https://omahaproxy.appspot.com/ and note of linux/beta release. # 2. Open https://chromium.googlesource.com/chromium/src/+/refs/tags//DEPS and note . # 3. Find a commit in BoringSSL's "master-with-bazel" branch that merges . # - # chromium-77.0.3865.35 (BETA) - urls = ["https://github.com/google/boringssl/archive/265728decec4370cd02b941f72fba9f0735e2923.tar.gz"], + # chromium-78.0.3904.21 (BETA) + urls = ["https://github.com/google/boringssl/archive/5565939d4203234ddc742c02241ce4523e7b3beb.tar.gz"], ), boringssl_fips = dict( sha256 = "b12ad676ee533824f698741bd127f6fbc82c46344398a6d78d25e62c6c418c73", @@ -64,9 +64,9 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/circonus-labs/libcircllhist/archive/63a16dd6f2fc7bc841bb17ff92be8318df60e2e1.tar.gz"], ), com_github_cyan4973_xxhash = dict( - sha256 = "b34792646d5e19964bb7bba24f06cb13aecaac623ab91a54da08aa19d3686d7e", - strip_prefix = "xxHash-0.7.0", - urls = ["https://github.com/Cyan4973/xxHash/archive/v0.7.0.tar.gz"], + sha256 = "afa29766cfc0448ff4a1fd9f2c47e02c48d50be5b79749925d15d545008c3f81", + strip_prefix = "xxHash-0.7.1", + urls = ["https://github.com/Cyan4973/xxHash/archive/v0.7.1.tar.gz"], ), com_github_envoyproxy_sqlparser = dict( sha256 = "425dfee0c4fe9aff8acf2365cde3dd2ba7fb878d2ba37562d33920e34c40c05e", @@ -89,10 +89,10 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/gabime/spdlog/archive/v1.3.1.tar.gz"], ), com_github_google_libprotobuf_mutator = dict( - sha256 = "97b3639630040f41c45f45838ab00b78909e6b4cb69c8028e01302bea5b79495", - strip_prefix = "libprotobuf-mutator-c3d2faf04a1070b0b852b0efdef81e1a81ba925e", - # 2018-03-06 - urls = ["https://github.com/google/libprotobuf-mutator/archive/c3d2faf04a1070b0b852b0efdef81e1a81ba925e.tar.gz"], + sha256 = "f45c3ad82376d891cd0bcaa7165e83efd90e0014b00aebf0cbaf07eb05a1d3f9", + strip_prefix = "libprotobuf-mutator-d1fe8a7d8ae18f3d454f055eba5213c291986f21", + # 2019-07-10 + urls = ["https://github.com/google/libprotobuf-mutator/archive/d1fe8a7d8ae18f3d454f055eba5213c291986f21.tar.gz"], ), com_github_gperftools_gperftools = dict( # TODO(cmluciano): Bump to release 2.8 diff --git a/bazel/sh_test_wrapper.sh b/bazel/sh_test_wrapper.sh index 80df983f9207..262a12286463 100755 --- a/bazel/sh_test_wrapper.sh +++ b/bazel/sh_test_wrapper.sh @@ -1,7 +1,8 @@ #!/bin/bash -# Where the runfiles are for tests. -export TEST_RUNDIR="${TEST_SRCDIR}/${TEST_WORKSPACE}" +# Dummy shell implementation for nooping tests. +# TODO(lizan): remove when we have a solution for +# https://github.com/bazelbuild/bazel/issues/3510 cd $(dirname "$0") diff --git a/ci/build_setup.sh b/ci/build_setup.sh index 9dc53668825c..ea6eba825bfb 100755 --- a/ci/build_setup.sh +++ b/ci/build_setup.sh @@ -93,7 +93,7 @@ if [ "$1" != "-nofetch" ]; then fi # This is the hash on https://github.com/envoyproxy/envoy-filter-example.git we pin to. - (cd "${ENVOY_FILTER_EXAMPLE_SRCDIR}" && git fetch origin && git checkout -f 1995c1e0eccea84bbb39f64e75ef3e9102d1ae82) + (cd "${ENVOY_FILTER_EXAMPLE_SRCDIR}" && git fetch origin && git checkout -f 616ec56fb7a673e285aed278cb0a44f23789806f) sed -e "s|{ENVOY_SRCDIR}|${ENVOY_SRCDIR}|" "${ENVOY_SRCDIR}"/ci/WORKSPACE.filter.example > "${ENVOY_FILTER_EXAMPLE_SRCDIR}"/WORKSPACE cp -f "${ENVOY_SRCDIR}"/.bazelversion "${ENVOY_FILTER_EXAMPLE_SRCDIR}"/.bazelversion fi diff --git a/ci/do_ci.sh b/ci/do_ci.sh index 6176da3f1334..b97d51f8949d 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -7,7 +7,7 @@ set -e build_setup_args="" if [[ "$1" == "fix_format" || "$1" == "check_format" || "$1" == "check_repositories" || \ "$1" == "check_spelling" || "$1" == "fix_spelling" || "$1" == "bazel.clang_tidy" || \ - "$1" == "check_spelling_pedantic" || "$1" == "fix_spelling_pedantic" || "$1" == "bazel.compile_time_options" ]]; then + "$1" == "check_spelling_pedantic" || "$1" == "fix_spelling_pedantic" ]]; then build_setup_args="-nofetch" fi @@ -203,15 +203,21 @@ elif [[ "$CI_TARGET" == "bazel.compile_time_options" ]]; then setup_clang_libcxx_toolchain # This doesn't go into CI but is available for developer convenience. echo "bazel with different compiletime options build with tests..." + + if [[ "${TEST_TARGETS}" == "//test/..." ]]; then + cd "${ENVOY_FILTER_EXAMPLE_SRCDIR}" + TEST_TARGETS="@envoy//test/..." + fi # Building all the dependencies from scratch to link them against libc++. echo "Building..." - bazel build ${BAZEL_BUILD_OPTIONS} ${COMPILE_TIME_OPTIONS} -c dbg //source/exe:envoy-static --build_tag_filters=-nofips + bazel build ${BAZEL_BUILD_OPTIONS} ${COMPILE_TIME_OPTIONS} -c dbg @envoy//source/exe:envoy-static --build_tag_filters=-nofips echo "Building and testing ${TEST_TARGETS}" bazel test ${BAZEL_BUILD_OPTIONS} ${COMPILE_TIME_OPTIONS} -c dbg ${TEST_TARGETS} --test_tag_filters=-nofips --build_tests_only # "--define log_debug_assert_in_release=enabled" must be tested with a release build, so run only # these tests under "-c opt" to save time in CI. - bazel test ${BAZEL_BUILD_OPTIONS} ${COMPILE_TIME_OPTIONS} -c opt //test/common/common:assert_test //test/server:server_test + bazel test ${BAZEL_BUILD_OPTIONS} ${COMPILE_TIME_OPTIONS} -c opt @envoy//test/common/common:assert_test @envoy//test/server:server_test + exit 0 elif [[ "$CI_TARGET" == "bazel.api" ]]; then setup_clang_toolchain diff --git a/docs/build.sh b/docs/build.sh index 8a43163f6c56..d6289622ab5b 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -51,7 +51,7 @@ pip3 install -r "${SCRIPT_DIR}"/requirements.txt rm -rf bazel-bin/external/envoy_api bazel build ${BAZEL_BUILD_OPTIONS} @envoy_api//docs:protos --aspects \ - tools/protodoc/protodoc.bzl%proto_doc_aspect --output_groups=rst --action_env=CPROFILE_ENABLED=1 \ + tools/protodoc/protodoc.bzl%protodoc_aspect --output_groups=rst --action_env=CPROFILE_ENABLED=1 \ --action_env=ENVOY_BLOB_SHA --spawn_strategy=standalone --host_force_python=PY3 # We do ** matching below to deal with Bazel cache blah (source proto artifacts diff --git a/docs/conf.py b/docs/conf.py index 64c48a8f6c79..52d7cf9d6ace 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -126,7 +126,14 @@ def setup(app): # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', '_venv', 'Thumbs.db', '.DS_Store'] +exclude_patterns = [ + '_build', + '_venv', + 'Thumbs.db', + '.DS_Store', + 'api-v2/api/v2/endpoint/load_report.proto.rst', + 'api-v2/service/discovery/v2/hds.proto.rst', +] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/docs/root/intro/version_history.rst b/docs/root/intro/version_history.rst index 0592bc78c1aa..e1de8d60e216 100644 --- a/docs/root/intro/version_history.rst +++ b/docs/root/intro/version_history.rst @@ -59,6 +59,7 @@ Version history * router: added :ref:`rq_retry_skipped_request_not_complete ` counter stat to router stats. * router: :ref:`Scoped routing ` is supported. * router: added new :ref:`retriable-headers ` retry policy. Retries can now be configured to trigger by arbitrary response header matching. +* router: added :ref:`respect_expected_rq_timeout ` that instructs ingress Envoy to respect :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress Envoy, when deriving timeout for upstream cluster. * router: added new :ref:`retriable request headers ` to retry policies. Retries can now be configured to only trigger on request header match. * router check tool: add coverage reporting & enforcement. * router check tool: add comprehensive coverage reporting. diff --git a/include/envoy/config/BUILD b/include/envoy/config/BUILD index 7df8a214104f..adc456e7a6ee 100644 --- a/include/envoy/config/BUILD +++ b/include/envoy/config/BUILD @@ -44,7 +44,7 @@ envoy_cc_library( hdrs = ["subscription_factory.h"], deps = [ ":subscription_interface", - "@envoy_api//envoy/api/v2/core:config_source_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -54,7 +54,7 @@ envoy_cc_library( deps = [ "//include/envoy/stats:stats_macros", "//source/common/protobuf", - "@envoy_api//envoy/api/v2:discovery_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) diff --git a/include/envoy/grpc/BUILD b/include/envoy/grpc/BUILD index f2a18416a8dc..35299022a2fa 100644 --- a/include/envoy/grpc/BUILD +++ b/include/envoy/grpc/BUILD @@ -28,7 +28,7 @@ envoy_cc_library( deps = [ ":async_client_interface", "//include/envoy/stats:stats_interface", - "@envoy_api//envoy/api/v2/core:grpc_service_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -49,7 +49,7 @@ envoy_cc_library( ], deps = [ "//include/envoy/api:api_interface", - "@envoy_api//envoy/api/v2/core:grpc_service_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/include/envoy/http/BUILD b/include/envoy/http/BUILD index 97477bfb77d0..caa6619a846e 100644 --- a/include/envoy/http/BUILD +++ b/include/envoy/http/BUILD @@ -16,7 +16,7 @@ envoy_cc_library( ":message_interface", "//include/envoy/event:dispatcher_interface", "//source/common/protobuf", - "@envoy_api//envoy/api/v2/route:route_cc", + "@envoy_api//envoy/api/v2/route:pkg_cc_proto", ], ) diff --git a/include/envoy/local_info/BUILD b/include/envoy/local_info/BUILD index 103028e273f5..351a969b6f96 100644 --- a/include/envoy/local_info/BUILD +++ b/include/envoy/local_info/BUILD @@ -13,6 +13,6 @@ envoy_cc_library( hdrs = ["local_info.h"], deps = [ "//include/envoy/network:address_interface", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/include/envoy/network/BUILD b/include/envoy/network/BUILD index 0a9c502f1f59..cf4e29043b21 100644 --- a/include/envoy/network/BUILD +++ b/include/envoy/network/BUILD @@ -79,7 +79,7 @@ envoy_cc_library( deps = [ ":address_interface", ":io_handle_interface", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -100,7 +100,7 @@ envoy_cc_library( ":connection_interface", ":listen_socket_interface", "//include/envoy/stats:stats_interface", - "@envoy_api//envoy/api/v2:lds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -109,6 +109,6 @@ envoy_cc_library( hdrs = ["resolver.h"], deps = [ ":address_interface", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/include/envoy/router/BUILD b/include/envoy/router/BUILD index b7877db25c79..cbb472bfc844 100644 --- a/include/envoy/router/BUILD +++ b/include/envoy/router/BUILD @@ -27,7 +27,7 @@ envoy_cc_library( "//include/envoy/stats:stats_interface", "//include/envoy/thread_local:thread_local_interface", "//include/envoy/upstream:cluster_manager_interface", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) @@ -59,7 +59,7 @@ envoy_cc_library( "//include/envoy/upstream:retry_interface", "//source/common/protobuf", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2:rds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) diff --git a/include/envoy/runtime/BUILD b/include/envoy/runtime/BUILD index 8e510aeb09dd..1136b7617c3b 100644 --- a/include/envoy/runtime/BUILD +++ b/include/envoy/runtime/BUILD @@ -15,6 +15,6 @@ envoy_cc_library( deps = [ "//source/common/common:assert_lib", "//source/common/singleton:threadsafe_singleton", - "@envoy_api//envoy/type:percent_cc", + "@envoy_api//envoy/type:pkg_cc_proto", ], ) diff --git a/include/envoy/secret/BUILD b/include/envoy/secret/BUILD index bcf14ebf9ad0..dd4bca328091 100644 --- a/include/envoy/secret/BUILD +++ b/include/envoy/secret/BUILD @@ -21,7 +21,7 @@ envoy_cc_library( "//include/envoy/common:callback", "//include/envoy/ssl:certificate_validation_context_config_interface", "//include/envoy/ssl:tls_certificate_config_interface", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) @@ -30,7 +30,7 @@ envoy_cc_library( hdrs = ["secret_manager.h"], deps = [ ":secret_provider_interface", - "@envoy_api//envoy/api/v2/auth:cert_cc", - "@envoy_api//envoy/api/v2/core:config_source_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/include/envoy/server/BUILD b/include/envoy/server/BUILD index db070132fbcf..11ba5bddc145 100644 --- a/include/envoy/server/BUILD +++ b/include/envoy/server/BUILD @@ -80,7 +80,7 @@ envoy_cc_library( deps = [ "//include/envoy/event:dispatcher_interface", "//include/envoy/thread:thread_interface", - "//source/server:hot_restart_cc", + "//source/server:hot_restart_cc_proto", ], ) @@ -118,8 +118,8 @@ envoy_cc_library( deps = [ "//include/envoy/network:address_interface", "//include/envoy/stats:stats_interface", - "@envoy_api//envoy/admin/v2alpha:server_info_cc", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) @@ -168,7 +168,7 @@ envoy_cc_library( "//source/common/common:assert_lib", "//source/common/common:macros", "//source/common/protobuf", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -191,7 +191,7 @@ envoy_cc_library( "//include/envoy/network:listen_socket_interface", "//include/envoy/ssl:context_interface", "//source/common/protobuf", - "@envoy_api//envoy/api/v2/listener:listener_cc", + "@envoy_api//envoy/api/v2/listener:pkg_cc_proto", ], ) @@ -253,7 +253,7 @@ envoy_cc_library( deps = [ ":instance_interface", "//source/common/protobuf", - "@envoy_api//envoy/config/trace/v2:trace_cc", + "@envoy_api//envoy/config/trace/v2:pkg_cc_proto", ], ) diff --git a/include/envoy/ssl/BUILD b/include/envoy/ssl/BUILD index 8ea81a6e9090..80ec1a425756 100644 --- a/include/envoy/ssl/BUILD +++ b/include/envoy/ssl/BUILD @@ -21,7 +21,7 @@ envoy_cc_library( name = "context_interface", hdrs = ["context.h"], deps = [ - "@envoy_api//envoy/admin/v2alpha:certs_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", ], ) diff --git a/include/envoy/ssl/private_key/BUILD b/include/envoy/ssl/private_key/BUILD index 4bb651d1f8d3..696b5fe0f8ac 100644 --- a/include/envoy/ssl/private_key/BUILD +++ b/include/envoy/ssl/private_key/BUILD @@ -15,7 +15,7 @@ envoy_cc_library( deps = [ ":private_key_callbacks_interface", "//include/envoy/event:dispatcher_interface", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) diff --git a/include/envoy/upstream/BUILD b/include/envoy/upstream/BUILD index ab2f0d6a414e..c1e156341363 100644 --- a/include/envoy/upstream/BUILD +++ b/include/envoy/upstream/BUILD @@ -29,8 +29,8 @@ envoy_cc_library( "//include/envoy/singleton:manager_interface", "//include/envoy/tcp:conn_pool_interface", "//include/envoy/thread_local:thread_local_interface", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) @@ -39,7 +39,7 @@ envoy_cc_library( hdrs = ["health_checker.h"], deps = [ ":upstream_interface", - "@envoy_api//envoy/data/core/v2alpha:health_check_event_cc", + "@envoy_api//envoy/data/core/v2alpha:pkg_cc_proto", ], ) @@ -57,7 +57,7 @@ envoy_cc_library( "//include/envoy/network:address_interface", "//include/envoy/stats:primitive_stats_macros", "//include/envoy/stats:stats_macros", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -76,7 +76,7 @@ envoy_cc_library( hdrs = ["load_balancer_type.h"], deps = [ "//source/common/protobuf", - "@envoy_api//envoy/api/v2:cds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -85,7 +85,7 @@ envoy_cc_library( hdrs = ["locality.h"], deps = [ "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -95,7 +95,7 @@ envoy_cc_library( external_deps = ["abseil_optional"], deps = [ "//include/envoy/common:time_interface", - "@envoy_api//envoy/data/cluster/v2alpha:outlier_detection_event_cc", + "@envoy_api//envoy/data/cluster/v2alpha:pkg_cc_proto", ], ) @@ -169,6 +169,6 @@ envoy_cc_library( "//include/envoy/runtime:runtime_interface", "//include/envoy/ssl:context_interface", "//include/envoy/ssl:context_manager_interface", - "@envoy_api//envoy/api/v2:cds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) diff --git a/source/common/access_log/BUILD b/source/common/access_log/BUILD index 8506985f2676..46403d19b8d3 100644 --- a/source/common/access_log/BUILD +++ b/source/common/access_log/BUILD @@ -31,7 +31,7 @@ envoy_cc_library( "//source/common/runtime:uuid_util_lib", "//source/common/stream_info:stream_info_lib", "//source/common/tracing:http_tracer_lib", - "@envoy_api//envoy/config/filter/accesslog/v2:accesslog_cc", + "@envoy_api//envoy/config/filter/accesslog/v2:pkg_cc_proto", ], ) diff --git a/source/common/common/BUILD b/source/common/common/BUILD index 401d32364634..c8e4b2ae5b22 100644 --- a/source/common/common/BUILD +++ b/source/common/common/BUILD @@ -173,10 +173,7 @@ envoy_cc_library( "//source/common/common:regex_lib", "//source/common/config:metadata_lib", "//source/common/protobuf", - "@envoy_api//envoy/type/matcher:metadata_cc", - "@envoy_api//envoy/type/matcher:number_cc", - "@envoy_api//envoy/type/matcher:string_cc", - "@envoy_api//envoy/type/matcher:value_cc", + "@envoy_api//envoy/type/matcher:pkg_cc_proto", ], ) @@ -189,7 +186,7 @@ envoy_cc_library( "//include/envoy/common:regex_interface", "//source/common/protobuf:utility_lib", "@com_googlesource_code_re2//:re2", - "@envoy_api//envoy/type/matcher:regex_cc", + "@envoy_api//envoy/type/matcher:pkg_cc_proto", ], ) diff --git a/source/common/config/BUILD b/source/common/config/BUILD index 97d7b5907198..50599abd8842 100644 --- a/source/common/config/BUILD +++ b/source/common/config/BUILD @@ -17,7 +17,7 @@ envoy_cc_library( "//source/common/common:assert_lib", "//source/common/network:cidr_range_lib", "//source/common/network:utility_lib", - "@envoy_api//envoy/api/v2/core:address_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -27,7 +27,7 @@ envoy_cc_library( hdrs = ["base_json.h"], deps = [ "//include/envoy/json:json_object_interface", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -61,8 +61,7 @@ envoy_cc_library( "//source/common/common:empty_string", "//source/common/init:target_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/api/v2/core:http_uri_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -99,7 +98,7 @@ envoy_cc_library( "//source/common/common:token_bucket_impl_lib", "//source/common/grpc:common_lib", "//source/common/protobuf", - "@envoy_api//envoy/api/v2:discovery_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -155,21 +154,21 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/extensions/access_loggers:well_known_names", "//source/extensions/filters/http:well_known_names", - "@envoy_api//envoy/config/accesslog/v2:file_cc", - "@envoy_api//envoy/config/filter/http/buffer/v2:buffer_cc", - "@envoy_api//envoy/config/filter/http/fault/v2:fault_cc", - "@envoy_api//envoy/config/filter/http/gzip/v2:gzip_cc", - "@envoy_api//envoy/config/filter/http/health_check/v2:health_check_cc", - "@envoy_api//envoy/config/filter/http/lua/v2:lua_cc", - "@envoy_api//envoy/config/filter/http/rate_limit/v2:rate_limit_cc", - "@envoy_api//envoy/config/filter/http/router/v2:router_cc", - "@envoy_api//envoy/config/filter/http/squash/v2:squash_cc", - "@envoy_api//envoy/config/filter/http/transcoder/v2:transcoder_cc", - "@envoy_api//envoy/config/filter/network/client_ssl_auth/v2:client_ssl_auth_cc", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", - "@envoy_api//envoy/config/filter/network/mongo_proxy/v2:mongo_proxy_cc", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", - "@envoy_api//envoy/config/filter/network/tcp_proxy/v2:tcp_proxy_cc", + "@envoy_api//envoy/config/accesslog/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/buffer/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/fault/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/gzip/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/health_check/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/lua/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/rate_limit/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/router/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/squash/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/transcoder/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/client_ssl_auth/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/mongo_proxy/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/tcp_proxy/v2:pkg_cc_proto", ], ) @@ -200,7 +199,7 @@ envoy_cc_library( "//source/common/common:minimal_logger_lib", "//source/common/grpc:common_lib", "//source/common/protobuf", - "@envoy_api//envoy/api/v2:discovery_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -213,7 +212,7 @@ envoy_cc_library( "//include/envoy/config:subscription_interface", "//include/envoy/event:dispatcher_interface", "//include/envoy/grpc:async_client_interface", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -248,7 +247,7 @@ envoy_cc_library( "//source/common/http:rest_api_fetcher_lib", "//source/common/protobuf", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -271,7 +270,7 @@ envoy_cc_library( "//include/envoy/registry", "//source/common/common:assert_lib", "//source/common/protobuf", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -281,7 +280,7 @@ envoy_cc_library( hdrs = ["pausable_ack_queue.h"], deps = [ "//source/common/common:assert_lib", - "@envoy_api//envoy/api/v2:discovery_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -289,10 +288,8 @@ envoy_cc_library( name = "protobuf_link_hacks", hdrs = ["protobuf_link_hacks.h"], deps = [ - "@envoy_api//envoy/service/discovery/v2:ads_cc", - "@envoy_api//envoy/service/discovery/v2:rtds_cc", - "@envoy_api//envoy/service/discovery/v2:sds_cc", - "@envoy_api//envoy/service/ratelimit/v2:rls_cc", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", + "@envoy_api//envoy/service/ratelimit/v2:pkg_cc_proto", ], ) @@ -303,7 +300,7 @@ envoy_cc_library( deps = [ ":json_utility_lib", "//include/envoy/json:json_object_interface", - "@envoy_api//envoy/api/v2/core:protocol_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -320,7 +317,7 @@ envoy_cc_library( "//source/common/config:utility_lib", "//source/common/json:config_schemas_lib", "//source/extensions/filters/http:well_known_names", - "@envoy_api//envoy/api/v2:rds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -334,7 +331,7 @@ envoy_cc_library( "//source/common/common:hex_lib", "//source/common/crypto:utility_lib", "//source/common/http:utility_lib", - "@envoy_api//envoy/api/v2/core:http_uri_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -348,7 +345,7 @@ envoy_cc_library( name = "runtime_utility_lib", srcs = ["runtime_utility.cc"], hdrs = ["runtime_utility.h"], - deps = ["@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc"], + deps = ["@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto"], ) envoy_cc_library( @@ -367,7 +364,7 @@ envoy_cc_library( "//include/envoy/config:subscription_interface", "//include/envoy/upstream:cluster_manager_interface", "//source/common/protobuf", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -378,12 +375,8 @@ envoy_cc_library( deps = [ "//source/common/grpc:common_lib", "//source/common/protobuf", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2:lds_cc", - "@envoy_api//envoy/api/v2:rds_cc", - "@envoy_api//envoy/api/v2:srds_cc", - "@envoy_api//envoy/service/discovery/v2:rtds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -412,8 +405,8 @@ envoy_cc_library( "//source/common/stats:stats_lib", "//source/common/stats:stats_matcher_lib", "//source/common/stats:tag_producer_lib", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) diff --git a/source/common/http/BUILD b/source/common/http/BUILD index 05553bd52916..7650f165a397 100644 --- a/source/common/http/BUILD +++ b/source/common/http/BUILD @@ -90,7 +90,7 @@ envoy_cc_library( "//source/common/common:enum_to_int", "//source/common/common:utility_lib", "//source/common/stats:symbol_table_lib", - "@envoy_api//envoy/type:http_status_cc", + "@envoy_api//envoy/type:pkg_cc_proto", ], ) @@ -220,7 +220,7 @@ envoy_cc_library( deps = [ ":utility_lib", "//include/envoy/http:hash_policy_interface", - "@envoy_api//envoy/api/v2/route:route_cc", + "@envoy_api//envoy/api/v2/route:pkg_cc_proto", ], ) @@ -319,8 +319,7 @@ envoy_cc_library( "//source/common/json:json_loader_lib", "//source/common/network:utility_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2/core:http_uri_cc", - "@envoy_api//envoy/api/v2/core:protocol_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -337,8 +336,8 @@ envoy_cc_library( "//source/common/common:utility_lib", "//source/common/config:rds_json_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2/route:route_cc", - "@envoy_api//envoy/type:range_cc", + "@envoy_api//envoy/api/v2/route:pkg_cc_proto", + "@envoy_api//envoy/type:pkg_cc_proto", ], ) diff --git a/source/common/http/async_client_impl.cc b/source/common/http/async_client_impl.cc index e69f02ef0f66..775a48edd627 100644 --- a/source/common/http/async_client_impl.cc +++ b/source/common/http/async_client_impl.cc @@ -37,7 +37,7 @@ AsyncClientImpl::AsyncClientImpl(Upstream::ClusterInfoConstSharedPtr cluster, Router::ShadowWriterPtr&& shadow_writer, Http::Context& http_context) : cluster_(cluster), config_("http.async-client.", local_info, stats_store, cm, runtime, random, - std::move(shadow_writer), true, false, false, {}, + std::move(shadow_writer), true, false, false, false, {}, dispatcher.timeSource(), http_context), dispatcher_(dispatcher) {} diff --git a/source/common/network/BUILD b/source/common/network/BUILD index ad1bfb18dce9..76349cd71e1e 100644 --- a/source/common/network/BUILD +++ b/source/common/network/BUILD @@ -52,7 +52,7 @@ envoy_cc_library( "//include/envoy/network:address_interface", "//source/common/common:assert_lib", "//source/common/common:utility_lib", - "@envoy_api//envoy/api/v2/core:address_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -192,7 +192,7 @@ envoy_cc_library( "//source/common/buffer:buffer_lib", "//source/common/common:empty_string", "//source/common/http:headers_lib", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -208,7 +208,7 @@ envoy_cc_library( "//source/common/config:well_known_names", "//source/common/network:address_lib", "//source/common/protobuf", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -254,7 +254,7 @@ envoy_cc_library( ":socket_option_lib", "//include/envoy/network:listen_socket_interface", "//source/common/common:logger_lib", - "@envoy_api//envoy/api/v2/core:address_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -272,8 +272,7 @@ envoy_cc_library( "//source/common/common:cleanup_lib", "//source/common/common:utility_lib", "//source/common/protobuf", - "@envoy_api//envoy/api/v2/core:address_cc", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/source/common/protobuf/BUILD b/source/common/protobuf/BUILD index 4feeec55c982..0df251bd4171 100644 --- a/source/common/protobuf/BUILD +++ b/source/common/protobuf/BUILD @@ -62,6 +62,6 @@ envoy_cc_library( "//source/common/common:hash_lib", "//source/common/common:utility_lib", "//source/common/json:json_loader_lib", - "@envoy_api//envoy/type:percent_cc", + "@envoy_api//envoy/type:pkg_cc_proto", ], ) diff --git a/source/common/router/BUILD b/source/common/router/BUILD index afe8726a297b..bc9a864a5651 100644 --- a/source/common/router/BUILD +++ b/source/common/router/BUILD @@ -63,7 +63,7 @@ envoy_cc_library( "//source/common/config:rds_json_lib", "//source/common/http:headers_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2:rds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -113,7 +113,7 @@ envoy_cc_library( "//source/common/init:target_lib", "//source/common/protobuf:utility_lib", "//source/common/router:route_config_update_impl_lib", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) @@ -142,9 +142,9 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/common/router:route_config_update_impl_lib", "//source/common/router:vhds_lib", - "@envoy_api//envoy/admin/v2alpha:config_dump_cc", - "@envoy_api//envoy/api/v2:rds_cc", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) @@ -160,8 +160,8 @@ envoy_cc_library( "//include/envoy/router:rds_interface", "//include/envoy/router:scopes_interface", "//include/envoy/thread_local:thread_local_interface", - "@envoy_api//envoy/api/v2:srds_cc", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) @@ -182,8 +182,8 @@ envoy_cc_library( "//source/common/config:config_provider_lib", "//source/common/init:manager_lib", "//source/common/init:watcher_lib", - "@envoy_api//envoy/admin/v2alpha:config_dump_cc", - "@envoy_api//envoy/api/v2:srds_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -256,7 +256,7 @@ envoy_cc_library( "//source/common/stream_info:stream_info_lib", "//source/common/tracing:http_tracer_lib", "//source/common/upstream:load_balancer_lib", - "@envoy_api//envoy/config/filter/http/router/v2:router_cc", + "@envoy_api//envoy/config/filter/http/router/v2:pkg_cc_proto", ], ) diff --git a/source/common/router/router.cc b/source/common/router/router.cc index 83e59e15d7db..db25e4f0a799 100644 --- a/source/common/router/router.cc +++ b/source/common/router/router.cc @@ -123,7 +123,8 @@ bool FilterUtility::shouldShadow(const ShadowPolicy& policy, Runtime::Loader& ru FilterUtility::TimeoutData FilterUtility::finalTimeout(const RouteEntry& route, Http::HeaderMap& request_headers, bool insert_envoy_expected_request_timeout_ms, bool grpc_request, - bool per_try_timeout_hedging_enabled) { + bool per_try_timeout_hedging_enabled, + bool respect_expected_rq_timeout) { // See if there is a user supplied timeout in a request header. If there is we take that. // Otherwise if the request is gRPC and a maximum gRPC timeout is configured we use the timeout // in the gRPC headers (or infinity when gRPC headers have no timeout), but cap that timeout to @@ -153,13 +154,29 @@ FilterUtility::finalTimeout(const RouteEntry& route, Http::HeaderMap& request_he } timeout.per_try_timeout_ = route.retryPolicy().perTryTimeout(); - Http::HeaderEntry* header_timeout_entry = request_headers.EnvoyUpstreamRequestTimeoutMs(); uint64_t header_timeout; - if (header_timeout_entry) { - if (absl::SimpleAtoi(header_timeout_entry->value().getStringView(), &header_timeout)) { - timeout.global_timeout_ = std::chrono::milliseconds(header_timeout); + + if (respect_expected_rq_timeout) { + // Check if there is timeout set by egress Envoy. + // If present, use that value as route timeout and don't override + // *x-envoy-expected-rq-timeout-ms* header. At this point *x-envoy-upstream-rq-timeout-ms* + // header should have been sanitized by egress Envoy. + Http::HeaderEntry* header_expected_timeout_entry = + request_headers.EnvoyExpectedRequestTimeoutMs(); + if (header_expected_timeout_entry) { + trySetGlobalTimeout(header_expected_timeout_entry, timeout); + } else { + Http::HeaderEntry* header_timeout_entry = request_headers.EnvoyUpstreamRequestTimeoutMs(); + + if (trySetGlobalTimeout(header_timeout_entry, timeout)) { + request_headers.removeEnvoyUpstreamRequestTimeoutMs(); + } + } + } else { + Http::HeaderEntry* header_timeout_entry = request_headers.EnvoyUpstreamRequestTimeoutMs(); + if (trySetGlobalTimeout(header_timeout_entry, timeout)) { + request_headers.removeEnvoyUpstreamRequestTimeoutMs(); } - request_headers.removeEnvoyUpstreamRequestTimeoutMs(); } // See if there is a per try/retry timeout. If it's >= global we just ignore it. @@ -200,6 +217,18 @@ FilterUtility::finalTimeout(const RouteEntry& route, Http::HeaderMap& request_he return timeout; } +bool FilterUtility::trySetGlobalTimeout(const Http::HeaderEntry* header_timeout_entry, + TimeoutData& timeout) { + if (header_timeout_entry) { + uint64_t header_timeout; + if (absl::SimpleAtoi(header_timeout_entry->value().getStringView(), &header_timeout)) { + timeout.global_timeout_ = std::chrono::milliseconds(header_timeout); + } + return true; + } + return false; +} + FilterUtility::HedgingParams FilterUtility::finalHedgingParams(const RouteEntry& route, Http::HeaderMap& request_headers) { HedgingParams hedging_params; @@ -486,7 +515,8 @@ Http::FilterHeadersStatus Filter::decodeHeaders(Http::HeaderMap& headers, bool e hedging_params_ = FilterUtility::finalHedgingParams(*route_entry_, headers); timeout_ = FilterUtility::finalTimeout(*route_entry_, headers, !config_.suppress_envoy_headers_, - grpc_request_, hedging_params_.hedge_on_per_try_timeout_); + grpc_request_, hedging_params_.hedge_on_per_try_timeout_, + config_.respect_expected_rq_timeout_); // If this header is set with any value, use an alternate response code on timeout if (headers.EnvoyUpstreamRequestTimeoutAltResponse()) { diff --git a/source/common/router/router.h b/source/common/router/router.h index 419d58fb0ccd..4dfeb2f7ae8f 100644 --- a/source/common/router/router.h +++ b/source/common/router/router.h @@ -140,7 +140,11 @@ class FilterUtility { */ static TimeoutData finalTimeout(const RouteEntry& route, Http::HeaderMap& request_headers, bool insert_envoy_expected_request_timeout_ms, bool grpc_request, - bool per_try_timeout_hedging_enabled); + bool per_try_timeout_hedging_enabled, + bool respect_expected_rq_timeout); + + static bool trySetGlobalTimeout(const Http::HeaderEntry* header_timeout_entry, + TimeoutData& timeout); /** * Determine the final hedging settings after applying randomized behavior. @@ -161,12 +165,14 @@ class FilterConfig { Stats::Scope& scope, Upstream::ClusterManager& cm, Runtime::Loader& runtime, Runtime::RandomGenerator& random, ShadowWriterPtr&& shadow_writer, bool emit_dynamic_stats, bool start_child_span, bool suppress_envoy_headers, + bool respect_expected_rq_timeout, const Protobuf::RepeatedPtrField& strict_check_headers, TimeSource& time_source, Http::Context& http_context) : scope_(scope), local_info_(local_info), cm_(cm), runtime_(runtime), random_(random), stats_{ALL_ROUTER_STATS(POOL_COUNTER_PREFIX(scope, stat_prefix))}, emit_dynamic_stats_(emit_dynamic_stats), start_child_span_(start_child_span), - suppress_envoy_headers_(suppress_envoy_headers), http_context_(http_context), + suppress_envoy_headers_(suppress_envoy_headers), + respect_expected_rq_timeout_(respect_expected_rq_timeout), http_context_(http_context), stat_name_pool_(scope_.symbolTable()), retry_(stat_name_pool_.add("retry")), zone_name_(stat_name_pool_.add(local_info_.zoneName())), empty_stat_name_(stat_name_pool_.add("")), shadow_writer_(std::move(shadow_writer)), @@ -186,8 +192,8 @@ class FilterConfig { context.runtime(), context.random(), std::move(shadow_writer), PROTOBUF_GET_WRAPPED_OR_DEFAULT(config, dynamic_stats, true), config.start_child_span(), config.suppress_envoy_headers(), - config.strict_check_headers(), context.api().timeSource(), - context.httpContext()) { + config.respect_expected_rq_timeout(), config.strict_check_headers(), + context.api().timeSource(), context.httpContext()) { for (const auto& upstream_log : config.upstream_log()) { upstream_logs_.push_back(AccessLog::AccessLogFactory::fromProto(upstream_log, context)); } @@ -207,6 +213,7 @@ class FilterConfig { const bool emit_dynamic_stats_; const bool start_child_span_; const bool suppress_envoy_headers_; + const bool respect_expected_rq_timeout_; // TODO(xyu-stripe): Make this a bitset to keep cluster memory footprint down. HeaderVectorPtr strict_check_headers_; std::list upstream_logs_; diff --git a/source/common/runtime/BUILD b/source/common/runtime/BUILD index 2cbf39b5d36a..9192cf60b01c 100644 --- a/source/common/runtime/BUILD +++ b/source/common/runtime/BUILD @@ -37,8 +37,8 @@ envoy_cc_library( "//source/common/init:target_lib", "//source/common/protobuf:message_validator_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", - "@envoy_api//envoy/service/discovery/v2:rtds_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) diff --git a/source/common/secret/BUILD b/source/common/secret/BUILD index b584cd57c7da..66820d714cc3 100644 --- a/source/common/secret/BUILD +++ b/source/common/secret/BUILD @@ -19,8 +19,8 @@ envoy_cc_library( "//include/envoy/server:transport_socket_config_interface", "//source/common/common:assert_lib", "//source/common/common:minimal_logger_lib", - "@envoy_api//envoy/admin/v2alpha:config_dump_cc", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) @@ -32,7 +32,7 @@ envoy_cc_library( "//include/envoy/secret:secret_provider_interface", "//source/common/ssl:certificate_validation_context_config_impl_lib", "//source/common/ssl:tls_certificate_config_impl_lib", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) diff --git a/source/common/ssl/BUILD b/source/common/ssl/BUILD index ebbe62647302..290d53c96640 100644 --- a/source/common/ssl/BUILD +++ b/source/common/ssl/BUILD @@ -18,7 +18,7 @@ envoy_cc_library( "//include/envoy/ssl/private_key:private_key_interface", "//source/common/common:empty_string", "//source/common/config:datasource_lib", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) @@ -31,6 +31,6 @@ envoy_cc_library( "//include/envoy/ssl:certificate_validation_context_config_interface", "//source/common/common:empty_string", "//source/common/config:datasource_lib", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) diff --git a/source/common/stats/BUILD b/source/common/stats/BUILD index 224c006fc395..36325b71d36f 100644 --- a/source/common/stats/BUILD +++ b/source/common/stats/BUILD @@ -146,7 +146,7 @@ envoy_cc_library( "//source/common/common:utility_lib", "//source/common/protobuf", "//source/common/singleton:const_singleton", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) @@ -203,7 +203,7 @@ envoy_cc_library( "//source/common/common:perf_annotation_lib", "//source/common/config:well_known_names", "//source/common/protobuf", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) @@ -215,7 +215,7 @@ envoy_cc_library( "//include/envoy/stats:stats_interface", "//source/common/common:matchers_lib", "//source/common/protobuf", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) diff --git a/source/common/tcp_proxy/BUILD b/source/common/tcp_proxy/BUILD index adec34a52684..29e8f2824900 100644 --- a/source/common/tcp_proxy/BUILD +++ b/source/common/tcp_proxy/BUILD @@ -42,6 +42,6 @@ envoy_cc_library( "//source/common/router:metadatamatchcriteria_lib", "//source/common/stream_info:stream_info_lib", "//source/common/upstream:load_balancer_lib", - "@envoy_api//envoy/config/filter/network/tcp_proxy/v2:tcp_proxy_cc", + "@envoy_api//envoy/config/filter/network/tcp_proxy/v2:pkg_cc_proto", ], ) diff --git a/source/common/upstream/BUILD b/source/common/upstream/BUILD index cf2e800ef622..1111568b3ecc 100644 --- a/source/common/upstream/BUILD +++ b/source/common/upstream/BUILD @@ -22,8 +22,8 @@ envoy_cc_library( "//source/common/config:resources_lib", "//source/common/config:utility_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2/cluster:outlier_detection_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/api/v2/cluster:pkg_cc_proto", ], ) @@ -63,8 +63,8 @@ envoy_cc_library( "//source/common/tcp:conn_pool_lib", "//source/common/upstream:priority_conn_pool_map_impl_lib", "//source/common/upstream:upstream_lib", - "@envoy_api//envoy/admin/v2alpha:config_dump_cc", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -121,8 +121,8 @@ envoy_cc_library( deps = [ "//include/envoy/upstream:health_checker_interface", "//source/common/router:router_lib", - "@envoy_api//envoy/api/v2/core:health_check_cc", - "@envoy_api//envoy/data/core/v2alpha:health_check_event_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/data/core/v2alpha:pkg_cc_proto", ], ) @@ -178,7 +178,7 @@ envoy_cc_library( "//include/envoy/upstream:cluster_manager_interface", "//source/common/common:minimal_logger_lib", "//source/common/grpc:async_client_lib", - "@envoy_api//envoy/service/load_stats/v2:lrs_cc", + "@envoy_api//envoy/service/load_stats/v2:pkg_cc_proto", ], ) @@ -204,7 +204,7 @@ envoy_cc_library( "//source/common/network:resolver_lib", "//source/extensions/transport_sockets:well_known_names", "//source/server:transport_socket_config_lib", - "@envoy_api//envoy/service/discovery/v2:hds_cc", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -267,9 +267,9 @@ envoy_cc_library( "//source/common/common:utility_lib", "//source/common/http:codes_lib", "//source/common/protobuf", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2/cluster:outlier_detection_cc", - "@envoy_api//envoy/data/cluster/v2alpha:outlier_detection_event_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/api/v2/cluster:pkg_cc_proto", + "@envoy_api//envoy/data/cluster/v2alpha:pkg_cc_proto", ], ) @@ -336,9 +336,9 @@ envoy_cc_library( "//source/common/network:utility_lib", "//source/common/protobuf:utility_lib", "//source/extensions/clusters:well_known_names", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/api/v2/endpoint:endpoint_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/api/v2/endpoint:pkg_cc_proto", ], ) @@ -391,7 +391,7 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/extensions/transport_sockets:well_known_names", "//source/server:transport_socket_config_lib", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -445,8 +445,8 @@ envoy_cc_library( "//source/common/stats:isolated_store_lib", "//source/common/stats:stats_lib", "//source/server:transport_socket_config_lib", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/api/v2/endpoint:endpoint_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/api/v2/endpoint:pkg_cc_proto", ], ) @@ -476,7 +476,7 @@ envoy_cc_library( "//source/extensions/clusters:well_known_names", "//source/extensions/transport_sockets:well_known_names", "//source/server:transport_socket_config_lib", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -512,7 +512,7 @@ envoy_cc_library( "//source/common/stats:stats_lib", "//source/extensions/clusters:well_known_names", "//source/server:transport_socket_config_lib", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/api/v2/endpoint:endpoint_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/api/v2/endpoint:pkg_cc_proto", ], ) diff --git a/source/exe/main_common.cc b/source/exe/main_common.cc index ed76b4381847..c91f5144bd03 100644 --- a/source/exe/main_common.cc +++ b/source/exe/main_common.cc @@ -77,9 +77,9 @@ MainCommonBase::MainCommonBase(const OptionsImpl& options, Event::TimeSystem& ti stats_store_ = std::make_unique(stats_allocator_); server_ = std::make_unique( - options_, time_system, local_address, listener_hooks, *restarter_, *stats_store_, - access_log_lock, component_factory, std::move(random_generator), *tls_, thread_factory_, - file_system_, std::move(process_context)); + *init_manager_, options_, time_system, local_address, listener_hooks, *restarter_, + *stats_store_, access_log_lock, component_factory, std::move(random_generator), *tls_, + thread_factory_, file_system_, std::move(process_context)); break; } diff --git a/source/exe/main_common.h b/source/exe/main_common.h index 72d4e041374d..d2141061854a 100644 --- a/source/exe/main_common.h +++ b/source/exe/main_common.h @@ -82,6 +82,7 @@ class MainCommonBase { std::unique_ptr restarter_; std::unique_ptr stats_store_; std::unique_ptr logging_context_; + std::unique_ptr init_manager_{std::make_unique("Server")}; std::unique_ptr server_; private: diff --git a/source/extensions/access_loggers/file/BUILD b/source/extensions/access_loggers/file/BUILD index 3ea8c8819c30..7a935f7223ee 100644 --- a/source/extensions/access_loggers/file/BUILD +++ b/source/extensions/access_loggers/file/BUILD @@ -31,6 +31,6 @@ envoy_cc_library( "//source/common/access_log:access_log_formatter_lib", "//source/common/protobuf", "//source/extensions/access_loggers:well_known_names", - "@envoy_api//envoy/config/accesslog/v2:file_cc", + "@envoy_api//envoy/config/accesslog/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/access_loggers/grpc/BUILD b/source/extensions/access_loggers/grpc/BUILD index e7ad7b299588..f663d1c46913 100644 --- a/source/extensions/access_loggers/grpc/BUILD +++ b/source/extensions/access_loggers/grpc/BUILD @@ -36,9 +36,9 @@ envoy_cc_library( "//source/common/grpc:async_client_lib", "//source/common/grpc:typed_async_client_lib", "//source/extensions/access_loggers/common:access_log_base", - "@envoy_api//envoy/config/accesslog/v2:als_cc", - "@envoy_api//envoy/config/filter/accesslog/v2:accesslog_cc", - "@envoy_api//envoy/service/accesslog/v2:als_cc", + "@envoy_api//envoy/config/accesslog/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/accesslog/v2:pkg_cc_proto", + "@envoy_api//envoy/service/accesslog/v2:pkg_cc_proto", ], ) @@ -51,7 +51,7 @@ envoy_cc_library( "//source/common/network:utility_lib", "//source/common/stream_info:stream_info_lib", "//source/common/stream_info:utility_lib", - "@envoy_api//envoy/data/accesslog/v2:accesslog_cc", + "@envoy_api//envoy/data/accesslog/v2:pkg_cc_proto", ], ) @@ -82,7 +82,7 @@ envoy_cc_library( deps = [ "//source/common/common:assert_lib", "//source/common/protobuf", - "@envoy_api//envoy/service/accesslog/v2:als_cc", + "@envoy_api//envoy/service/accesslog/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/clusters/dynamic_forward_proxy/BUILD b/source/extensions/clusters/dynamic_forward_proxy/BUILD index 51ba531f70b7..feaa5cd8bb31 100644 --- a/source/extensions/clusters/dynamic_forward_proxy/BUILD +++ b/source/extensions/clusters/dynamic_forward_proxy/BUILD @@ -19,6 +19,6 @@ envoy_cc_library( "//source/extensions/clusters:well_known_names", "//source/extensions/common/dynamic_forward_proxy:dns_cache_interface", "//source/extensions/common/dynamic_forward_proxy:dns_cache_manager_impl", - "@envoy_api//envoy/config/cluster/dynamic_forward_proxy/v2alpha:cluster_cc", + "@envoy_api//envoy/config/cluster/dynamic_forward_proxy/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/clusters/redis/BUILD b/source/extensions/clusters/redis/BUILD index 7608fa092f9a..c27b2bc5eaab 100644 --- a/source/extensions/clusters/redis/BUILD +++ b/source/extensions/clusters/redis/BUILD @@ -66,6 +66,6 @@ envoy_cc_library( "//source/extensions/filters/network/redis_proxy:config_interface", "//source/extensions/transport_sockets/raw_buffer:config", "//source/server:transport_socket_config_lib", - "@envoy_api//envoy/config/cluster/redis:redis_cluster_cc", + "@envoy_api//envoy/config/cluster/redis:pkg_cc_proto", ], ) diff --git a/source/extensions/common/dynamic_forward_proxy/BUILD b/source/extensions/common/dynamic_forward_proxy/BUILD index 0b3ddf4492b3..56f351d4f236 100644 --- a/source/extensions/common/dynamic_forward_proxy/BUILD +++ b/source/extensions/common/dynamic_forward_proxy/BUILD @@ -15,7 +15,7 @@ envoy_cc_library( "//include/envoy/event:dispatcher_interface", "//include/envoy/singleton:manager_interface", "//include/envoy/thread_local:thread_local_interface", - "@envoy_api//envoy/config/common/dynamic_forward_proxy/v2alpha:dns_cache_cc", + "@envoy_api//envoy/config/common/dynamic_forward_proxy/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/common/tap/BUILD b/source/extensions/common/tap/BUILD index 92093202cadf..62841113af4a 100644 --- a/source/extensions/common/tap/BUILD +++ b/source/extensions/common/tap/BUILD @@ -14,8 +14,8 @@ envoy_cc_library( deps = [ ":tap_matcher", "//include/envoy/http:header_map_interface", - "@envoy_api//envoy/data/tap/v2alpha:wrapper_cc", - "@envoy_api//envoy/service/tap/v2alpha:common_cc", + "@envoy_api//envoy/data/tap/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/service/tap/v2alpha:pkg_cc_proto", ], ) @@ -36,7 +36,7 @@ envoy_cc_library( hdrs = ["tap_matcher.h"], deps = [ "//source/common/http:header_utility_lib", - "@envoy_api//envoy/service/tap/v2alpha:common_cc", + "@envoy_api//envoy/service/tap/v2alpha:pkg_cc_proto", ], ) @@ -49,7 +49,7 @@ envoy_cc_library( "//include/envoy/server:admin_interface", "//include/envoy/singleton:manager_interface", "//source/common/buffer:buffer_lib", - "@envoy_api//envoy/admin/v2alpha:tap_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", ], ) @@ -60,6 +60,6 @@ envoy_cc_library( deps = [ "//include/envoy/thread_local:thread_local_interface", "//source/extensions/common/tap:admin", - "@envoy_api//envoy/config/common/tap/v2alpha:common_cc", + "@envoy_api//envoy/config/common/tap/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/common/ext_authz/BUILD b/source/extensions/filters/common/ext_authz/BUILD index 61b2abade1cb..ca34b4274c7b 100644 --- a/source/extensions/filters/common/ext_authz/BUILD +++ b/source/extensions/filters/common/ext_authz/BUILD @@ -14,7 +14,7 @@ envoy_cc_library( deps = [ "//include/envoy/http:codes_interface", "//source/common/tracing:http_tracer_lib", - "@envoy_api//envoy/service/auth/v2:external_auth_cc", + "@envoy_api//envoy/service/auth/v2:pkg_cc_proto", ], ) @@ -47,7 +47,7 @@ envoy_cc_library( # removed unless v2alpha is fully deprecated, otherwise linker will drop the object file # associated with v2alpha/external_auth.pb.cc causing FindMessageTypeByName() to always return # nullptr when looking up for envoy.service.auth.v2alpha.Authorization.Check. - "@envoy_api//envoy/service/auth/v2alpha:external_auth_cc", + "@envoy_api//envoy/service/auth/v2alpha:pkg_cc_proto", ], ) @@ -64,7 +64,7 @@ envoy_cc_library( "//source/common/http:async_client_lib", "//source/common/http:codes_lib", "//source/common/tracing:http_tracer_lib", - "@envoy_api//envoy/config/filter/http/ext_authz/v2:ext_authz_cc", + "@envoy_api//envoy/config/filter/http/ext_authz/v2:pkg_cc_proto", ], ) @@ -78,6 +78,6 @@ envoy_cc_library( "//include/envoy/http:filter_interface", "//include/envoy/upstream:cluster_manager_interface", "//source/common/grpc:async_client_lib", - "@envoy_api//envoy/service/auth/v2:external_auth_cc", + "@envoy_api//envoy/service/auth/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/common/fault/BUILD b/source/extensions/filters/common/fault/BUILD index a9d887673c5a..d36e361b46e0 100644 --- a/source/extensions/filters/common/fault/BUILD +++ b/source/extensions/filters/common/fault/BUILD @@ -16,6 +16,6 @@ envoy_cc_library( "//include/envoy/http:header_map_interface", "//source/common/http:headers_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/config/filter/fault/v2:fault_cc", + "@envoy_api//envoy/config/filter/fault/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/common/ratelimit/BUILD b/source/extensions/filters/common/ratelimit/BUILD index 9d39e1980093..08668a695ed3 100644 --- a/source/extensions/filters/common/ratelimit/BUILD +++ b/source/extensions/filters/common/ratelimit/BUILD @@ -25,9 +25,9 @@ envoy_cc_library( "//source/common/grpc:typed_async_client_lib", "//source/common/http:headers_lib", "//source/common/tracing:http_tracer_lib", - "@envoy_api//envoy/api/v2/ratelimit:ratelimit_cc", - "@envoy_api//envoy/config/ratelimit/v2:rls_cc", - "@envoy_api//envoy/service/ratelimit/v2:rls_cc", + "@envoy_api//envoy/api/v2/ratelimit:pkg_cc_proto", + "@envoy_api//envoy/config/ratelimit/v2:pkg_cc_proto", + "@envoy_api//envoy/service/ratelimit/v2:pkg_cc_proto", ], ) @@ -40,7 +40,7 @@ envoy_cc_library( "//include/envoy/singleton:manager_interface", "//include/envoy/tracing:http_tracer_interface", "//source/common/stats:symbol_table_lib", - "@envoy_api//envoy/config/ratelimit/v2:rls_cc", + "@envoy_api//envoy/config/ratelimit/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/common/rbac/BUILD b/source/extensions/filters/common/rbac/BUILD index 94398324482f..3cc3f0e01cf3 100644 --- a/source/extensions/filters/common/rbac/BUILD +++ b/source/extensions/filters/common/rbac/BUILD @@ -16,8 +16,8 @@ envoy_cc_library( ":engine_lib", "//include/envoy/stats:stats_macros", "//source/common/singleton:const_singleton", - "@envoy_api//envoy/config/filter/http/rbac/v2:rbac_cc", - "@envoy_api//envoy/config/filter/network/rbac/v2:rbac_cc", + "@envoy_api//envoy/config/filter/http/rbac/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/rbac/v2:pkg_cc_proto", ], ) @@ -34,8 +34,8 @@ envoy_cc_library( "//source/common/http:header_utility_lib", "//source/common/network:cidr_range_lib", "//source/extensions/filters/common/expr:evaluator_lib", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/config/rbac/v2:rbac_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/config/rbac/v2:pkg_cc_proto", ], ) @@ -56,7 +56,7 @@ envoy_cc_library( deps = [ "//source/extensions/filters/common/rbac:engine_interface", "//source/extensions/filters/common/rbac:matchers_lib", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/config/filter/http/rbac/v2:rbac_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/rbac/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/adaptive_concurrency/BUILD b/source/extensions/filters/http/adaptive_concurrency/BUILD index cc73c3ce50d0..2b12b6cdc9d0 100644 --- a/source/extensions/filters/http/adaptive_concurrency/BUILD +++ b/source/extensions/filters/http/adaptive_concurrency/BUILD @@ -21,7 +21,7 @@ envoy_cc_library( "//source/extensions/filters/http:well_known_names", "//source/extensions/filters/http/adaptive_concurrency/concurrency_controller:concurrency_controller_lib", "//source/extensions/filters/http/common:pass_through_filter_lib", - "@envoy_api//envoy/config/filter/http/adaptive_concurrency/v2alpha:adaptive_concurrency_cc", + "@envoy_api//envoy/config/filter/http/adaptive_concurrency/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/adaptive_concurrency/concurrency_controller/BUILD b/source/extensions/filters/http/adaptive_concurrency/concurrency_controller/BUILD index 604221865c11..139b72f0159c 100644 --- a/source/extensions/filters/http/adaptive_concurrency/concurrency_controller/BUILD +++ b/source/extensions/filters/http/adaptive_concurrency/concurrency_controller/BUILD @@ -28,6 +28,6 @@ envoy_cc_library( "//source/common/runtime:runtime_lib", "//source/common/stats:isolated_store_lib", "//source/common/stats:stats_lib", - "@envoy_api//envoy/config/filter/http/adaptive_concurrency/v2alpha:adaptive_concurrency_cc", + "@envoy_api//envoy/config/filter/http/adaptive_concurrency/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/buffer/BUILD b/source/extensions/filters/http/buffer/BUILD index bebfd70adf19..79f6d192cfc0 100644 --- a/source/extensions/filters/http/buffer/BUILD +++ b/source/extensions/filters/http/buffer/BUILD @@ -28,7 +28,7 @@ envoy_cc_library( "//source/common/http:utility_lib", "//source/common/runtime:runtime_lib", "//source/extensions/filters/http:well_known_names", - "@envoy_api//envoy/config/filter/http/buffer/v2:buffer_cc", + "@envoy_api//envoy/config/filter/http/buffer/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/common/BUILD b/source/extensions/filters/http/common/BUILD index b8c8a46b3b43..c9721a2a482c 100644 --- a/source/extensions/filters/http/common/BUILD +++ b/source/extensions/filters/http/common/BUILD @@ -42,6 +42,6 @@ envoy_cc_library( deps = [ "//include/envoy/upstream:cluster_manager_interface", "//source/common/http:utility_lib", - "@envoy_api//envoy/api/v2/core:http_uri_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/csrf/BUILD b/source/extensions/filters/http/csrf/BUILD index f33294cea8e7..69138fbfb4d3 100644 --- a/source/extensions/filters/http/csrf/BUILD +++ b/source/extensions/filters/http/csrf/BUILD @@ -23,7 +23,7 @@ envoy_cc_library( "//source/common/http:headers_lib", "//source/common/http:utility_lib", "//source/extensions/filters/http:well_known_names", - "@envoy_api//envoy/config/filter/http/csrf/v2:csrf_cc", + "@envoy_api//envoy/config/filter/http/csrf/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/csrf/csrf_filter.cc b/source/extensions/filters/http/csrf/csrf_filter.cc index ee8db9074c1a..898227c858f2 100644 --- a/source/extensions/filters/http/csrf/csrf_filter.cc +++ b/source/extensions/filters/http/csrf/csrf_filter.cc @@ -126,7 +126,7 @@ bool CsrfFilter::isValid(const absl::string_view source_origin, Http::HeaderMap& return true; } - for (const auto& additional_origin : policy_->additional_origins()) { + for (const auto& additional_origin : policy_->additionalOrigins()) { if (additional_origin->match(source_origin)) { return true; } diff --git a/source/extensions/filters/http/csrf/csrf_filter.h b/source/extensions/filters/http/csrf/csrf_filter.h index 0a36058f73e7..a9553129abf4 100644 --- a/source/extensions/filters/http/csrf/csrf_filter.h +++ b/source/extensions/filters/http/csrf/csrf_filter.h @@ -58,7 +58,7 @@ class CsrfPolicy : public Router::RouteSpecificFilterConfig { shadow_enabled.default_value()); } - const std::vector& additional_origins() const { + const std::vector& additionalOrigins() const { return additional_origins_; }; diff --git a/source/extensions/filters/http/dynamic_forward_proxy/BUILD b/source/extensions/filters/http/dynamic_forward_proxy/BUILD index a11ce93fbdec..2e561ab1a71f 100644 --- a/source/extensions/filters/http/dynamic_forward_proxy/BUILD +++ b/source/extensions/filters/http/dynamic_forward_proxy/BUILD @@ -16,7 +16,7 @@ envoy_cc_library( "//include/envoy/http:filter_interface", "//source/extensions/common/dynamic_forward_proxy:dns_cache_interface", "//source/extensions/filters/http/common:pass_through_filter_lib", - "@envoy_api//envoy/config/filter/http/dynamic_forward_proxy/v2alpha:dynamic_forward_proxy_cc", + "@envoy_api//envoy/config/filter/http/dynamic_forward_proxy/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/ext_authz/BUILD b/source/extensions/filters/http/ext_authz/BUILD index f5b4e7eacea1..5a9261bffcd9 100644 --- a/source/extensions/filters/http/ext_authz/BUILD +++ b/source/extensions/filters/http/ext_authz/BUILD @@ -28,7 +28,7 @@ envoy_cc_library( "//source/common/router:config_lib", "//source/extensions/filters/common/ext_authz:ext_authz_grpc_lib", "//source/extensions/filters/common/ext_authz:ext_authz_http_lib", - "@envoy_api//envoy/config/filter/http/ext_authz/v2:ext_authz_cc", + "@envoy_api//envoy/config/filter/http/ext_authz/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/fault/BUILD b/source/extensions/filters/http/fault/BUILD index a5b48b5af103..fdf07f6eea45 100644 --- a/source/extensions/filters/http/fault/BUILD +++ b/source/extensions/filters/http/fault/BUILD @@ -33,7 +33,7 @@ envoy_cc_library( "//source/common/http:headers_lib", "//source/common/protobuf:utility_lib", "//source/extensions/filters/common/fault:fault_config_lib", - "@envoy_api//envoy/config/filter/http/fault/v2:fault_cc", + "@envoy_api//envoy/config/filter/http/fault/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/grpc_http1_reverse_bridge/BUILD b/source/extensions/filters/http/grpc_http1_reverse_bridge/BUILD index 4dc282fc3129..5a0077e5ba70 100644 --- a/source/extensions/filters/http/grpc_http1_reverse_bridge/BUILD +++ b/source/extensions/filters/http/grpc_http1_reverse_bridge/BUILD @@ -35,6 +35,6 @@ envoy_cc_library( "//include/envoy/server:filter_config_interface", "//source/extensions/filters/http:well_known_names", "//source/extensions/filters/http/common:factory_base_lib", - "@envoy_api//envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1:config_cc", + "@envoy_api//envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/grpc_json_transcoder/BUILD b/source/extensions/filters/http/grpc_json_transcoder/BUILD index 3128edcf4c52..a469f037f1af 100644 --- a/source/extensions/filters/http/grpc_json_transcoder/BUILD +++ b/source/extensions/filters/http/grpc_json_transcoder/BUILD @@ -29,7 +29,7 @@ envoy_cc_library( "//source/common/grpc:common_lib", "//source/common/http:headers_lib", "//source/common/protobuf", - "@envoy_api//envoy/config/filter/http/transcoder/v2:transcoder_cc", + "@envoy_api//envoy/config/filter/http/transcoder/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/gzip/BUILD b/source/extensions/filters/http/gzip/BUILD index 6a1df0f1dd12..32d46f7d1bcd 100644 --- a/source/extensions/filters/http/gzip/BUILD +++ b/source/extensions/filters/http/gzip/BUILD @@ -24,7 +24,7 @@ envoy_cc_library( "//source/common/http:header_map_lib", "//source/common/http:headers_lib", "//source/common/protobuf", - "@envoy_api//envoy/config/filter/http/gzip/v2:gzip_cc", + "@envoy_api//envoy/config/filter/http/gzip/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/header_to_metadata/BUILD b/source/extensions/filters/http/header_to_metadata/BUILD index f0ffbec64f5c..6cce872d79e4 100644 --- a/source/extensions/filters/http/header_to_metadata/BUILD +++ b/source/extensions/filters/http/header_to_metadata/BUILD @@ -19,7 +19,7 @@ envoy_cc_library( "//include/envoy/server:filter_config_interface", "//source/common/common:base64_lib", "//source/extensions/filters/http:well_known_names", - "@envoy_api//envoy/config/filter/http/header_to_metadata/v2:header_to_metadata_cc", + "@envoy_api//envoy/config/filter/http/header_to_metadata/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/health_check/BUILD b/source/extensions/filters/http/health_check/BUILD index 6ecc7f75df0a..2a1272767544 100644 --- a/source/extensions/filters/http/health_check/BUILD +++ b/source/extensions/filters/http/health_check/BUILD @@ -29,7 +29,7 @@ envoy_cc_library( "//source/common/http:headers_lib", "//source/common/http:utility_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/config/filter/http/health_check/v2:health_check_cc", + "@envoy_api//envoy/config/filter/http/health_check/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/ip_tagging/BUILD b/source/extensions/filters/http/ip_tagging/BUILD index bc88c1313356..f5a28bd708eb 100644 --- a/source/extensions/filters/http/ip_tagging/BUILD +++ b/source/extensions/filters/http/ip_tagging/BUILD @@ -23,7 +23,7 @@ envoy_cc_library( "//source/common/http:headers_lib", "//source/common/network:lc_trie_lib", "//source/common/stats:symbol_table_lib", - "@envoy_api//envoy/config/filter/http/ip_tagging/v2:ip_tagging_cc", + "@envoy_api//envoy/config/filter/http/ip_tagging/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/jwt_authn/BUILD b/source/extensions/filters/http/jwt_authn/BUILD index feede1f772fe..1d6efaca768d 100644 --- a/source/extensions/filters/http/jwt_authn/BUILD +++ b/source/extensions/filters/http/jwt_authn/BUILD @@ -14,7 +14,7 @@ envoy_cc_library( hdrs = ["extractor.h"], deps = [ "//source/common/http:utility_lib", - "@envoy_api//envoy/config/filter/http/jwt_authn/v2alpha:jwt_authn_cc", + "@envoy_api//envoy/config/filter/http/jwt_authn/v2alpha:pkg_cc_proto", ], ) @@ -29,7 +29,7 @@ envoy_cc_library( "//source/common/common:minimal_logger_lib", "//source/common/config:datasource_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/config/filter/http/jwt_authn/v2alpha:jwt_authn_cc", + "@envoy_api//envoy/config/filter/http/jwt_authn/v2alpha:pkg_cc_proto", ], ) @@ -93,7 +93,7 @@ envoy_cc_library( ":authenticator_lib", ":extractor_lib", "//include/envoy/http:header_map_interface", - "@envoy_api//envoy/config/filter/http/jwt_authn/v2alpha:jwt_authn_cc", + "@envoy_api//envoy/config/filter/http/jwt_authn/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/original_src/BUILD b/source/extensions/filters/http/original_src/BUILD index 04e89334f85f..30ac140d4963 100644 --- a/source/extensions/filters/http/original_src/BUILD +++ b/source/extensions/filters/http/original_src/BUILD @@ -15,7 +15,7 @@ envoy_cc_library( srcs = ["config.cc"], hdrs = ["config.h"], deps = [ - "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:pkg_cc_proto", ], ) @@ -42,6 +42,6 @@ envoy_cc_library( "//include/envoy/registry", "//source/extensions/filters/http:well_known_names", "//source/extensions/filters/http/common:factory_base_lib", - "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/ratelimit/BUILD b/source/extensions/filters/http/ratelimit/BUILD index 22b8e4bba0b6..3f50347ac7e4 100644 --- a/source/extensions/filters/http/ratelimit/BUILD +++ b/source/extensions/filters/http/ratelimit/BUILD @@ -25,7 +25,7 @@ envoy_cc_library( "//source/common/router:config_lib", "//source/extensions/filters/common/ratelimit:ratelimit_client_interface", "//source/extensions/filters/common/ratelimit:stat_names_lib", - "@envoy_api//envoy/config/filter/http/rate_limit/v2:rate_limit_cc", + "@envoy_api//envoy/config/filter/http/rate_limit/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/rbac/BUILD b/source/extensions/filters/http/rbac/BUILD index f7adc41aa850..a66d14d7f903 100644 --- a/source/extensions/filters/http/rbac/BUILD +++ b/source/extensions/filters/http/rbac/BUILD @@ -31,6 +31,6 @@ envoy_cc_library( "//source/extensions/filters/common/rbac:engine_lib", "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/http:well_known_names", - "@envoy_api//envoy/config/filter/http/rbac/v2:rbac_cc", + "@envoy_api//envoy/config/filter/http/rbac/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/squash/BUILD b/source/extensions/filters/http/squash/BUILD index ab986ca18443..d43135443a44 100644 --- a/source/extensions/filters/http/squash/BUILD +++ b/source/extensions/filters/http/squash/BUILD @@ -27,7 +27,7 @@ envoy_cc_library( "//source/common/http:message_lib", "//source/common/http:utility_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/config/filter/http/squash/v2:squash_cc", + "@envoy_api//envoy/config/filter/http/squash/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/http/tap/BUILD b/source/extensions/filters/http/tap/BUILD index 0581a9f7d2c6..1766624a9cef 100644 --- a/source/extensions/filters/http/tap/BUILD +++ b/source/extensions/filters/http/tap/BUILD @@ -18,7 +18,7 @@ envoy_cc_library( "//include/envoy/buffer:buffer_interface", "//include/envoy/http:header_map_interface", "//source/extensions/common/tap:tap_interface", - "@envoy_api//envoy/service/tap/v2alpha:common_cc", + "@envoy_api//envoy/service/tap/v2alpha:pkg_cc_proto", ], ) @@ -29,7 +29,7 @@ envoy_cc_library( deps = [ ":tap_config_interface", "//source/extensions/common/tap:tap_config_base", - "@envoy_api//envoy/data/tap/v2alpha:http_cc", + "@envoy_api//envoy/data/tap/v2alpha:pkg_cc_proto", ], ) @@ -42,7 +42,7 @@ envoy_cc_library( "//include/envoy/access_log:access_log_interface", "//include/envoy/http:filter_interface", "//source/extensions/common/tap:extension_config_base", - "@envoy_api//envoy/config/filter/http/tap/v2alpha:tap_cc", + "@envoy_api//envoy/config/filter/http/tap/v2alpha:pkg_cc_proto", ], ) @@ -56,6 +56,6 @@ envoy_cc_library( "//include/envoy/registry", "//source/extensions/filters/http:well_known_names", "//source/extensions/filters/http/common:factory_base_lib", - "@envoy_api//envoy/config/filter/http/tap/v2alpha:tap_cc", + "@envoy_api//envoy/config/filter/http/tap/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/listener/original_src/BUILD b/source/extensions/filters/listener/original_src/BUILD index e6a9eb6a3f03..863d2010f930 100644 --- a/source/extensions/filters/listener/original_src/BUILD +++ b/source/extensions/filters/listener/original_src/BUILD @@ -15,7 +15,7 @@ envoy_cc_library( srcs = ["config.cc"], hdrs = ["config.h"], deps = [ - "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:pkg_cc_proto", ], ) @@ -45,6 +45,6 @@ envoy_cc_library( "//include/envoy/registry", "//include/envoy/server:filter_config_interface", "//source/extensions/filters/listener:well_known_names", - "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/client_ssl_auth/BUILD b/source/extensions/filters/network/client_ssl_auth/BUILD index 3a99d2418231..a334034b8a4e 100644 --- a/source/extensions/filters/network/client_ssl_auth/BUILD +++ b/source/extensions/filters/network/client_ssl_auth/BUILD @@ -32,7 +32,7 @@ envoy_cc_library( "//source/common/json:json_loader_lib", "//source/common/network:cidr_range_lib", "//source/common/network:utility_lib", - "@envoy_api//envoy/config/filter/network/client_ssl_auth/v2:client_ssl_auth_cc", + "@envoy_api//envoy/config/filter/network/client_ssl_auth/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/common/redis/BUILD b/source/extensions/filters/network/common/redis/BUILD index ae2702107c4a..b50d4ebfa9f8 100644 --- a/source/extensions/filters/network/common/redis/BUILD +++ b/source/extensions/filters/network/common/redis/BUILD @@ -69,7 +69,7 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/common/upstream:load_balancer_lib", "//source/common/upstream:upstream_lib", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/dubbo_proxy/BUILD b/source/extensions/filters/network/dubbo_proxy/BUILD index 9ac6ff1e40d7..27805df27a8d 100644 --- a/source/extensions/filters/network/dubbo_proxy/BUILD +++ b/source/extensions/filters/network/dubbo_proxy/BUILD @@ -118,7 +118,7 @@ envoy_cc_library( "//source/extensions/filters/network/dubbo_proxy/router:config", "//source/extensions/filters/network/dubbo_proxy/router:route_matcher", "//source/extensions/filters/network/dubbo_proxy/router:router_lib", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) @@ -225,6 +225,6 @@ envoy_cc_library( "//source/common/stream_info:stream_info_lib", "//source/extensions/filters/network/dubbo_proxy/filters:filter_interface", "//source/extensions/filters/network/dubbo_proxy/router:router_interface", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/dubbo_proxy/router/BUILD b/source/extensions/filters/network/dubbo_proxy/router/BUILD index 0256ac5cdb31..3c2aa4501c18 100644 --- a/source/extensions/filters/network/dubbo_proxy/router/BUILD +++ b/source/extensions/filters/network/dubbo_proxy/router/BUILD @@ -26,7 +26,7 @@ envoy_cc_library( "//source/common/config:utility_lib", "//source/common/singleton:const_singleton", "//source/extensions/filters/network/dubbo_proxy:metadata_lib", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) @@ -44,7 +44,7 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/extensions/filters/network/dubbo_proxy:metadata_lib", "//source/extensions/filters/network/dubbo_proxy:serializer_interface", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) @@ -58,7 +58,7 @@ envoy_cc_library( "//source/extensions/filters/network/dubbo_proxy/filters:factory_base_lib", "//source/extensions/filters/network/dubbo_proxy/filters:filter_config_interface", "//source/extensions/filters/network/dubbo_proxy/filters:well_known_names", - "@envoy_api//envoy/config/filter/dubbo/router/v2alpha1:router_cc", + "@envoy_api//envoy/config/filter/dubbo/router/v2alpha1:pkg_cc_proto", ], ) @@ -80,6 +80,6 @@ envoy_cc_library( "//source/extensions/filters/network/dubbo_proxy:protocol_interface", "//source/extensions/filters/network/dubbo_proxy:serializer_interface", "//source/extensions/filters/network/dubbo_proxy/filters:filter_interface", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/ext_authz/BUILD b/source/extensions/filters/network/ext_authz/BUILD index f0e866d13307..082925e49861 100644 --- a/source/extensions/filters/network/ext_authz/BUILD +++ b/source/extensions/filters/network/ext_authz/BUILD @@ -25,7 +25,7 @@ envoy_cc_library( "//source/common/tracing:http_tracer_lib", "//source/extensions/filters/common/ext_authz:ext_authz_grpc_lib", "//source/extensions/filters/common/ext_authz:ext_authz_interface", - "@envoy_api//envoy/config/filter/network/ext_authz/v2:ext_authz_cc", + "@envoy_api//envoy/config/filter/network/ext_authz/v2:pkg_cc_proto", ], ) @@ -39,6 +39,6 @@ envoy_cc_library( "//source/extensions/filters/network:well_known_names", "//source/extensions/filters/network/common:factory_base_lib", "//source/extensions/filters/network/ext_authz", - "@envoy_api//envoy/config/filter/network/ext_authz/v2:ext_authz_cc", + "@envoy_api//envoy/config/filter/network/ext_authz/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/http_connection_manager/BUILD b/source/extensions/filters/network/http_connection_manager/BUILD index fbe72b257b15..24acebc01cde 100644 --- a/source/extensions/filters/network/http_connection_manager/BUILD +++ b/source/extensions/filters/network/http_connection_manager/BUILD @@ -40,6 +40,6 @@ envoy_cc_library( "//source/common/router:scoped_rds_lib", "//source/extensions/filters/network:well_known_names", "//source/extensions/filters/network/common:factory_base_lib", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/mongo_proxy/BUILD b/source/extensions/filters/network/mongo_proxy/BUILD index f2be1d6a9774..35a4883283e5 100644 --- a/source/extensions/filters/network/mongo_proxy/BUILD +++ b/source/extensions/filters/network/mongo_proxy/BUILD @@ -78,7 +78,7 @@ envoy_cc_library( "//source/common/singleton:const_singleton", "//source/extensions/filters/common/fault:fault_config_lib", "//source/extensions/filters/network:well_known_names", - "@envoy_api//envoy/config/filter/network/mongo_proxy/v2:mongo_proxy_cc", + "@envoy_api//envoy/config/filter/network/mongo_proxy/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/mysql_proxy/BUILD b/source/extensions/filters/network/mysql_proxy/BUILD index c5f70f2bb7f2..fd44d4726e3c 100644 --- a/source/extensions/filters/network/mysql_proxy/BUILD +++ b/source/extensions/filters/network/mysql_proxy/BUILD @@ -55,6 +55,6 @@ envoy_cc_library( ":proxy_lib", "//source/extensions/filters/network:well_known_names", "//source/extensions/filters/network/common:factory_base_lib", - "@envoy_api//envoy/config/filter/network/mysql_proxy/v1alpha1:mysql_proxy_cc", + "@envoy_api//envoy/config/filter/network/mysql_proxy/v1alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/ratelimit/BUILD b/source/extensions/filters/network/ratelimit/BUILD index 5def3649b91f..1e8d61946654 100644 --- a/source/extensions/filters/network/ratelimit/BUILD +++ b/source/extensions/filters/network/ratelimit/BUILD @@ -23,7 +23,7 @@ envoy_cc_library( "//include/envoy/stats:stats_macros", "//source/common/tracing:http_tracer_lib", "//source/extensions/filters/common/ratelimit:ratelimit_client_interface", - "@envoy_api//envoy/config/filter/network/rate_limit/v2:rate_limit_cc", + "@envoy_api//envoy/config/filter/network/rate_limit/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/rbac/BUILD b/source/extensions/filters/network/rbac/BUILD index 9124710a48a7..57ce3bb972b8 100644 --- a/source/extensions/filters/network/rbac/BUILD +++ b/source/extensions/filters/network/rbac/BUILD @@ -18,7 +18,7 @@ envoy_cc_library( "//include/envoy/server:filter_config_interface", "//source/extensions/filters/network:well_known_names", "//source/extensions/filters/network/common:factory_base_lib", - "@envoy_api//envoy/config/filter/network/rbac/v2:rbac_cc", + "@envoy_api//envoy/config/filter/network/rbac/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/redis_proxy/BUILD b/source/extensions/filters/network/redis_proxy/BUILD index 7178d82679db..700acf9c616c 100644 --- a/source/extensions/filters/network/redis_proxy/BUILD +++ b/source/extensions/filters/network/redis_proxy/BUILD @@ -27,7 +27,7 @@ envoy_cc_library( "//source/common/config:datasource_lib", "//source/extensions/filters/network:well_known_names", "//source/extensions/filters/network/common:factory_base_lib", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", ], ) @@ -46,7 +46,7 @@ envoy_cc_library( hdrs = ["router.h"], deps = [ ":conn_pool_interface", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", ], ) @@ -88,7 +88,7 @@ envoy_cc_library( "//source/extensions/clusters/redis:redis_cluster_lb", "//source/extensions/filters/network/common/redis:client_lib", "//source/extensions/filters/network/common/redis:utility_lib", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", ], ) @@ -106,7 +106,7 @@ envoy_cc_library( "//source/common/config:datasource_lib", "//source/common/config:utility_lib", "//source/extensions/filters/network/common/redis:codec_interface", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", ], ) @@ -140,6 +140,6 @@ envoy_cc_library( "//source/common/common:to_lower_table_lib", "//source/extensions/filters/network/common/redis:supported_commands_lib", "//source/extensions/filters/network/redis_proxy:conn_pool_lib", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/thrift_proxy/BUILD b/source/extensions/filters/network/thrift_proxy/BUILD index e6f16abe3a2a..31988a845f78 100644 --- a/source/extensions/filters/network/thrift_proxy/BUILD +++ b/source/extensions/filters/network/thrift_proxy/BUILD @@ -54,7 +54,7 @@ envoy_cc_library( "//source/extensions/filters/network/thrift_proxy/filters:filter_config_interface", "//source/extensions/filters/network/thrift_proxy/filters:well_known_names", "//source/extensions/filters/network/thrift_proxy/router:router_lib", - "@envoy_api//envoy/config/filter/network/thrift_proxy/v2alpha1:thrift_proxy_cc", + "@envoy_api//envoy/config/filter/network/thrift_proxy/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/thrift_proxy/filters/ratelimit/BUILD b/source/extensions/filters/network/thrift_proxy/filters/ratelimit/BUILD index 1d6128fda8fb..302ebe615b6c 100644 --- a/source/extensions/filters/network/thrift_proxy/filters/ratelimit/BUILD +++ b/source/extensions/filters/network/thrift_proxy/filters/ratelimit/BUILD @@ -22,7 +22,7 @@ envoy_cc_library( "//source/extensions/filters/network/thrift_proxy:app_exception_lib", "//source/extensions/filters/network/thrift_proxy/filters:filter_interface", "//source/extensions/filters/network/thrift_proxy/router:router_ratelimit_interface", - "@envoy_api//envoy/config/filter/thrift/rate_limit/v2alpha1:rate_limit_cc", + "@envoy_api//envoy/config/filter/thrift/rate_limit/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/thrift_proxy/router/BUILD b/source/extensions/filters/network/thrift_proxy/router/BUILD index 693a4ce920af..58e44165ced6 100644 --- a/source/extensions/filters/network/thrift_proxy/router/BUILD +++ b/source/extensions/filters/network/thrift_proxy/router/BUILD @@ -18,7 +18,7 @@ envoy_cc_library( "//source/extensions/filters/network/thrift_proxy/filters:factory_base_lib", "//source/extensions/filters/network/thrift_proxy/filters:filter_config_interface", "//source/extensions/filters/network/thrift_proxy/filters:well_known_names", - "@envoy_api//envoy/config/filter/thrift/router/v2alpha1:router_cc", + "@envoy_api//envoy/config/filter/thrift/router/v2alpha1:pkg_cc_proto", ], ) @@ -39,7 +39,7 @@ envoy_cc_library( ":router_interface", "//include/envoy/router:router_ratelimit_interface", "//source/extensions/filters/network/thrift_proxy:metadata_lib", - "@envoy_api//envoy/api/v2/route:route_cc", + "@envoy_api//envoy/api/v2/route:pkg_cc_proto", ], ) @@ -66,7 +66,7 @@ envoy_cc_library( "//source/extensions/filters/network/thrift_proxy:thrift_object_interface", "//source/extensions/filters/network/thrift_proxy:transport_interface", "//source/extensions/filters/network/thrift_proxy/filters:filter_interface", - "@envoy_api//envoy/config/filter/network/thrift_proxy/v2alpha1:thrift_proxy_cc", + "@envoy_api//envoy/config/filter/network/thrift_proxy/v2alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/filters/network/zookeeper_proxy/BUILD b/source/extensions/filters/network/zookeeper_proxy/BUILD index 934f23a53032..fdbcdcdfa635 100644 --- a/source/extensions/filters/network/zookeeper_proxy/BUILD +++ b/source/extensions/filters/network/zookeeper_proxy/BUILD @@ -45,6 +45,6 @@ envoy_cc_library( ":proxy_lib", "//source/extensions/filters/network:well_known_names", "//source/extensions/filters/network/common:factory_base_lib", - "@envoy_api//envoy/config/filter/network/zookeeper_proxy/v1alpha1:zookeeper_proxy_cc", + "@envoy_api//envoy/config/filter/network/zookeeper_proxy/v1alpha1:pkg_cc_proto", ], ) diff --git a/source/extensions/grpc_credentials/aws_iam/BUILD b/source/extensions/grpc_credentials/aws_iam/BUILD index 8c8d36fe3b85..53c91f8b67c7 100644 --- a/source/extensions/grpc_credentials/aws_iam/BUILD +++ b/source/extensions/grpc_credentials/aws_iam/BUILD @@ -28,6 +28,6 @@ envoy_cc_library( "//source/extensions/filters/http/common/aws:signer_impl_lib", "//source/extensions/filters/http/common/aws:utility_lib", "//source/extensions/grpc_credentials:well_known_names", - "@envoy_api//envoy/config/grpc_credential/v2alpha:aws_iam_cc", + "@envoy_api//envoy/config/grpc_credential/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/grpc_credentials/file_based_metadata/BUILD b/source/extensions/grpc_credentials/file_based_metadata/BUILD index 30e63efddd0b..d79201a751e3 100644 --- a/source/extensions/grpc_credentials/file_based_metadata/BUILD +++ b/source/extensions/grpc_credentials/file_based_metadata/BUILD @@ -22,6 +22,6 @@ envoy_cc_library( "//source/common/grpc:common_lib", "//source/common/grpc:google_grpc_creds_lib", "//source/extensions/grpc_credentials:well_known_names", - "@envoy_api//envoy/config/grpc_credential/v2alpha:file_based_metadata_cc", + "@envoy_api//envoy/config/grpc_credential/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/health_checkers/redis/BUILD b/source/extensions/health_checkers/redis/BUILD index 5c3c7bdffe8b..bc14e64c7c43 100644 --- a/source/extensions/health_checkers/redis/BUILD +++ b/source/extensions/health_checkers/redis/BUILD @@ -19,8 +19,8 @@ envoy_cc_library( "//source/extensions/filters/network/common/redis:client_lib", "//source/extensions/filters/network/redis_proxy:config", "//source/extensions/filters/network/redis_proxy:conn_pool_lib", - "@envoy_api//envoy/api/v2/core:health_check_cc", - "@envoy_api//envoy/config/health_checker/redis/v2:redis_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/config/health_checker/redis/v2:pkg_cc_proto", ], ) @@ -44,7 +44,7 @@ envoy_cc_library( deps = [ "//source/common/protobuf", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2/core:health_check_cc", - "@envoy_api//envoy/config/health_checker/redis/v2:redis_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/config/health_checker/redis/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/quic_listeners/quiche/BUILD b/source/extensions/quic_listeners/quiche/BUILD index d0e569e3d93d..63f9046607ea 100644 --- a/source/extensions/quic_listeners/quiche/BUILD +++ b/source/extensions/quic_listeners/quiche/BUILD @@ -223,7 +223,7 @@ envoy_cc_library( "//source/common/network:listener_lib", "//source/common/protobuf:utility_lib", "//source/server:connection_handler_lib", - "@envoy_api//envoy/api/v2/listener:quic_config_cc", + "@envoy_api//envoy/api/v2/listener:pkg_cc_proto", ], ) @@ -264,6 +264,6 @@ envoy_cc_library( "//source/common/common:assert_lib", "//source/extensions/transport_sockets:well_known_names", "//source/extensions/transport_sockets/tls:context_config_lib", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) diff --git a/source/extensions/resource_monitors/fixed_heap/BUILD b/source/extensions/resource_monitors/fixed_heap/BUILD index f9042c54305e..c9f6699e0275 100644 --- a/source/extensions/resource_monitors/fixed_heap/BUILD +++ b/source/extensions/resource_monitors/fixed_heap/BUILD @@ -16,7 +16,7 @@ envoy_cc_library( "//include/envoy/server:resource_monitor_config_interface", "//source/common/common:assert_lib", "//source/common/memory:stats_lib", - "@envoy_api//envoy/config/resource_monitor/fixed_heap/v2alpha:fixed_heap_cc", + "@envoy_api//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/resource_monitors/injected_resource/BUILD b/source/extensions/resource_monitors/injected_resource/BUILD index c1e4036ce3eb..61df503b2dbd 100644 --- a/source/extensions/resource_monitors/injected_resource/BUILD +++ b/source/extensions/resource_monitors/injected_resource/BUILD @@ -17,7 +17,7 @@ envoy_cc_library( "//include/envoy/filesystem:filesystem_interface", "//include/envoy/server:resource_monitor_config_interface", "//source/common/common:assert_lib", - "@envoy_api//envoy/config/resource_monitor/injected_resource/v2alpha:injected_resource_cc", + "@envoy_api//envoy/config/resource_monitor/injected_resource/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/retry/priority/previous_priorities/BUILD b/source/extensions/retry/priority/previous_priorities/BUILD index 9f83cb15f02f..8c9cad99cbd2 100644 --- a/source/extensions/retry/priority/previous_priorities/BUILD +++ b/source/extensions/retry/priority/previous_priorities/BUILD @@ -28,6 +28,6 @@ envoy_cc_library( "//include/envoy/upstream:retry_interface", "//source/common/protobuf", "//source/extensions/retry/priority:well_known_names", - "@envoy_api//envoy/config/retry/previous_priorities:previous_priorities_cc", + "@envoy_api//envoy/config/retry/previous_priorities:pkg_cc_proto", ], ) diff --git a/source/extensions/stat_sinks/dog_statsd/BUILD b/source/extensions/stat_sinks/dog_statsd/BUILD index 83273b1afe42..07d7b4ab317b 100644 --- a/source/extensions/stat_sinks/dog_statsd/BUILD +++ b/source/extensions/stat_sinks/dog_statsd/BUILD @@ -22,6 +22,6 @@ envoy_cc_library( "//source/extensions/stat_sinks:well_known_names", "//source/extensions/stat_sinks/common/statsd:statsd_lib", "//source/server:configuration_lib", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/stat_sinks/hystrix/BUILD b/source/extensions/stat_sinks/hystrix/BUILD index df8273422675..541ad06838af 100644 --- a/source/extensions/stat_sinks/hystrix/BUILD +++ b/source/extensions/stat_sinks/hystrix/BUILD @@ -21,7 +21,7 @@ envoy_cc_library( "//source/extensions/stat_sinks:well_known_names", "//source/extensions/stat_sinks/hystrix:hystrix_lib", "//source/server:configuration_lib", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/stat_sinks/metrics_service/BUILD b/source/extensions/stat_sinks/metrics_service/BUILD index 91cd5dcf50e7..bc7562f11b7f 100644 --- a/source/extensions/stat_sinks/metrics_service/BUILD +++ b/source/extensions/stat_sinks/metrics_service/BUILD @@ -21,7 +21,7 @@ envoy_cc_library( "//include/envoy/upstream:cluster_manager_interface", "//source/common/common:assert_lib", "//source/common/grpc:async_client_lib", - "@envoy_api//envoy/service/metrics/v2:metrics_service_cc", + "@envoy_api//envoy/service/metrics/v2:pkg_cc_proto", ], ) @@ -32,7 +32,7 @@ envoy_cc_library( deps = [ "//source/common/common:assert_lib", "//source/common/protobuf", - "@envoy_api//envoy/service/metrics/v2:metrics_service_cc", + "@envoy_api//envoy/service/metrics/v2:pkg_cc_proto", ], ) @@ -47,7 +47,7 @@ envoy_cc_library( "//source/extensions/stat_sinks/metrics_service:metrics_proto_descriptors_lib", "//source/extensions/stat_sinks/metrics_service:metrics_service_grpc_lib", "//source/server:configuration_lib", - "@envoy_api//envoy/config/metrics/v2:stats_cc", - "@envoy_api//envoy/service/metrics/v2:metrics_service_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", + "@envoy_api//envoy/service/metrics/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/stat_sinks/statsd/BUILD b/source/extensions/stat_sinks/statsd/BUILD index 23ea5f1470ad..af47dfef1a27 100644 --- a/source/extensions/stat_sinks/statsd/BUILD +++ b/source/extensions/stat_sinks/statsd/BUILD @@ -21,6 +21,6 @@ envoy_cc_library( "//source/extensions/stat_sinks:well_known_names", "//source/extensions/stat_sinks/common/statsd:statsd_lib", "//source/server:configuration_lib", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/tracers/opencensus/BUILD b/source/extensions/tracers/opencensus/BUILD index 0e7c9085fcab..83fedbab27b6 100644 --- a/source/extensions/tracers/opencensus/BUILD +++ b/source/extensions/tracers/opencensus/BUILD @@ -40,6 +40,6 @@ envoy_cc_library( deps = [ "//source/common/config:utility_lib", "//source/common/tracing:http_tracer_lib", - "@envoy_api//envoy/config/trace/v2:trace_cc", + "@envoy_api//envoy/config/trace/v2:pkg_cc_proto", ], ) diff --git a/source/extensions/tracers/zipkin/BUILD b/source/extensions/tracers/zipkin/BUILD index 652496900174..d2795d5472d0 100644 --- a/source/extensions/tracers/zipkin/BUILD +++ b/source/extensions/tracers/zipkin/BUILD @@ -57,7 +57,7 @@ envoy_cc_library( "//source/common/singleton:const_singleton", "//source/common/tracing:http_tracer_lib", "//source/extensions/tracers:well_known_names", - "@com_github_openzipkin_zipkinapi//:zipkin_cc", + "@com_github_openzipkin_zipkinapi//:zipkin_cc_proto", ], ) diff --git a/source/extensions/transport_sockets/alts/BUILD b/source/extensions/transport_sockets/alts/BUILD index a13af2b2c3ea..e860bd929975 100644 --- a/source/extensions/transport_sockets/alts/BUILD +++ b/source/extensions/transport_sockets/alts/BUILD @@ -40,7 +40,7 @@ envoy_cc_library( "//include/envoy/server:transport_socket_config_interface", "//source/common/grpc:google_grpc_context_lib", "//source/extensions/transport_sockets:well_known_names", - "@envoy_api//envoy/config/transport_socket/alts/v2alpha:alts_cc", + "@envoy_api//envoy/config/transport_socket/alts/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/transport_sockets/tap/BUILD b/source/extensions/transport_sockets/tap/BUILD index 0d387997e1eb..aa8864271687 100644 --- a/source/extensions/transport_sockets/tap/BUILD +++ b/source/extensions/transport_sockets/tap/BUILD @@ -27,7 +27,7 @@ envoy_cc_library( ":tap_config_interface", "//source/common/network:utility_lib", "//source/extensions/common/tap:tap_config_base", - "@envoy_api//envoy/data/tap/v2alpha:wrapper_cc", + "@envoy_api//envoy/data/tap/v2alpha:pkg_cc_proto", ], ) @@ -40,7 +40,7 @@ envoy_cc_library( "//include/envoy/network:transport_socket_interface", "//source/common/buffer:buffer_lib", "//source/extensions/common/tap:extension_config_base", - "@envoy_api//envoy/config/transport_socket/tap/v2alpha:tap_cc", + "@envoy_api//envoy/config/transport_socket/tap/v2alpha:pkg_cc_proto", ], ) @@ -57,6 +57,6 @@ envoy_cc_library( "//source/common/config:utility_lib", "//source/common/protobuf:utility_lib", "//source/extensions/transport_sockets:well_known_names", - "@envoy_api//envoy/config/transport_socket/tap/v2alpha:tap_cc", + "@envoy_api//envoy/config/transport_socket/tap/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/transport_sockets/tls/BUILD b/source/extensions/transport_sockets/tls/BUILD index 3345a9d87439..cdc81bb51608 100644 --- a/source/extensions/transport_sockets/tls/BUILD +++ b/source/extensions/transport_sockets/tls/BUILD @@ -69,7 +69,7 @@ envoy_cc_library( "//source/common/secret:sds_api_lib", "//source/common/ssl:certificate_validation_context_config_impl_lib", "//source/common/ssl:tls_certificate_config_impl_lib", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) @@ -103,7 +103,7 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/common/stats:symbol_table_lib", "//source/extensions/transport_sockets/tls/private_key:private_key_manager_lib", - "@envoy_api//envoy/admin/v2alpha:certs_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", ], ) diff --git a/source/extensions/transport_sockets/tls/private_key/BUILD b/source/extensions/transport_sockets/tls/private_key/BUILD index 2c181249b5d8..1c0283a84ab8 100644 --- a/source/extensions/transport_sockets/tls/private_key/BUILD +++ b/source/extensions/transport_sockets/tls/private_key/BUILD @@ -21,6 +21,6 @@ envoy_cc_library( "//include/envoy/registry", "//include/envoy/ssl/private_key:private_key_config_interface", "//include/envoy/ssl/private_key:private_key_interface", - "@envoy_api//envoy/api/v2/auth:cert_cc", + "@envoy_api//envoy/api/v2/auth:pkg_cc_proto", ], ) diff --git a/source/server/BUILD b/source/server/BUILD index c99c7eeca205..2810fedb9080 100644 --- a/source/server/BUILD +++ b/source/server/BUILD @@ -48,8 +48,8 @@ envoy_cc_library( "//source/common/network:utility_lib", "//source/common/protobuf:utility_lib", "//source/common/tracing:http_tracer_lib", - "@envoy_api//envoy/api/v2:lds_cc", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) @@ -124,7 +124,7 @@ envoy_cc_library( srcs = envoy_select_hot_restart(["hot_restarting_base.cc"]), hdrs = envoy_select_hot_restart(["hot_restarting_base.h"]), deps = [ - ":hot_restart_cc", + ":hot_restart_cc_proto", "//include/envoy/api:os_sys_calls_interface", "//include/envoy/event:dispatcher_interface", "//include/envoy/event:file_event_interface", @@ -218,7 +218,7 @@ envoy_cc_library( "//source/common/common:version_lib", "//source/common/protobuf:utility_lib", "//source/common/stats:stats_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) @@ -234,7 +234,7 @@ envoy_cc_library( "//source/common/config:utility_lib", "//source/common/stats:symbol_table_lib", "//source/server:resource_monitor_config_lib", - "@envoy_api//envoy/config/overload/v2alpha:overload_cc", + "@envoy_api//envoy/config/overload/v2alpha:pkg_cc_proto", ], ) @@ -252,7 +252,7 @@ envoy_cc_library( "//source/common/config:utility_lib", "//source/common/init:target_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2:lds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -282,8 +282,8 @@ envoy_cc_library( "//source/common/protobuf:utility_lib", "//source/extensions/filters/listener:well_known_names", "//source/extensions/transport_sockets:well_known_names", - "@envoy_api//envoy/admin/v2alpha:config_dump_cc", - "@envoy_api//envoy/api/v2:lds_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -316,15 +316,9 @@ envoy_cc_library( "//source/common/common:assert_lib", "//source/common/config:protobuf_link_hacks", "//source/common/protobuf", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2:lds_cc", - "@envoy_api//envoy/api/v2:rds_cc", - "@envoy_api//envoy/api/v2:srds_cc", - "@envoy_api//envoy/service/discovery/v2:ads_cc", - "@envoy_api//envoy/service/discovery/v2:hds_cc", - "@envoy_api//envoy/service/discovery/v2:rtds_cc", - "@envoy_api//envoy/service/ratelimit/v2:rls_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", + "@envoy_api//envoy/service/ratelimit/v2:pkg_cc_proto", ], ) @@ -392,7 +386,7 @@ envoy_cc_library( "//source/common/upstream:health_discovery_service_lib", "//source/server:overload_manager_lib", "//source/server/http:admin_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) diff --git a/source/server/config_validation/BUILD b/source/server/config_validation/BUILD index a649fdd6bbb2..43233ed74665 100644 --- a/source/server/config_validation/BUILD +++ b/source/server/config_validation/BUILD @@ -107,6 +107,6 @@ envoy_cc_library( "//source/server:configuration_lib", "//source/server:server_lib", "//source/server/http:admin_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) diff --git a/source/server/http/BUILD b/source/server/http/BUILD index 41bfe83cc8da..2c1168adefec 100644 --- a/source/server/http/BUILD +++ b/source/server/http/BUILD @@ -59,13 +59,7 @@ envoy_cc_library( "//source/common/stats:stats_lib", "//source/common/upstream:host_utility_lib", "//source/extensions/access_loggers/file:file_access_log_lib", - "@envoy_api//envoy/admin/v2alpha:certs_cc", - "@envoy_api//envoy/admin/v2alpha:clusters_cc", - "@envoy_api//envoy/admin/v2alpha:config_dump_cc", - "@envoy_api//envoy/admin/v2alpha:listeners_cc", - "@envoy_api//envoy/admin/v2alpha:memory_cc", - "@envoy_api//envoy/admin/v2alpha:mutex_stats_cc", - "@envoy_api//envoy/admin/v2alpha:server_info_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", ], ) diff --git a/source/server/server.cc b/source/server/server.cc index 1afeff023cfe..8aba537de9b2 100644 --- a/source/server/server.cc +++ b/source/server/server.cc @@ -47,16 +47,14 @@ namespace Envoy { namespace Server { -InstanceImpl::InstanceImpl(const Options& options, Event::TimeSystem& time_system, - Network::Address::InstanceConstSharedPtr local_address, - ListenerHooks& hooks, HotRestart& restarter, Stats::StoreRoot& store, - Thread::BasicLockable& access_log_lock, - ComponentFactory& component_factory, - Runtime::RandomGeneratorPtr&& random_generator, - ThreadLocal::Instance& tls, Thread::ThreadFactory& thread_factory, - Filesystem::Instance& file_system, - std::unique_ptr process_context) - : workers_started_(false), shutdown_(false), options_(options), +InstanceImpl::InstanceImpl( + Init::Manager& init_manager, const Options& options, Event::TimeSystem& time_system, + Network::Address::InstanceConstSharedPtr local_address, ListenerHooks& hooks, + HotRestart& restarter, Stats::StoreRoot& store, Thread::BasicLockable& access_log_lock, + ComponentFactory& component_factory, Runtime::RandomGeneratorPtr&& random_generator, + ThreadLocal::Instance& tls, Thread::ThreadFactory& thread_factory, + Filesystem::Instance& file_system, std::unique_ptr process_context) + : init_manager_(init_manager), workers_started_(false), shutdown_(false), options_(options), validation_context_(options_.allowUnknownStaticFields(), !options.rejectUnknownDynamicFields()), time_source_(time_system), restarter_(restarter), start_time_(time(nullptr)), diff --git a/source/server/server.h b/source/server/server.h index 2ed83f1df2eb..1993e2276f01 100644 --- a/source/server/server.h +++ b/source/server/server.h @@ -144,14 +144,14 @@ class RunHelper : Logger::Loggable { /** * This is the actual full standalone server which stitches together various common components. */ -class InstanceImpl : Logger::Loggable, - public Instance, - public ServerLifecycleNotifier { +class InstanceImpl final : Logger::Loggable, + public Instance, + public ServerLifecycleNotifier { public: /** * @throw EnvoyException if initialization fails. */ - InstanceImpl(const Options& options, Event::TimeSystem& time_system, + InstanceImpl(Init::Manager& init_manager, const Options& options, Event::TimeSystem& time_system, Network::Address::InstanceConstSharedPtr local_address, ListenerHooks& hooks, HotRestart& restarter, Stats::StoreRoot& store, Thread::BasicLockable& access_log_lock, ComponentFactory& component_factory, @@ -227,7 +227,7 @@ class InstanceImpl : Logger::Loggable, // init_manager_ must come before any member that participates in initialization, and destructed // only after referencing members are gone, since initialization continuation can potentially // occur at any point during member lifetime. This init manager is populated with LdsApi targets. - Init::ManagerImpl init_manager_{"Server"}; + Init::Manager& init_manager_; // secret_manager_ must come before listener_manager_, config_ and dispatcher_, and destructed // only after these members can no longer reference it, since: // - There may be active filter chains referencing it in listener_manager_. diff --git a/test/BUILD b/test/BUILD index 4c2e42990737..87a1713b9d39 100644 --- a/test/BUILD +++ b/test/BUILD @@ -19,6 +19,7 @@ envoy_cc_test_library( srcs = [ "main.cc", "test_listener.cc", + "test_runner.cc", "test_runner.h", ], hdrs = ["test_listener.h"], diff --git a/test/common/access_log/BUILD b/test/common/access_log/BUILD index ab2fd26ded18..264a7afa2a33 100644 --- a/test/common/access_log/BUILD +++ b/test/common/access_log/BUILD @@ -23,7 +23,7 @@ envoy_cc_fuzz_test( srcs = ["access_log_formatter_fuzz_test.cc"], corpus = "access_log_formatter_corpus", deps = [ - ":access_log_formatter_fuzz_proto_cc", + ":access_log_formatter_fuzz_proto_cc_proto", "//source/common/access_log:access_log_formatter_lib", "//test/fuzz:utility_lib", ], diff --git a/test/common/buffer/BUILD b/test/common/buffer/BUILD index cd47700c392a..2d698c576820 100644 --- a/test/common/buffer/BUILD +++ b/test/common/buffer/BUILD @@ -31,7 +31,7 @@ envoy_cc_test_library( srcs = ["buffer_fuzz.cc"], hdrs = ["buffer_fuzz.h"], deps = [ - ":buffer_fuzz_proto_cc", + ":buffer_fuzz_proto_cc_proto", "//source/common/buffer:buffer_lib", "//source/common/common:stack_array", "//source/common/memory:stats_lib", diff --git a/test/common/common/BUILD b/test/common/common/BUILD index dd9b768e0ad5..c9024dba5e8d 100644 --- a/test/common/common/BUILD +++ b/test/common/common/BUILD @@ -113,10 +113,8 @@ envoy_cc_test( "//source/common/common:matchers_lib", "//source/common/config:metadata_lib", "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/api/v2/core:base_cc", - "@envoy_api//envoy/type/matcher:metadata_cc", - "@envoy_api//envoy/type/matcher:number_cc", - "@envoy_api//envoy/type/matcher:string_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", + "@envoy_api//envoy/type/matcher:pkg_cc_proto", ], ) diff --git a/test/common/config/BUILD b/test/common/config/BUILD index 81962b76d127..d519f20fc6b4 100644 --- a/test/common/config/BUILD +++ b/test/common/config/BUILD @@ -73,7 +73,7 @@ envoy_cc_test_library( "//test/test_common:environment_lib", "//test/test_common:test_time_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -95,9 +95,8 @@ envoy_cc_test( "//test/test_common:logging_lib", "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:discovery_cc", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/service/discovery/v2:ads_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -119,9 +118,8 @@ envoy_cc_test( "//test/test_common:logging_lib", "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:discovery_cc", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/service/discovery/v2:ads_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -160,7 +158,7 @@ envoy_cc_test_library( "//test/mocks/local_info:local_info_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -204,7 +202,7 @@ envoy_cc_test_library( "//test/mocks/runtime:runtime_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -223,8 +221,8 @@ envoy_cc_test( "//test/mocks/upstream:upstream_mocks", "//test/test_common:environment_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -300,7 +298,7 @@ envoy_cc_test( "//test/test_common:environment_lib", "//test/test_common:logging_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -311,7 +309,7 @@ envoy_cc_test( "//source/common/config:watch_map_lib", "//test/mocks/config:config_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -333,7 +331,7 @@ envoy_cc_test( name = "config_provider_impl_test", srcs = ["config_provider_impl_test.cc"], deps = [ - ":dummy_config_proto_cc", + ":dummy_config_proto_cc_proto", "//source/common/config:config_provider_lib", "//source/common/protobuf:utility_lib", "//test/mocks/server:server_mocks", @@ -351,7 +349,7 @@ envoy_cc_test( "//test/mocks/server:server_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -364,7 +362,7 @@ envoy_cc_test( name = "version_converter_test", srcs = ["version_converter_test.cc"], deps = [ - ":version_converter_proto_cc", + ":version_converter_proto_cc_proto", "//source/common/config:version_converter_lib", "//test/test_common:test_time_lib", "//test/test_common:utility_lib", diff --git a/test/common/grpc/BUILD b/test/common/grpc/BUILD index ed8df64ca6ca..07f457f2a263 100644 --- a/test/common/grpc/BUILD +++ b/test/common/grpc/BUILD @@ -18,7 +18,7 @@ envoy_cc_test( "//test/mocks/http:http_mocks", "//test/mocks/tracing:tracing_mocks", "//test/mocks/upstream:upstream_mocks", - "//test/proto:helloworld_proto_cc", + "//test/proto:helloworld_proto_cc_proto", "//test/test_common:test_time_lib", ], ) @@ -42,7 +42,7 @@ envoy_cc_test( deps = [ "//source/common/buffer:buffer_lib", "//source/common/grpc:codec_lib", - "//test/proto:helloworld_proto_cc", + "//test/proto:helloworld_proto_cc_proto", ], ) @@ -53,7 +53,7 @@ envoy_cc_test( "//source/common/grpc:common_lib", "//source/common/http:headers_lib", "//test/mocks/upstream:upstream_mocks", - "//test/proto:helloworld_proto_cc", + "//test/proto:helloworld_proto_cc_proto", "//test/test_common:utility_lib", ], ) @@ -77,7 +77,7 @@ envoy_cc_test( "//source/common/grpc:common_lib", "//source/common/http:headers_lib", "//test/mocks/upstream:upstream_mocks", - "//test/proto:helloworld_proto_cc", + "//test/proto:helloworld_proto_cc_proto", "//test/test_common:utility_lib", ] + envoy_select_google_grpc(["//source/common/grpc:google_grpc_utils_lib"]), ) @@ -93,7 +93,7 @@ envoy_cc_test( "//source/common/tracing:http_tracer_lib", "//test/mocks/grpc:grpc_mocks", "//test/mocks/tracing:tracing_mocks", - "//test/proto:helloworld_proto_cc", + "//test/proto:helloworld_proto_cc_proto", "//test/test_common:test_time_lib", "//test/test_common:utility_lib", ] + envoy_select_google_grpc(["//source/common/grpc:google_async_client_lib"]), @@ -132,7 +132,7 @@ envoy_cc_test_library( "//test/integration:integration_lib", "//test/mocks/local_info:local_info_mocks", "//test/mocks/server:server_mocks", - "//test/proto:helloworld_proto_cc", + "//test/proto:helloworld_proto_cc_proto", "//test/test_common:global_lib", "//test/test_common:test_time_lib", "//test/test_common:utility_lib", @@ -156,6 +156,6 @@ envoy_cc_test_library( data = ["//test/config/integration/certs"], deps = [ "//test/test_common:environment_lib", - "@envoy_api//envoy/api/v2/core:grpc_service_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/test/common/http/BUILD b/test/common/http/BUILD index 5c6a91624f31..af21da3858df 100644 --- a/test/common/http/BUILD +++ b/test/common/http/BUILD @@ -70,7 +70,7 @@ envoy_cc_fuzz_test( srcs = ["codec_impl_fuzz_test.cc"], corpus = "codec_impl_corpus", deps = [ - ":codec_impl_fuzz_proto_cc", + ":codec_impl_fuzz_proto_cc_proto", "//source/common/http:header_map_lib", "//source/common/http/http1:codec_lib", "//source/common/http/http2:codec_lib", @@ -143,7 +143,7 @@ envoy_cc_fuzz_test( srcs = ["conn_manager_impl_fuzz_test.cc"], corpus = "conn_manager_impl_corpus", deps = [ - ":conn_manager_impl_fuzz_proto_cc", + ":conn_manager_impl_fuzz_proto_cc_proto", "//source/common/common:empty_string", "//source/common/http:conn_manager_lib", "//source/common/http:context_lib", @@ -162,7 +162,7 @@ envoy_cc_fuzz_test( "//test/mocks/tracing:tracing_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:simulated_time_system_lib", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) @@ -271,7 +271,7 @@ envoy_cc_fuzz_test( srcs = ["header_map_impl_fuzz_test.cc"], corpus = "header_map_impl_corpus", deps = [ - ":header_map_impl_fuzz_proto_cc", + ":header_map_impl_fuzz_proto_cc_proto", "//source/common/http:header_map_lib", "//test/fuzz:utility_lib", ], @@ -308,7 +308,7 @@ envoy_cc_fuzz_test( srcs = ["utility_fuzz_test.cc"], corpus = "utility_corpus", deps = [ - ":utility_fuzz_proto_cc", + ":utility_fuzz_proto_cc_proto", "//source/common/http:utility_lib", "//test/fuzz:utility_lib", "//test/test_common:utility_lib", @@ -327,7 +327,7 @@ envoy_cc_test( "//test/mocks/http:http_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2/core:protocol_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/test/common/protobuf/BUILD b/test/common/protobuf/BUILD index 81c30eb6a241..230f497afc34 100644 --- a/test/common/protobuf/BUILD +++ b/test/common/protobuf/BUILD @@ -29,11 +29,11 @@ envoy_cc_test( "//test/mocks/local_info:local_info_mocks", "//test/mocks/protobuf:protobuf_mocks", "//test/mocks/server:server_mocks", - "//test/proto:deprecated_proto_cc", + "//test/proto:deprecated_proto_cc_proto", "//test/test_common:environment_lib", "//test/test_common:logging_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) diff --git a/test/common/router/BUILD b/test/common/router/BUILD index aa1385416405..3888f3eea324 100644 --- a/test/common/router/BUILD +++ b/test/common/router/BUILD @@ -22,7 +22,7 @@ envoy_cc_test_library( name = "config_impl_test_lib", srcs = ["config_impl_test.cc"], deps = [ - ":route_fuzz_proto_cc", + ":route_fuzz_proto_cc_proto", "//source/common/config:metadata_lib", "//source/common/http:header_map_lib", "//source/common/http:headers_lib", @@ -33,8 +33,8 @@ envoy_cc_test_library( "//test/test_common:environment_lib", "//test/test_common:registry_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:rds_cc", - "@envoy_api//envoy/config/filter/http/router/v2:router_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/http/router/v2:pkg_cc_proto", ], ) @@ -43,7 +43,7 @@ envoy_proto_library( srcs = ["header_parser_fuzz.proto"], deps = [ "//test/fuzz:common_proto", - "@envoy_api//envoy/api/v2/core:base_export", + "@envoy_api//envoy/api/v2/core:pkg", ], ) @@ -52,7 +52,7 @@ envoy_cc_fuzz_test( srcs = ["header_parser_fuzz_test.cc"], corpus = "header_parser_corpus", deps = [ - ":header_parser_fuzz_proto_cc", + ":header_parser_fuzz_proto_cc_proto", "//source/common/http:header_map_lib", "//source/common/router:header_parser_lib", "//test/fuzz:utility_lib", @@ -151,7 +151,7 @@ envoy_proto_library( srcs = ["route_fuzz.proto"], deps = [ "//test/fuzz:common_proto", - "@envoy_api//envoy/api/v2:rds_export", + "@envoy_api//envoy/api/v2:pkg", ], ) @@ -203,7 +203,7 @@ envoy_cc_fuzz_test( srcs = ["route_fuzz_test.cc"], corpus = ":route_corpus", deps = [ - ":route_fuzz_proto_cc", + ":route_fuzz_proto_cc_proto", "//source/common/router:config_lib", "//test/fuzz:utility_lib", "//test/mocks/server:server_mocks", @@ -223,7 +223,7 @@ envoy_cc_test( "//test/mocks/router:router_mocks", "//test/mocks/server:server_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:rds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -276,7 +276,7 @@ envoy_cc_test( "//test/mocks/ssl:ssl_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/filter/http/router/v2:router_cc", + "@envoy_api//envoy/config/filter/http/router/v2:pkg_cc_proto", ], ) diff --git a/test/common/router/corpus_from_config_impl.sh b/test/common/router/corpus_from_config_impl.sh index 37798d0133af..91b7963cb033 100755 --- a/test/common/router/corpus_from_config_impl.sh +++ b/test/common/router/corpus_from_config_impl.sh @@ -4,9 +4,8 @@ set -e -# TEST_SRCDIR/TEST_WORKSPACE don't matter to config_impl_test, but they need to -# be present because main.cc checks for their presence. -TEST_SRCDIR=/totally TEST_WORKSPACE=/bogus $* +# Set NORUNFILES so test/main doesn't fail when runfiles manifest is not found. +NORUNFILES=1 $* # Verify at least one entry is actually generated [ -e "${GENRULE_OUTPUT_DIR}"/generated_corpus_0 ] diff --git a/test/common/router/router_test.cc b/test/common/router/router_test.cc index becdedc624db..b3ebd37349be 100644 --- a/test/common/router/router_test.cc +++ b/test/common/router/router_test.cc @@ -86,7 +86,7 @@ class RouterTestBase : public testing::Test { : http_context_(stats_store_.symbolTable()), shadow_writer_(new MockShadowWriter()), config_("test.", local_info_, stats_store_, cm_, runtime_, random_, ShadowWriterPtr{shadow_writer_}, true, start_child_span, suppress_envoy_headers, - std::move(strict_headers_to_check), test_time_.timeSystem(), http_context_), + false, std::move(strict_headers_to_check), test_time_.timeSystem(), http_context_), router_(config_) { router_.setDecoderFilterCallbacks(callbacks_); upstream_locality_.set_zone("to_az"); @@ -3704,7 +3704,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(10), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); } @@ -3713,7 +3713,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3725,7 +3725,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "bad"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(10), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3738,7 +3738,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3752,7 +3752,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3766,7 +3766,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, true); + FilterUtility::finalTimeout(route, headers, true, false, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3781,7 +3781,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, true); + FilterUtility::finalTimeout(route, headers, true, true, true, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3795,7 +3795,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(7), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3810,7 +3810,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3824,7 +3824,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { .WillRepeatedly(Return(absl::optional(0))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(0), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("grpc-timeout")); @@ -3835,7 +3835,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(10), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("grpc-timeout")); @@ -3847,7 +3847,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(1000), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_EQ("1000m", headers.get_("grpc-timeout")); @@ -3859,7 +3859,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1000m"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(999), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_EQ("999m", headers.get_("grpc-timeout")); @@ -3870,7 +3870,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { .WillRepeatedly(Return(absl::optional(999))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "0m"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(999), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_EQ("999m", headers.get_("grpc-timeout")); @@ -3883,7 +3883,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { .WillRepeatedly(Return(absl::optional(10))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "100m"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(90), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); } @@ -3895,7 +3895,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { .WillRepeatedly(Return(absl::optional(10))); Http::TestHeaderMapImpl headers{{"content-type", "application/grpc"}, {"grpc-timeout", "1m"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(1), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); } @@ -3907,7 +3907,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3922,7 +3922,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "bad"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(1000), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3938,7 +3938,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { {"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3955,7 +3955,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { {"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3972,7 +3972,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { {"grpc-timeout", "1000m"}, {"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(7), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3990,7 +3990,7 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { {"x-envoy-upstream-rq-timeout-ms", "15"}, {"x-envoy-upstream-rq-per-try-timeout-ms", "5"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, true, false); + FilterUtility::finalTimeout(route, headers, true, true, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(5), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); @@ -3998,6 +3998,65 @@ TEST(RouterFilterUtilityTest, FinalTimeout) { EXPECT_EQ("5", headers.get_("x-envoy-expected-rq-timeout-ms")); EXPECT_EQ("5m", headers.get_("grpc-timeout")); } + { + NiceMock route; + EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); + Http::TestHeaderMapImpl headers{{"x-envoy-expected-rq-timeout-ms", "8"}}; + // Make ingress envoy respect `x-envoy-expected-rq-timeout-ms` header. + bool respect_expected_rq_timeout = true; + FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout( + route, headers, true, false, false, respect_expected_rq_timeout); + EXPECT_EQ(std::chrono::milliseconds(8), timeout.global_timeout_); + EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); + EXPECT_EQ("8", headers.get_("x-envoy-expected-rq-timeout-ms")); + EXPECT_FALSE(headers.has("grpc-timeout")); + } + { + NiceMock route; + EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); + Http::TestHeaderMapImpl headers{{"x-envoy-expected-rq-timeout-ms", "8"}, + {"x-envoy-upstream-rq-per-try-timeout-ms", "4"}}; + // Make ingress envoy respect `x-envoy-expected-rq-timeout-ms` header. + bool respect_expected_rq_timeout = true; + FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout( + route, headers, true, false, false, respect_expected_rq_timeout); + EXPECT_EQ(std::chrono::milliseconds(8), timeout.global_timeout_); + EXPECT_EQ(std::chrono::milliseconds(4), timeout.per_try_timeout_); + EXPECT_EQ("4", headers.get_("x-envoy-expected-rq-timeout-ms")); + EXPECT_FALSE(headers.has("grpc-timeout")); + } + { + NiceMock route; + EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); + Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "8"}}; + // Test that ingress envoy populates `x-envoy-expected-rq-timeout-ms` header if it has not been + // set by egress envoy. + bool respect_expected_rq_timeout = true; + FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout( + route, headers, true, false, false, respect_expected_rq_timeout); + EXPECT_EQ(std::chrono::milliseconds(8), timeout.global_timeout_); + EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); + EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); + EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); + EXPECT_EQ("8", headers.get_("x-envoy-expected-rq-timeout-ms")); + EXPECT_FALSE(headers.has("grpc-timeout")); + } + { + NiceMock route; + EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); + Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "8"}}; + // Make envoy override `x-envoy-expected-rq-timeout-ms` header. + // Test that ingress envoy sets `x-envoy-expected-rq-timeout-ms` header. + bool respect_expected_rq_timeout = false; + FilterUtility::TimeoutData timeout = FilterUtility::finalTimeout( + route, headers, true, false, false, respect_expected_rq_timeout); + EXPECT_EQ(std::chrono::milliseconds(8), timeout.global_timeout_); + EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); + EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); + EXPECT_FALSE(headers.has("x-envoy-upstream-rq-per-try-timeout-ms")); + EXPECT_EQ("8", headers.get_("x-envoy-expected-rq-timeout-ms")); + EXPECT_FALSE(headers.has("grpc-timeout")); + } } TEST(RouterFilterUtilityTest, FinalTimeoutSupressEnvoyHeaders) { @@ -4006,7 +4065,7 @@ TEST(RouterFilterUtilityTest, FinalTimeoutSupressEnvoyHeaders) { EXPECT_CALL(route, timeout()).WillOnce(Return(std::chrono::milliseconds(10))); Http::TestHeaderMapImpl headers{{"x-envoy-upstream-rq-timeout-ms", "15"}}; FilterUtility::TimeoutData timeout = - FilterUtility::finalTimeout(route, headers, true, false, false); + FilterUtility::finalTimeout(route, headers, true, false, false, false); EXPECT_EQ(std::chrono::milliseconds(15), timeout.global_timeout_); EXPECT_EQ(std::chrono::milliseconds(0), timeout.per_try_timeout_); EXPECT_FALSE(headers.has("x-envoy-upstream-rq-timeout-ms")); diff --git a/test/common/runtime/filesystem_setup.sh b/test/common/runtime/filesystem_setup.sh index cf95b6550a6e..39684619067a 100755 --- a/test/common/runtime/filesystem_setup.sh +++ b/test/common/runtime/filesystem_setup.sh @@ -5,7 +5,7 @@ set -e TEST_DATA=test/common/runtime/test_data # Regular runtime tests. -cd "${TEST_RUNDIR}" +cd "${TEST_SRCDIR}/envoy" rm -rf "${TEST_TMPDIR}/${TEST_DATA}" mkdir -p "${TEST_TMPDIR}/${TEST_DATA}" cp -RfL "${TEST_DATA}"/* "${TEST_TMPDIR}/${TEST_DATA}" diff --git a/test/common/secret/BUILD b/test/common/secret/BUILD index a2e85abcef8f..8d24a834b4d7 100644 --- a/test/common/secret/BUILD +++ b/test/common/secret/BUILD @@ -24,7 +24,7 @@ envoy_cc_test( "//test/test_common:registry_lib", "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/grpc_credential/v2alpha:file_based_metadata_cc", + "@envoy_api//envoy/config/grpc_credential/v2alpha:pkg_cc_proto", ], ) @@ -46,6 +46,6 @@ envoy_cc_test( "//test/test_common:environment_lib", "//test/test_common:registry_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/service/discovery/v2:sds_cc", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) diff --git a/test/common/stats/BUILD b/test/common/stats/BUILD index 65ed7bf5fd45..aee51b4cae23 100644 --- a/test/common/stats/BUILD +++ b/test/common/stats/BUILD @@ -172,7 +172,7 @@ envoy_cc_test( "//test/mocks/thread_local:thread_local_mocks", "//test/test_common:logging_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) diff --git a/test/common/upstream/BUILD b/test/common/upstream/BUILD index c33985798d53..2e29e3075a49 100644 --- a/test/common/upstream/BUILD +++ b/test/common/upstream/BUILD @@ -22,7 +22,7 @@ envoy_cc_test( "//test/mocks/protobuf:protobuf_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2/core:config_source_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) @@ -66,7 +66,7 @@ envoy_cc_test( "//test/test_common:simulated_time_system_lib", "//test/test_common:threadsafe_singleton_injector_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:cds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -106,7 +106,7 @@ envoy_cc_test( "//test/mocks/ssl:ssl_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -197,9 +197,8 @@ envoy_cc_test( "//test/mocks/upstream:upstream_mocks", "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2/endpoint:endpoint_cc", - "@envoy_api//envoy/api/v2/endpoint:load_report_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/api/v2/endpoint:pkg_cc_proto", ], ) @@ -219,8 +218,8 @@ envoy_cc_test( "//test/mocks/upstream:upstream_mocks", "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2/endpoint:load_report_cc", - "@envoy_api//envoy/service/discovery/v2:hds_cc", + "@envoy_api//envoy/api/v2/endpoint:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) diff --git a/test/config/BUILD b/test/config/BUILD index 4a6302513380..5ac346ec470e 100644 --- a/test/config/BUILD +++ b/test/config/BUILD @@ -29,10 +29,10 @@ envoy_cc_test_library( "//test/test_common:environment_lib", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/config/accesslog/v2:file_cc", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", - "@envoy_api//envoy/config/transport_socket/tap/v2alpha:tap_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/config/accesslog/v2:pkg_cc_proto", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", + "@envoy_api//envoy/config/transport_socket/tap/v2alpha:pkg_cc_proto", ], ) diff --git a/test/config/utility.cc b/test/config/utility.cc index 2cd563e33e62..8f994611ab28 100644 --- a/test/config/utility.cc +++ b/test/config/utility.cc @@ -617,16 +617,16 @@ void ConfigHelper::initializeTls(const ServerSslOptions& options, if (options.rsa_cert_) { auto* tls_certificate = common_tls_context.add_tls_certificates(); tls_certificate->mutable_certificate_chain()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/servercert.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/servercert.pem")); tls_certificate->mutable_private_key()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/serverkey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/serverkey.pem")); } if (options.ecdsa_cert_) { auto* tls_certificate = common_tls_context.add_tls_certificates(); tls_certificate->mutable_certificate_chain()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/server_ecdsacert.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/server_ecdsacert.pem")); tls_certificate->mutable_private_key()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/server_ecdsakey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/server_ecdsakey.pem")); } } diff --git a/test/config_test/example_configs_test_setup.sh b/test/config_test/example_configs_test_setup.sh index 618d8a0cb071..876438e7bea1 100755 --- a/test/config_test/example_configs_test_setup.sh +++ b/test/config_test/example_configs_test_setup.sh @@ -4,4 +4,4 @@ set -e DIR="$TEST_TMPDIR"/test/config_test mkdir -p "$DIR" -tar -xvf "$TEST_RUNDIR"/configs/example_configs.tar -C "$DIR" +tar -xvf "$TEST_SRCDIR"/envoy/configs/example_configs.tar -C "$DIR" diff --git a/test/exe/build_id_test.sh b/test/exe/build_id_test.sh index d51f5427999b..6c892cca8bcf 100755 --- a/test/exe/build_id_test.sh +++ b/test/exe/build_id_test.sh @@ -2,7 +2,7 @@ set -e -o pipefail -ENVOY_BIN=${TEST_RUNDIR}/source/exe/envoy-static +ENVOY_BIN=${TEST_SRCDIR}/envoy/source/exe/envoy-static if [[ `uname` == "Darwin" ]]; then BUILDID=$(otool -X -s __TEXT __build_id ${ENVOY_BIN} | grep -v section | cut -f2 | xxd -r -p) @@ -10,7 +10,7 @@ else BUILDID=$(file -L ${ENVOY_BIN} | sed -n -E 's/.*BuildID\[sha1\]=([0-9a-f]{40}).*/\1/p') fi -EXPECTED=$(cat ${TEST_RUNDIR}/bazel/raw_build_id.ldscript) +EXPECTED=$(cat ${TEST_SRCDIR}/envoy/bazel/raw_build_id.ldscript) if [[ ${BUILDID} != ${EXPECTED} ]]; then echo "Build ID mismatch, got: ${BUILDID}, expected: ${EXPECTED}". diff --git a/test/exe/envoy_static_test.sh b/test/exe/envoy_static_test.sh index 17832c183efd..4f2b3f06476a 100755 --- a/test/exe/envoy_static_test.sh +++ b/test/exe/envoy_static_test.sh @@ -1,6 +1,6 @@ #!/bin/bash -ENVOY_BIN=${TEST_RUNDIR}/source/exe/envoy-static +ENVOY_BIN=${TEST_SRCDIR}/envoy/source/exe/envoy-static if [[ `uname` == "Darwin" ]]; then echo "macOS doesn't support statically linked binaries, skipping." diff --git a/test/exe/main_common_test.cc b/test/exe/main_common_test.cc index 7af5aee32c6a..801fb8341a95 100644 --- a/test/exe/main_common_test.cc +++ b/test/exe/main_common_test.cc @@ -30,13 +30,13 @@ namespace Envoy { * Captures common functions needed for invoking MainCommon. Generates a * unique --base-id setting based on the pid and a random number. Maintains * an argv array that is terminated with nullptr. Identifies the config - * file relative to $TEST_RUNDIR. + * file relative to runfiles directory. */ class MainCommonTest : public testing::TestWithParam { protected: MainCommonTest() : config_file_(TestEnvironment::temporaryFileSubstitute( - "/test/config/integration/google_com_proxy_port_0.v2.yaml", TestEnvironment::ParamMap(), + "test/config/integration/google_com_proxy_port_0.v2.yaml", TestEnvironment::ParamMap(), TestEnvironment::PortMap(), GetParam())), random_string_(fmt::format("{}", computeBaseId())), argv_({"envoy-static", "--base-id", random_string_.c_str(), "-c", config_file_.c_str(), diff --git a/test/exe/version_out_test.sh b/test/exe/version_out_test.sh index 566913486893..0571354422f5 100755 --- a/test/exe/version_out_test.sh +++ b/test/exe/version_out_test.sh @@ -2,12 +2,12 @@ set -e -o pipefail -ENVOY_BIN=${TEST_RUNDIR}/source/exe/envoy-static +ENVOY_BIN=${TEST_SRCDIR}/envoy/source/exe/envoy-static COMMIT=$(${ENVOY_BIN} --version | \ sed -n -E 's/.*version: ([0-9a-f]{40})\/([0-9]+\.[0-9]+\.[0-9]+)(-dev)?\/(Clean|Modified)\/(RELEASE|DEBUG)\/([a-zA-Z-]+)$/\1/p') -EXPECTED=$(cat ${TEST_RUNDIR}/bazel/raw_build_id.ldscript) +EXPECTED=$(cat ${TEST_SRCDIR}/envoy/bazel/raw_build_id.ldscript) if [[ ${COMMIT} != ${EXPECTED} ]]; then echo "Commit mismatch, got: ${COMMIT}, expected: ${EXPECTED}". @@ -17,7 +17,7 @@ fi VERSION=$(${ENVOY_BIN} --version | \ sed -n -E 's/.*version: ([0-9a-f]{40})\/([0-9]+\.[0-9]+\.[0-9]+)(-dev)?\/(Clean|Modified)\/(RELEASE|DEBUG)\/([a-zA-Z-]+)$/\2\3/p') -EXPECTED=$(cat ${TEST_RUNDIR}/VERSION) +EXPECTED=$(cat ${TEST_SRCDIR}/envoy/VERSION) if [[ ${VERSION} != ${EXPECTED} ]]; then echo "Version mismatch, got: ${VERSION}, expected: ${EXPECTED}". diff --git a/test/extensions/clusters/redis/BUILD b/test/extensions/clusters/redis/BUILD index 25495a9d7d95..67e6e6df8235 100644 --- a/test/extensions/clusters/redis/BUILD +++ b/test/extensions/clusters/redis/BUILD @@ -40,7 +40,7 @@ envoy_extension_cc_test( "//test/mocks/thread_local:thread_local_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/cluster/redis:redis_cluster_cc", + "@envoy_api//envoy/config/cluster/redis:pkg_cc_proto", ], ) @@ -77,7 +77,7 @@ envoy_extension_cc_test( "//test/mocks/thread_local:thread_local_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/cluster/redis:redis_cluster_cc", + "@envoy_api//envoy/config/cluster/redis:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/common/ext_authz/BUILD b/test/extensions/filters/common/ext_authz/BUILD index 11ea6860feba..9690ed599a92 100644 --- a/test/extensions/filters/common/ext_authz/BUILD +++ b/test/extensions/filters/common/ext_authz/BUILD @@ -62,6 +62,6 @@ envoy_cc_mock( "//test/extensions/filters/common/ext_authz:ext_authz_mocks", "//test/mocks/grpc:grpc_mocks", "//test/mocks/upstream:upstream_mocks", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/http/fault/BUILD b/test/extensions/filters/http/fault/BUILD index 206108a20975..01710aa2bd80 100644 --- a/test/extensions/filters/http/fault/BUILD +++ b/test/extensions/filters/http/fault/BUILD @@ -19,7 +19,6 @@ envoy_extension_cc_test( "//include/envoy/event:dispatcher_interface", "//source/common/buffer:buffer_lib", "//source/common/common:empty_string", - "//source/common/config:filter_json_lib", "//source/common/http:header_map_lib", "//source/common/http:headers_lib", "//source/common/stats:stats_lib", diff --git a/test/extensions/filters/http/fault/fault_filter_test.cc b/test/extensions/filters/http/fault/fault_filter_test.cc index 24442c47747b..2430d654ff53 100644 --- a/test/extensions/filters/http/fault/fault_filter_test.cc +++ b/test/extensions/filters/http/fault/fault_filter_test.cc @@ -3,11 +3,12 @@ #include #include +#include "envoy/config/filter/http/fault/v2/fault.pb.h" +#include "envoy/config/filter/http/fault/v2/fault.pb.validate.h" #include "envoy/event/dispatcher.h" #include "common/buffer/buffer_impl.h" #include "common/common/empty_string.h" -#include "common/config/filter_json.h" #include "common/http/header_map_impl.h" #include "common/http/headers.h" @@ -39,93 +40,87 @@ namespace { class FaultFilterTest : public testing::Test { public: - const std::string fixed_delay_and_abort_nodes_json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 100, - "fixed_duration_ms" : 5000 - }, - "abort" : { - "abort_percent" : 100, - "http_status" : 503 - }, - "downstream_nodes": ["canary"] - } - )EOF"; - - const std::string fixed_delay_only_json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 100, - "fixed_duration_ms" : 5000 - } - } - )EOF"; - - const std::string abort_only_json = R"EOF( - { - "abort" : { - "abort_percent" : 100, - "http_status" : 429 - } - } - )EOF"; - - const std::string fixed_delay_and_abort_json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 100, - "fixed_duration_ms" : 5000 - }, - "abort" : { - "abort_percent" : 100, - "http_status" : 503 - } - } - )EOF"; - - const std::string fixed_delay_and_abort_match_headers_json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 100, - "fixed_duration_ms" : 5000 - }, - "abort" : { - "abort_percent" : 100, - "http_status" : 503 - }, - "headers" : [ - {"name" : "X-Foo1", "value" : "Bar"}, - {"name" : "X-Foo2"} - ] - } - )EOF"; - - const std::string delay_with_upstream_cluster_json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 100, - "fixed_duration_ms" : 5000 - }, - "upstream_cluster" : "www1" - } - )EOF"; - - const std::string v2_empty_fault_config_json = R"EOF( - { - } - )EOF"; + const std::string fixed_delay_and_abort_nodes_yaml = R"EOF( + delay: + type: fixed + percentage: + numerator: 100 + denominator: HUNDRED + fixed_delay: 5s + abort: + percentage: + numerator: 100 + denominator: HUNDRED + http_status: 503 + downstream_nodes: + - canary + )EOF"; + + const std::string fixed_delay_only_yaml = R"EOF( + delay: + type: fixed + percentage: + numerator: 100 + denominator: HUNDRED + fixed_delay: 5s + )EOF"; + + const std::string abort_only_yaml = R"EOF( + abort: + percentage: + numerator: 100 + denominator: HUNDRED + http_status: 429 + )EOF"; + + const std::string fixed_delay_and_abort_yaml = R"EOF( + delay: + type: fixed + percentage: + numerator: 100 + denominator: HUNDRED + fixed_delay: 5s + abort: + percentage: + numerator: 100 + denominator: HUNDRED + http_status: 503 + )EOF"; + + const std::string fixed_delay_and_abort_match_headers_yaml = R"EOF( + delay: + type: fixed + percentage: + numerator: 100 + denominator: HUNDRED + fixed_delay: 5s + abort: + percentage: + numerator: 100 + denominator: HUNDRED + http_status: 503 + headers: + - name: X-Foo1 + exact_match: Bar + - name: X-Foo2 + )EOF"; + + const std::string delay_with_upstream_cluster_yaml = R"EOF( + delay: + type: fixed + percentage: + numerator: 100 + denominator: HUNDRED + fixed_delay: 5s + upstream_cluster: www1 + )EOF"; + + const std::string v2_empty_fault_config_yaml = "{}"; envoy::config::filter::http::fault::v2::HTTPFault - convertJsonStrToProtoConfig(const std::string json) { - Json::ObjectSharedPtr config = Json::Factory::loadFromString(json); + convertYamlStrToProtoConfig(const std::string& yaml) { envoy::config::filter::http::fault::v2::HTTPFault fault; - Config::FilterJson::translateFaultFilter(*config, fault); + TestUtility::loadFromYaml(yaml, fault); return fault; } @@ -137,7 +132,7 @@ class FaultFilterTest : public testing::Test { EXPECT_CALL(decoder_filter_callbacks_.dispatcher_, setTrackedObject(_)).Times(AnyNumber()); } - void SetUpTest(const std::string json) { SetUpTest(convertJsonStrToProtoConfig(json)); } + void SetUpTest(const std::string& yaml) { SetUpTest(convertYamlStrToProtoConfig(yaml)); } void expectDelayTimer(uint64_t duration_ms) { timer_ = new Event::MockTimer(&decoder_filter_callbacks_.dispatcher_); @@ -161,104 +156,72 @@ class FaultFilterTest : public testing::Test { Event::SimulatedTimeSystem time_system_; }; -void faultFilterBadConfigHelper(const std::string& json) { - Json::ObjectSharedPtr config = Json::Factory::loadFromString(json); +void faultFilterBadConfigHelper(const std::string& yaml) { envoy::config::filter::http::fault::v2::HTTPFault fault; - EXPECT_THROW(Config::FilterJson::translateFaultFilter(*config, fault), EnvoyException); -} - -TEST(FaultFilterBadConfigTest, BadAbortPercent) { - const std::string json = R"EOF( - { - "abort" : { - "abort_percent" : 200, - "http_status" : 429 - } - } - )EOF"; - - faultFilterBadConfigHelper(json); + EXPECT_THROW(TestUtility::loadFromYamlAndValidate(yaml, fault), EnvoyException); } TEST(FaultFilterBadConfigTest, EmptyDownstreamNodes) { - const std::string json = R"EOF( - { - "abort" : { - "abort_percent" : 80, - "http_status" : 503 - }, - "downstream_nodes": [] - } + const std::string yaml = R"EOF( + abort: + abort_percent: + numerator: 80 + denominator: HUNDRED + http_status: 503 + downstream_nodes: [] + )EOF"; - faultFilterBadConfigHelper(json); + faultFilterBadConfigHelper(yaml); } TEST(FaultFilterBadConfigTest, MissingHTTPStatus) { - const std::string json = R"EOF( - { - "abort" : { - "abort_percent" : 100 - } - } + const std::string yaml = R"EOF( + abort: + abort_percent: + numerator: 100 + denominator: HUNDRED )EOF"; - faultFilterBadConfigHelper(json); + faultFilterBadConfigHelper(yaml); } TEST(FaultFilterBadConfigTest, BadDelayType) { - const std::string json = R"EOF( - { - "delay" : { - "type" : "foo", - "fixed_delay_percent" : 50, - "fixed_duration_ms" : 5000 - } - } - )EOF"; - - faultFilterBadConfigHelper(json); -} - -TEST(FaultFilterBadConfigTest, BadDelayPercent) { - const std::string json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 500, - "fixed_duration_ms" : 5000 - } - } + const std::string yaml = R"EOF( + delay: + type: foo + percentage: + numerator: 50 + denominator: HUNDRED + fixed_delay: 5s )EOF"; - faultFilterBadConfigHelper(json); + faultFilterBadConfigHelper(yaml); } TEST(FaultFilterBadConfigTest, BadDelayDuration) { - const std::string json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 50, - "fixed_duration_ms" : 0 - } - } + const std::string yaml = R"EOF( + delay: + type: fixed + percentage: + numerator: 50 + denominator: HUNDRED + fixed_delay: 0s )EOF"; - faultFilterBadConfigHelper(json); + faultFilterBadConfigHelper(yaml); } TEST(FaultFilterBadConfigTest, MissingDelayDuration) { - const std::string json = R"EOF( - { - "delay" : { - "type" : "fixed", - "fixed_delay_percent" : 50 - } - } + const std::string yaml = R"EOF( + delay: + type: fixed + percentage: + numerator: 50 + denominator: HUNDRED )EOF"; - faultFilterBadConfigHelper(json); + faultFilterBadConfigHelper(yaml); } TEST_F(FaultFilterTest, AbortWithHttpStatus) { @@ -312,7 +275,7 @@ TEST_F(FaultFilterTest, AbortWithHttpStatus) { } TEST_F(FaultFilterTest, FixedDelayZeroDuration) { - SetUpTest(fixed_delay_only_json); + SetUpTest(fixed_delay_only_yaml); EXPECT_CALL(runtime_.snapshot_, getInteger("fault.http.max_active_faults", std::numeric_limits::max())) @@ -415,7 +378,7 @@ TEST_F(FaultFilterTest, FixedDelayDeprecatedPercentAndNonZeroDuration) { } TEST_F(FaultFilterTest, DelayForDownstreamCluster) { - SetUpTest(fixed_delay_only_json); + SetUpTest(fixed_delay_only_yaml); EXPECT_CALL(runtime_.snapshot_, getInteger("fault.http.max_active_faults", std::numeric_limits::max())) @@ -476,7 +439,7 @@ TEST_F(FaultFilterTest, DelayForDownstreamCluster) { } TEST_F(FaultFilterTest, FixedDelayAndAbortDownstream) { - SetUpTest(fixed_delay_and_abort_json); + SetUpTest(fixed_delay_and_abort_yaml); EXPECT_CALL(runtime_.snapshot_, getInteger("fault.http.max_active_faults", std::numeric_limits::max())) @@ -548,7 +511,7 @@ TEST_F(FaultFilterTest, FixedDelayAndAbortDownstream) { } TEST_F(FaultFilterTest, FixedDelayAndAbort) { - SetUpTest(fixed_delay_and_abort_json); + SetUpTest(fixed_delay_and_abort_yaml); EXPECT_CALL(runtime_.snapshot_, getInteger("fault.http.max_active_faults", std::numeric_limits::max())) @@ -602,7 +565,7 @@ TEST_F(FaultFilterTest, FixedDelayAndAbort) { } TEST_F(FaultFilterTest, FixedDelayAndAbortDownstreamNodes) { - SetUpTest(fixed_delay_and_abort_nodes_json); + SetUpTest(fixed_delay_and_abort_nodes_yaml); EXPECT_CALL(runtime_.snapshot_, getInteger("fault.http.max_active_faults", std::numeric_limits::max())) @@ -654,7 +617,7 @@ TEST_F(FaultFilterTest, FixedDelayAndAbortDownstreamNodes) { } TEST_F(FaultFilterTest, NoDownstreamMatch) { - SetUpTest(fixed_delay_and_abort_nodes_json); + SetUpTest(fixed_delay_and_abort_nodes_yaml); EXPECT_CALL(runtime_.snapshot_, getInteger("fault.http.max_active_faults", std::numeric_limits::max())) @@ -664,7 +627,7 @@ TEST_F(FaultFilterTest, NoDownstreamMatch) { } TEST_F(FaultFilterTest, FixedDelayAndAbortHeaderMatchSuccess) { - SetUpTest(fixed_delay_and_abort_match_headers_json); + SetUpTest(fixed_delay_and_abort_match_headers_yaml); request_headers_.addCopy("x-foo1", "Bar"); request_headers_.addCopy("x-foo2", "RandomValue"); @@ -719,7 +682,7 @@ TEST_F(FaultFilterTest, FixedDelayAndAbortHeaderMatchSuccess) { } TEST_F(FaultFilterTest, FixedDelayAndAbortHeaderMatchFail) { - SetUpTest(fixed_delay_and_abort_match_headers_json); + SetUpTest(fixed_delay_and_abort_match_headers_yaml); request_headers_.addCopy("x-foo1", "Bar"); request_headers_.addCopy("x-foo3", "Baz"); @@ -749,7 +712,7 @@ TEST_F(FaultFilterTest, FixedDelayAndAbortHeaderMatchFail) { } TEST_F(FaultFilterTest, TimerResetAfterStreamReset) { - SetUpTest(fixed_delay_only_json); + SetUpTest(fixed_delay_only_yaml); EXPECT_CALL(runtime_.snapshot_, getInteger("fault.http.max_active_faults", std::numeric_limits::max())) @@ -798,7 +761,7 @@ TEST_F(FaultFilterTest, TimerResetAfterStreamReset) { } TEST_F(FaultFilterTest, FaultWithTargetClusterMatchSuccess) { - SetUpTest(delay_with_upstream_cluster_json); + SetUpTest(delay_with_upstream_cluster_yaml); const std::string upstream_cluster("www1"); EXPECT_CALL(decoder_filter_callbacks_.route_->route_entry_, clusterName()) @@ -848,7 +811,7 @@ TEST_F(FaultFilterTest, FaultWithTargetClusterMatchSuccess) { } TEST_F(FaultFilterTest, FaultWithTargetClusterMatchFail) { - SetUpTest(delay_with_upstream_cluster_json); + SetUpTest(delay_with_upstream_cluster_yaml); const std::string upstream_cluster("mismatch"); EXPECT_CALL(decoder_filter_callbacks_.route_->route_entry_, clusterName()) @@ -877,7 +840,7 @@ TEST_F(FaultFilterTest, FaultWithTargetClusterMatchFail) { } TEST_F(FaultFilterTest, FaultWithTargetClusterNullRoute) { - SetUpTest(delay_with_upstream_cluster_json); + SetUpTest(delay_with_upstream_cluster_yaml); const std::string upstream_cluster("www1"); EXPECT_CALL(*decoder_filter_callbacks_.route_, routeEntry()).WillRepeatedly(Return(nullptr)); @@ -959,12 +922,12 @@ void FaultFilterTest::TestPerFilterConfigFault( TEST_F(FaultFilterTest, RouteFaultOverridesListenerFault) { - Fault::FaultSettings abort_fault(convertJsonStrToProtoConfig(abort_only_json)); - Fault::FaultSettings delay_fault(convertJsonStrToProtoConfig(delay_with_upstream_cluster_json)); + Fault::FaultSettings abort_fault(convertYamlStrToProtoConfig(abort_only_yaml)); + Fault::FaultSettings delay_fault(convertYamlStrToProtoConfig(delay_with_upstream_cluster_yaml)); // route-level fault overrides listener-level fault { - SetUpTest(v2_empty_fault_config_json); // This is a valid listener level fault + SetUpTest(v2_empty_fault_config_yaml); // This is a valid listener level fault TestPerFilterConfigFault(&delay_fault, nullptr); } @@ -972,7 +935,7 @@ TEST_F(FaultFilterTest, RouteFaultOverridesListenerFault) { { config_->stats().aborts_injected_.reset(); config_->stats().delays_injected_.reset(); - SetUpTest(v2_empty_fault_config_json); + SetUpTest(v2_empty_fault_config_yaml); TestPerFilterConfigFault(nullptr, &delay_fault); } @@ -980,7 +943,7 @@ TEST_F(FaultFilterTest, RouteFaultOverridesListenerFault) { { config_->stats().aborts_injected_.reset(); config_->stats().delays_injected_.reset(); - SetUpTest(v2_empty_fault_config_json); + SetUpTest(v2_empty_fault_config_yaml); TestPerFilterConfigFault(&delay_fault, &abort_fault); } } diff --git a/test/extensions/filters/http/grpc_json_transcoder/BUILD b/test/extensions/filters/http/grpc_json_transcoder/BUILD index 831f8c2fdfc0..e562f4bdda6f 100644 --- a/test/extensions/filters/http/grpc_json_transcoder/BUILD +++ b/test/extensions/filters/http/grpc_json_transcoder/BUILD @@ -23,7 +23,7 @@ envoy_extension_cc_test( "//source/extensions/filters/http/grpc_json_transcoder:json_transcoder_filter_lib", "//test/mocks/http:http_mocks", "//test/mocks/upstream:upstream_mocks", - "//test/proto:bookstore_proto_cc", + "//test/proto:bookstore_proto_cc_proto", "//test/test_common:environment_lib", "//test/test_common:utility_lib", ], @@ -53,7 +53,7 @@ envoy_extension_cc_test( "//source/common/http:header_map_lib", "//source/extensions/filters/http/grpc_json_transcoder:config", "//test/integration:http_integration_lib", - "//test/proto:bookstore_proto_cc", + "//test/proto:bookstore_proto_cc_proto", "//test/test_common:utility_lib", ], ) diff --git a/test/extensions/filters/http/grpc_json_transcoder/grpc_json_transcoder_integration_test.cc b/test/extensions/filters/http/grpc_json_transcoder/grpc_json_transcoder_integration_test.cc index 66043362e43d..ee1d1a5fb84c 100644 --- a/test/extensions/filters/http/grpc_json_transcoder/grpc_json_transcoder_integration_test.cc +++ b/test/extensions/filters/http/grpc_json_transcoder/grpc_json_transcoder_integration_test.cc @@ -42,7 +42,7 @@ class GrpcJsonTranscoderIntegrationTest services : "bookstore.Bookstore" )EOF"; config_helper_.addFilter( - fmt::format(filter, TestEnvironment::runfilesPath("/test/proto/bookstore.descriptor"))); + fmt::format(filter, TestEnvironment::runfilesPath("test/proto/bookstore.descriptor"))); } /** @@ -340,7 +340,7 @@ TEST_P(GrpcJsonTranscoderIntegrationTest, UnaryGetError1) { ignore_unknown_query_parameters : true )EOF"; config_helper_.addFilter( - fmt::format(filter, TestEnvironment::runfilesPath("/test/proto/bookstore.descriptor"))); + fmt::format(filter, TestEnvironment::runfilesPath("test/proto/bookstore.descriptor"))); HttpIntegrationTest::initialize(); testTranscoding( Http::TestHeaderMapImpl{{":method", "GET"}, @@ -363,7 +363,7 @@ TEST_P(GrpcJsonTranscoderIntegrationTest, UnaryErrorConvertedToJson) { convert_grpc_status: true )EOF"; config_helper_.addFilter( - fmt::format(filter, TestEnvironment::runfilesPath("/test/proto/bookstore.descriptor"))); + fmt::format(filter, TestEnvironment::runfilesPath("test/proto/bookstore.descriptor"))); HttpIntegrationTest::initialize(); testTranscoding( Http::TestHeaderMapImpl{ @@ -387,7 +387,7 @@ TEST_P(GrpcJsonTranscoderIntegrationTest, UnaryErrorInTrailerConvertedToJson) { convert_grpc_status: true )EOF"; config_helper_.addFilter( - fmt::format(filter, TestEnvironment::runfilesPath("/test/proto/bookstore.descriptor"))); + fmt::format(filter, TestEnvironment::runfilesPath("test/proto/bookstore.descriptor"))); HttpIntegrationTest::initialize(); testTranscoding( Http::TestHeaderMapImpl{ @@ -411,7 +411,7 @@ TEST_P(GrpcJsonTranscoderIntegrationTest, StreamingErrorConvertedToJson) { convert_grpc_status: true )EOF"; config_helper_.addFilter( - fmt::format(filter, TestEnvironment::runfilesPath("/test/proto/bookstore.descriptor"))); + fmt::format(filter, TestEnvironment::runfilesPath("test/proto/bookstore.descriptor"))); HttpIntegrationTest::initialize(); testTranscoding( Http::TestHeaderMapImpl{ diff --git a/test/extensions/filters/http/original_src/BUILD b/test/extensions/filters/http/original_src/BUILD index 851df2edd9fe..f0526545aa60 100644 --- a/test/extensions/filters/http/original_src/BUILD +++ b/test/extensions/filters/http/original_src/BUILD @@ -18,7 +18,7 @@ envoy_extension_cc_test( extension_name = "envoy.filters.http.original_src", deps = [ "//source/extensions/filters/http/original_src:config_lib", - "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:pkg_cc_proto", ], ) @@ -31,7 +31,7 @@ envoy_extension_cc_test( "//source/extensions/filters/http/original_src:config_lib", "//source/extensions/filters/http/original_src:original_src_lib", "//test/mocks/server:server_mocks", - "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:pkg_cc_proto", ], ) @@ -48,6 +48,6 @@ envoy_extension_cc_test( "//test/mocks/network:network_mocks", "//test/test_common:printers_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/http/original_src/v2alpha1:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/listener/original_src/BUILD b/test/extensions/filters/listener/original_src/BUILD index 9a43087b8efa..0732355d2dbc 100644 --- a/test/extensions/filters/listener/original_src/BUILD +++ b/test/extensions/filters/listener/original_src/BUILD @@ -18,7 +18,7 @@ envoy_extension_cc_test( extension_name = "envoy.filters.listener.original_src", deps = [ "//source/extensions/filters/listener/original_src:config_lib", - "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:pkg_cc_proto", ], ) @@ -31,7 +31,7 @@ envoy_extension_cc_test( "//source/extensions/filters/listener/original_src:config_lib", "//source/extensions/filters/listener/original_src:original_src_lib", "//test/mocks/server:server_mocks", - "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:pkg_cc_proto", ], ) @@ -46,6 +46,6 @@ envoy_extension_cc_test( "//test/mocks/buffer:buffer_mocks", "//test/mocks/network:network_mocks", "//test/test_common:printers_lib", - "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:original_src_cc", + "@envoy_api//envoy/config/filter/listener/original_src/v2alpha1:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/network/common/redis/BUILD b/test/extensions/filters/network/common/redis/BUILD index 8b0f46b1600f..7e6890d52f48 100644 --- a/test/extensions/filters/network/common/redis/BUILD +++ b/test/extensions/filters/network/common/redis/BUILD @@ -26,7 +26,7 @@ envoy_cc_test_library( hdrs = ["test_utils.h"], deps = [ "//source/common/protobuf:utility_lib", - "@envoy_api//envoy/config/filter/network/redis_proxy/v2:redis_proxy_cc", + "@envoy_api//envoy/config/filter/network/redis_proxy/v2:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/network/common/redis/test_utils.h b/test/extensions/filters/network/common/redis/test_utils.h index bc26dfbf0210..9e30d44cb8c7 100644 --- a/test/extensions/filters/network/common/redis/test_utils.h +++ b/test/extensions/filters/network/common/redis/test_utils.h @@ -8,8 +8,6 @@ #include "common/protobuf/utility.h" -#include "external/envoy_api/envoy/config/filter/network/redis_proxy/v2/redis_proxy.pb.h" - namespace Envoy { namespace Extensions { namespace NetworkFilters { diff --git a/test/extensions/filters/network/dubbo_proxy/BUILD b/test/extensions/filters/network/dubbo_proxy/BUILD index f59221ca29d9..31a09ff9a1da 100644 --- a/test/extensions/filters/network/dubbo_proxy/BUILD +++ b/test/extensions/filters/network/dubbo_proxy/BUILD @@ -30,7 +30,7 @@ envoy_cc_mock( "//test/mocks/network:network_mocks", "//test/mocks/stream_info:stream_info_mocks", "//test/test_common:printers_lib", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) @@ -92,7 +92,7 @@ envoy_extension_cc_test( "//source/extensions/filters/network/dubbo_proxy/filters:filter_config_interface", "//test/mocks/server:server_mocks", "//test/test_common:registry_lib", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) @@ -114,7 +114,7 @@ envoy_extension_cc_test( "//source/extensions/filters/network/dubbo_proxy:metadata_lib", "//source/extensions/filters/network/dubbo_proxy/router:route_matcher", "//test/mocks/server:server_mocks", - "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:dubbo_proxy_cc", + "@envoy_api//envoy/config/filter/network/dubbo_proxy/v2alpha1:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/network/thrift_proxy/BUILD b/test/extensions/filters/network/thrift_proxy/BUILD index 9b2403f8acd1..638ee9b4afe2 100644 --- a/test/extensions/filters/network/thrift_proxy/BUILD +++ b/test/extensions/filters/network/thrift_proxy/BUILD @@ -56,7 +56,7 @@ envoy_extension_cc_test_library( "//source/common/common:byte_order_lib", "//source/extensions/filters/network/thrift_proxy:thrift_lib", "//test/common/buffer:utility_lib", - "@envoy_api//envoy/config/filter/network/thrift_proxy/v2alpha1:thrift_proxy_cc", + "@envoy_api//envoy/config/filter/network/thrift_proxy/v2alpha1:pkg_cc_proto", ], ) @@ -290,7 +290,7 @@ envoy_extension_cc_test( "//test/mocks/ratelimit:ratelimit_mocks", "//test/mocks/server:server_mocks", "//test/test_common:printers_lib", - "@envoy_api//envoy/config/filter/thrift/rate_limit/v2alpha1:rate_limit_cc", + "@envoy_api//envoy/config/filter/thrift/rate_limit/v2alpha1:pkg_cc_proto", ], ) diff --git a/test/extensions/filters/network/thrift_proxy/driver/generate_fixture.sh b/test/extensions/filters/network/thrift_proxy/driver/generate_fixture.sh index 266a7314f2fe..74ed8a9cceaa 100755 --- a/test/extensions/filters/network/thrift_proxy/driver/generate_fixture.sh +++ b/test/extensions/filters/network/thrift_proxy/driver/generate_fixture.sh @@ -15,7 +15,7 @@ function usage() { FIXTURE_DIR="${TEST_TMPDIR}" mkdir -p "${FIXTURE_DIR}" -DRIVER_DIR="${TEST_RUNDIR}/test/extensions/filters/network/thrift_proxy/driver" +DRIVER_DIR="${TEST_SRCDIR}/envoy/test/extensions/filters/network/thrift_proxy/driver" if [[ -z "${TEST_UDSDIR}" ]]; then TEST_UDSDIR=`mktemp -d /tmp/envoy_test_thrift.XXXXXX` diff --git a/test/extensions/grpc_credentials/aws_iam/BUILD b/test/extensions/grpc_credentials/aws_iam/BUILD index 54acfea8cbc6..07afc2edd971 100644 --- a/test/extensions/grpc_credentials/aws_iam/BUILD +++ b/test/extensions/grpc_credentials/aws_iam/BUILD @@ -18,6 +18,6 @@ envoy_cc_test( "//source/extensions/grpc_credentials/aws_iam:config", "//test/common/grpc:grpc_client_integration_test_harness_lib", "//test/integration:integration_lib", - "@envoy_api//envoy/config/grpc_credential/v2alpha:aws_iam_cc", + "@envoy_api//envoy/config/grpc_credential/v2alpha:pkg_cc_proto", ] + envoy_select_google_grpc(["//source/common/grpc:google_async_client_lib"]), ) diff --git a/test/extensions/grpc_credentials/file_based_metadata/BUILD b/test/extensions/grpc_credentials/file_based_metadata/BUILD index 72c54caee2ba..74d148c643d1 100644 --- a/test/extensions/grpc_credentials/file_based_metadata/BUILD +++ b/test/extensions/grpc_credentials/file_based_metadata/BUILD @@ -18,6 +18,6 @@ envoy_cc_test( "//source/extensions/grpc_credentials/file_based_metadata:config", "//test/common/grpc:grpc_client_integration_test_harness_lib", "//test/integration:integration_lib", - "@envoy_api//envoy/config/grpc_credential/v2alpha:file_based_metadata_cc", + "@envoy_api//envoy/config/grpc_credential/v2alpha:pkg_cc_proto", ] + envoy_select_google_grpc(["//source/common/grpc:google_async_client_lib"]), ) diff --git a/test/extensions/quic_listeners/quiche/BUILD b/test/extensions/quic_listeners/quiche/BUILD index 74659b582958..418fb2676fe2 100644 --- a/test/extensions/quic_listeners/quiche/BUILD +++ b/test/extensions/quic_listeners/quiche/BUILD @@ -177,6 +177,6 @@ envoy_cc_test( "//source/common/config:utility_lib", "//source/extensions/quic_listeners/quiche:active_quic_listener_config_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2/listener:quic_config_cc", + "@envoy_api//envoy/api/v2/listener:pkg_cc_proto", ], ) diff --git a/test/extensions/resource_monitors/fixed_heap/BUILD b/test/extensions/resource_monitors/fixed_heap/BUILD index 9f2c70e72606..724e9d5e4289 100644 --- a/test/extensions/resource_monitors/fixed_heap/BUILD +++ b/test/extensions/resource_monitors/fixed_heap/BUILD @@ -31,6 +31,6 @@ envoy_extension_cc_test( "//source/extensions/resource_monitors/fixed_heap:config", "//source/server:resource_monitor_config_lib", "//test/mocks/event:event_mocks", - "@envoy_api//envoy/config/resource_monitor/fixed_heap/v2alpha:fixed_heap_cc", + "@envoy_api//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg_cc_proto", ], ) diff --git a/test/extensions/resource_monitors/injected_resource/BUILD b/test/extensions/resource_monitors/injected_resource/BUILD index 47c1986ce3c6..9df0987dbab3 100644 --- a/test/extensions/resource_monitors/injected_resource/BUILD +++ b/test/extensions/resource_monitors/injected_resource/BUILD @@ -36,6 +36,6 @@ envoy_extension_cc_test( "//source/extensions/resource_monitors/injected_resource:config", "//source/server:resource_monitor_config_lib", "//test/test_common:environment_lib", - "@envoy_api//envoy/config/resource_monitor/injected_resource/v2alpha:injected_resource_cc", + "@envoy_api//envoy/config/resource_monitor/injected_resource/v2alpha:pkg_cc_proto", ], ) diff --git a/test/extensions/stats_sinks/dog_statsd/BUILD b/test/extensions/stats_sinks/dog_statsd/BUILD index e5bde86b99cf..66a5d61b3711 100644 --- a/test/extensions/stats_sinks/dog_statsd/BUILD +++ b/test/extensions/stats_sinks/dog_statsd/BUILD @@ -23,6 +23,6 @@ envoy_extension_cc_test( "//test/test_common:environment_lib", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) diff --git a/test/extensions/stats_sinks/metrics_service/BUILD b/test/extensions/stats_sinks/metrics_service/BUILD index d9759e8df43d..76fae1b80eff 100644 --- a/test/extensions/stats_sinks/metrics_service/BUILD +++ b/test/extensions/stats_sinks/metrics_service/BUILD @@ -42,6 +42,6 @@ envoy_extension_cc_test( "//test/common/grpc:grpc_client_integration_lib", "//test/integration:http_integration_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/service/metrics/v2:metrics_service_cc", + "@envoy_api//envoy/service/metrics/v2:pkg_cc_proto", ], ) diff --git a/test/extensions/tracers/dynamic_ot/config_test.cc b/test/extensions/tracers/dynamic_ot/config_test.cc index 418609f0be21..5c11d6172f69 100644 --- a/test/extensions/tracers/dynamic_ot/config_test.cc +++ b/test/extensions/tracers/dynamic_ot/config_test.cc @@ -24,15 +24,16 @@ TEST(DynamicOtTracerConfigTest, DynamicOpentracingHttpTracer) { ON_CALL(*server.cluster_manager_.thread_local_cluster_.cluster_.info_, features()) .WillByDefault(Return(Upstream::ClusterInfo::Features::HTTP2)); - const std::string yaml_string = fmt::sprintf(R"EOF( + const std::string yaml_string = fmt::sprintf( + R"EOF( http: name: envoy.dynamic.ot config: - library: %s/external/io_opentracing_cpp/mocktracer/libmocktracer_plugin.so + library: %s config: output_file: fake_file )EOF", - TestEnvironment::runfilesDirectory()); + TestEnvironment::runfilesPath("mocktracer/libmocktracer_plugin.so", "io_opentracing_cpp")); envoy::config::trace::v2::Tracing configuration; TestUtility::loadFromYaml(yaml_string, configuration); diff --git a/test/extensions/tracers/dynamic_ot/dynamic_opentracing_driver_impl_test.cc b/test/extensions/tracers/dynamic_ot/dynamic_opentracing_driver_impl_test.cc index 8efc82720a96..860068916798 100644 --- a/test/extensions/tracers/dynamic_ot/dynamic_opentracing_driver_impl_test.cc +++ b/test/extensions/tracers/dynamic_ot/dynamic_opentracing_driver_impl_test.cc @@ -28,8 +28,7 @@ class DynamicOpenTracingDriverTest : public testing::Test { void setupValidDriver() { setup(library_path_, tracer_config_); } const std::string library_path_ = - TestEnvironment::runfilesDirectory() + - "/external/io_opentracing_cpp/mocktracer/libmocktracer_plugin.so"; + TestEnvironment::runfilesPath("mocktracer/libmocktracer_plugin.so", "io_opentracing_cpp"); const std::string spans_file_ = TestEnvironment::temporaryDirectory() + "/spans.json"; const std::string tracer_config_ = fmt::sprintf(R"EOF( { diff --git a/test/extensions/transport_sockets/alts/BUILD b/test/extensions/transport_sockets/alts/BUILD index d987d2e44a66..8c7cbfa6f27e 100644 --- a/test/extensions/transport_sockets/alts/BUILD +++ b/test/extensions/transport_sockets/alts/BUILD @@ -87,6 +87,6 @@ envoy_extension_cc_test( "//test/mocks/runtime:runtime_mocks", "//test/mocks/secret:secret_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/transport_socket/alts/v2alpha:alts_cc", + "@envoy_api//envoy/config/transport_socket/alts/v2alpha:pkg_cc_proto", ], ) diff --git a/test/extensions/transport_sockets/tls/integration/BUILD b/test/extensions/transport_sockets/tls/integration/BUILD index 685bc87ae57a..a01895bc2ce5 100644 --- a/test/extensions/transport_sockets/tls/integration/BUILD +++ b/test/extensions/transport_sockets/tls/integration/BUILD @@ -29,7 +29,7 @@ envoy_cc_test( "//test/integration:http_integration_lib", "//test/mocks/secret:secret_mocks", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/transport_socket/tap/v2alpha:tap_cc", - "@envoy_api//envoy/data/tap/v2alpha:transport_cc", + "@envoy_api//envoy/config/transport_socket/tap/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/data/tap/v2alpha:pkg_cc_proto", ], ) diff --git a/test/fuzz/BUILD b/test/fuzz/BUILD index 07273e9d721b..fe0e20bf584a 100644 --- a/test/fuzz/BUILD +++ b/test/fuzz/BUILD @@ -12,7 +12,7 @@ envoy_package() envoy_proto_library( name = "common_proto", srcs = ["common.proto"], - deps = ["@envoy_api//envoy/api/v2/core:base_export"], + deps = ["@envoy_api//envoy/api/v2/core:pkg"], ) envoy_cc_test_library( @@ -48,7 +48,7 @@ envoy_cc_test_library( name = "utility_lib", hdrs = ["utility.h"], deps = [ - ":common_proto_cc", + ":common_proto_cc_proto", "//source/common/common:empty_string", "//source/common/network:utility_lib", "//test/common/stream_info:test_util", diff --git a/test/integration/BUILD b/test/integration/BUILD index 02a8a0101d66..5c7fc94e362e 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -37,12 +37,8 @@ envoy_cc_test_library( "//test/common/grpc:grpc_client_integration_lib", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2:discovery_cc", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2:lds_cc", - "@envoy_api//envoy/api/v2:rds_cc", - "@envoy_api//envoy/service/discovery/v2:ads_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -58,12 +54,8 @@ envoy_cc_test( "//test/common/grpc:grpc_client_integration_lib", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2:discovery_cc", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2:lds_cc", - "@envoy_api//envoy/api/v2:rds_cc", - "@envoy_api//envoy/service/discovery/v2:ads_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -74,15 +66,14 @@ py_binary( python_version = "PY3", visibility = ["//visibility:public"], deps = [ - ":capture_fuzz_proto_py", - "@envoy_api//envoy/data/tap/v2alpha:transport_py", + ":capture_fuzz_proto_py_proto", + "@envoy_api//envoy/data/tap/v2alpha:pkg_py_proto", ], ) envoy_proto_library( name = "capture_fuzz_proto", srcs = [":capture_fuzz.proto"], - require_py = 1, ) envoy_cc_test( @@ -101,8 +92,7 @@ envoy_cc_test( "//test/mocks/server:server_mocks", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2:discovery_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -115,7 +105,7 @@ envoy_cc_test( "//test/config:utility_lib", "//test/integration/filters:eds_ready_filter_config_lib", "//test/test_common:network_utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -131,7 +121,7 @@ envoy_cc_test( "filter_manager_integration_test.h", ], deps = [ - ":filter_manager_integration_proto_cc", + ":filter_manager_integration_proto_cc_proto", ":http_integration_lib", ":integration_lib", "//source/extensions/filters/network/common:factory_base_lib", @@ -164,7 +154,7 @@ envoy_cc_test( "//test/config:utility_lib", "//test/integration/clusters:custom_static_cluster", "//test/test_common:network_utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -184,8 +174,7 @@ envoy_cc_test( "//test/mocks/server:server_mocks", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:discovery_cc", - "@envoy_api//envoy/api/v2:rds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -223,8 +212,8 @@ envoy_cc_test( ":http_integration_lib", "//source/common/protobuf", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/filter/http/router/v2:router_cc", - "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:http_connection_manager_cc", + "@envoy_api//envoy/config/filter/http/router/v2:pkg_cc_proto", + "@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto", ], ) @@ -322,8 +311,8 @@ envoy_cc_test( "//source/common/stats:stats_matcher_lib", "//source/extensions/filters/http/buffer:config", "//source/extensions/filters/http/health_check:config", - "@envoy_api//envoy/admin/v2alpha:config_dump_cc", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) @@ -571,8 +560,8 @@ envoy_cc_test( "//test/common/stats:stat_test_utility_lib", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", - "@envoy_api//envoy/config/metrics/v2:stats_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", + "@envoy_api//envoy/config/metrics/v2:pkg_cc_proto", ], ) @@ -585,7 +574,7 @@ envoy_cc_test( "//test/config:utility_lib", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -606,8 +595,8 @@ envoy_cc_test( "//test/common/upstream:utility_lib", "//test/config:utility_lib", "//test/test_common:network_utility_lib", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/service/discovery/v2:hds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -654,7 +643,7 @@ envoy_cc_test( "//source/common/grpc:common_lib", "//source/extensions/filters/http/ratelimit:config", "//test/common/grpc:grpc_client_integration_lib", - "@envoy_api//envoy/service/ratelimit/v2:rls_cc", + "@envoy_api//envoy/service/ratelimit/v2:pkg_cc_proto", ], ) @@ -664,7 +653,7 @@ envoy_cc_test( deps = [ ":http_integration_lib", "//test/common/grpc:grpc_client_integration_lib", - "@envoy_api//envoy/service/discovery/v2:rtds_cc", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) @@ -836,7 +825,7 @@ envoy_cc_test_library( srcs = ["h1_fuzz.cc"], hdrs = ["h1_fuzz.h"], deps = [ - ":capture_fuzz_proto_cc", + ":capture_fuzz_proto_cc_proto", ":http_integration_lib", "//source/common/common:assert_lib", "//source/common/common:logger_lib", diff --git a/test/integration/clusters/BUILD b/test/integration/clusters/BUILD index b091fb0a81e8..0447bc03403c 100644 --- a/test/integration/clusters/BUILD +++ b/test/integration/clusters/BUILD @@ -16,7 +16,7 @@ envoy_cc_test_library( "custom_static_cluster.h", ], deps = [ - ":cluster_factory_config_proto_cc", + ":cluster_factory_config_proto_cc_proto", "//include/envoy/api:api_interface", "//include/envoy/http:codec_interface", "//include/envoy/upstream:cluster_factory_interface", diff --git a/test/integration/hotrestart_test.sh b/test/integration/hotrestart_test.sh index 02dd157c15b1..e9dea29f0eb3 100755 --- a/test/integration/hotrestart_test.sh +++ b/test/integration/hotrestart_test.sh @@ -1,6 +1,6 @@ #!/bin/bash -source "$TEST_RUNDIR/test/integration/test_utility.sh" +source "$TEST_SRCDIR/envoy/test/integration/test_utility.sh" # TODO(htuch): In this test script, we are duplicating work done in test_environment.cc via sed. # Instead, we can add a simple C++ binary that links against test_environment.cc and uses the @@ -16,9 +16,9 @@ if [[ -z "${ENVOY_IP_TEST_VERSIONS}" ]] || [[ "${ENVOY_IP_TEST_VERSIONS}" == "al || [[ "${ENVOY_IP_TEST_VERSIONS}" == "v4only" ]]; then HOT_RESTART_JSON_V4="${TEST_TMPDIR}"/hot_restart_v4.yaml echo building ${HOT_RESTART_JSON_V4} ... - cat "${TEST_RUNDIR}"/test/config/integration/server.yaml | + cat "${TEST_SRCDIR}/envoy"/test/config/integration/server.yaml | sed -e "s#{{ upstream_. }}#0#g" | \ - sed -e "s#{{ test_rundir }}#$TEST_RUNDIR#" | \ + sed -e "s#{{ test_rundir }}#$TEST_SRCDIR/envoy#" | \ sed -e "s#{{ test_tmpdir }}#$TEST_TMPDIR#" | \ sed -e "s#{{ ip_loopback_address }}#127.0.0.1#" | \ sed -e "s#{{ dns_lookup_family }}#V4_ONLY#" | \ @@ -29,9 +29,9 @@ fi if [[ -z "${ENVOY_IP_TEST_VERSIONS}" ]] || [[ "${ENVOY_IP_TEST_VERSIONS}" == "all" ]] \ || [[ "${ENVOY_IP_TEST_VERSIONS}" == "v6only" ]]; then HOT_RESTART_JSON_V6="${TEST_TMPDIR}"/hot_restart_v6.yaml - cat "${TEST_RUNDIR}"/test/config/integration/server.yaml | + cat "${TEST_SRCDIR}/envoy"/test/config/integration/server.yaml | sed -e "s#{{ upstream_. }}#0#g" | \ - sed -e "s#{{ test_rundir }}#$TEST_RUNDIR#" | \ + sed -e "s#{{ test_rundir }}#$TEST_SRCDIR/envoy#" | \ sed -e "s#{{ test_tmpdir }}#$TEST_TMPDIR#" | \ sed -e "s#{{ ip_loopback_address }}#::1#" | \ sed -e "s#{{ dns_lookup_family }}#v6_only#" | \ @@ -43,7 +43,7 @@ fi # upstreams to avoid too much wild sedding. HOT_RESTART_JSON_UDS="${TEST_TMPDIR}"/hot_restart_uds.yaml SOCKET_DIR="$(mktemp -d /tmp/envoy_test_hotrestart.XXXXXX)" -cat "${TEST_RUNDIR}"/test/config/integration/server_unix_listener.yaml | +cat "${TEST_SRCDIR}/envoy"/test/config/integration/server_unix_listener.yaml | sed -e "s#{{ socket_dir }}#${SOCKET_DIR}#" | \ sed -e "s#{{ ip_loopback_address }}#127.0.0.1#" | \ cat > "${HOT_RESTART_JSON_UDS}" @@ -79,7 +79,7 @@ do start_test Updating original config listener addresses sleep 3 UPDATED_HOT_RESTART_JSON="${TEST_TMPDIR}"/hot_restart_updated."${TEST_INDEX}".yaml - "${TEST_RUNDIR}"/tools/socket_passing "-o" "${HOT_RESTART_JSON}" "-a" "${ADMIN_ADDRESS_PATH_0}" \ + "${TEST_SRCDIR}/envoy"/tools/socket_passing "-o" "${HOT_RESTART_JSON}" "-a" "${ADMIN_ADDRESS_PATH_0}" \ "-u" "${UPDATED_HOT_RESTART_JSON}" # Send SIGUSR1 signal to the first server, this should not kill it. Also send SIGHUP which should @@ -139,7 +139,7 @@ do start_test Checking that listener addresses have not changed HOT_RESTART_JSON_1="${TEST_TMPDIR}"/hot_restart.1."${TEST_INDEX}".yaml - "${TEST_RUNDIR}"/tools/socket_passing "-o" "${UPDATED_HOT_RESTART_JSON}" "-a" "${ADMIN_ADDRESS_PATH_1}" \ + "${TEST_SRCDIR}/envoy"/tools/socket_passing "-o" "${UPDATED_HOT_RESTART_JSON}" "-a" "${ADMIN_ADDRESS_PATH_1}" \ "-u" "${HOT_RESTART_JSON_1}" CONFIG_DIFF=$(diff "${UPDATED_HOT_RESTART_JSON}" "${HOT_RESTART_JSON_1}") [[ -z "${CONFIG_DIFF}" ]] @@ -155,7 +155,7 @@ do start_test Checking that listener addresses have not changed HOT_RESTART_JSON_2="${TEST_TMPDIR}"/hot_restart.2."${TEST_INDEX}".yaml - "${TEST_RUNDIR}"/tools/socket_passing "-o" "${UPDATED_HOT_RESTART_JSON}" "-a" "${ADMIN_ADDRESS_PATH_2}" \ + "${TEST_SRCDIR}/envoy"/tools/socket_passing "-o" "${UPDATED_HOT_RESTART_JSON}" "-a" "${ADMIN_ADDRESS_PATH_2}" \ "-u" "${HOT_RESTART_JSON_2}" CONFIG_DIFF=$(diff "${UPDATED_HOT_RESTART_JSON}" "${HOT_RESTART_JSON_2}") [[ -z "${CONFIG_DIFF}" ]] diff --git a/test/integration/http_timeout_integration_test.cc b/test/integration/http_timeout_integration_test.cc index 12e980b9e309..097c085eb114 100644 --- a/test/integration/http_timeout_integration_test.cc +++ b/test/integration/http_timeout_integration_test.cc @@ -47,6 +47,130 @@ TEST_P(HttpTimeoutIntegrationTest, GlobalTimeout) { EXPECT_EQ("504", response->headers().Status()->value().getStringView()); } +// Testing that `x-envoy-expected-timeout-ms` header, set by egress envoy, is respected by ingress +// envoy when `respect_expected_rq_timeout` field is enabled. Sends a request with a global timeout +// specified, sleeps for longer than the timeout, and ensures that a timeout is received. +TEST_P(HttpTimeoutIntegrationTest, UseTimeoutSetByEgressEnvoy) { + enableRespectExpectedRqTimeout(true); + initialize(); + codec_client_ = makeHttpConnection(makeClientConnection(lookupPort("http"))); + auto encoder_decoder = codec_client_->startRequest( + Http::TestHeaderMapImpl{{":method", "POST"}, + {":path", "/test/long/url"}, + {":scheme", "http"}, + {":authority", "host"}, + {"x-forwarded-for", "10.0.0.1"}, + {"x-envoy-upstream-rq-timeout-ms", "500"}, + {"x-envoy-expected-rq-timeout-ms", "300"}}); + auto response = std::move(encoder_decoder.second); + request_encoder_ = &encoder_decoder.first; + + ASSERT_TRUE(fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_)); + ASSERT_TRUE(fake_upstream_connection_->waitForNewStream(*dispatcher_, upstream_request_)); + ASSERT_TRUE(upstream_request_->waitForHeadersComplete()); + codec_client_->sendData(*request_encoder_, 0, true); + + ASSERT_TRUE(upstream_request_->waitForEndStream(*dispatcher_)); + + // Trigger global timeout, populated from `x-envoy-expected-rq-timeout-ms` header. + timeSystem().sleep(std::chrono::milliseconds(301)); + + // Ensure we got a timeout downstream and canceled the upstream request. + response->waitForHeaders(); + ASSERT_TRUE(upstream_request_->waitForReset(std::chrono::seconds(15))); + + codec_client_->close(); + + EXPECT_TRUE(upstream_request_->complete()); + EXPECT_EQ(0U, upstream_request_->bodyLength()); + + EXPECT_TRUE(response->complete()); + EXPECT_EQ("504", response->headers().Status()->value().getStringView()); +} + +// Testing that ingress envoy derives new timeout value and sets `x-envoy-expected-timeout-ms` +// header, when timeout has not been set by egress envoy and `respect_expected_rq_timeout` field is +// enabled. Sends a request with a global timeout specified, sleeps for longer than the timeout, and +// ensures that a timeout is received. +TEST_P(HttpTimeoutIntegrationTest, DeriveTimeoutInIngressEnvoy) { + enableRespectExpectedRqTimeout(true); + initialize(); + codec_client_ = makeHttpConnection(makeClientConnection(lookupPort("http"))); + auto encoder_decoder = codec_client_->startRequest( + Http::TestHeaderMapImpl{{":method", "POST"}, + {":path", "/test/long/url"}, + {":scheme", "http"}, + {":authority", "host"}, + {"x-forwarded-for", "10.0.0.1"}, + {"x-envoy-upstream-rq-timeout-ms", "500"}}); + auto response = std::move(encoder_decoder.second); + request_encoder_ = &encoder_decoder.first; + + ASSERT_TRUE(fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_)); + ASSERT_TRUE(fake_upstream_connection_->waitForNewStream(*dispatcher_, upstream_request_)); + ASSERT_TRUE(upstream_request_->waitForHeadersComplete()); + codec_client_->sendData(*request_encoder_, 0, true); + + ASSERT_TRUE(upstream_request_->waitForEndStream(*dispatcher_)); + + // Trigger global timeout, populated from `x-envoy-expected-rq-timeout-ms` header. + timeSystem().sleep(std::chrono::milliseconds(501)); + + // Ensure we got a timeout downstream and canceled the upstream request. + response->waitForHeaders(); + ASSERT_TRUE(upstream_request_->waitForReset(std::chrono::seconds(15))); + + codec_client_->close(); + + EXPECT_TRUE(upstream_request_->complete()); + EXPECT_EQ(0U, upstream_request_->bodyLength()); + + EXPECT_TRUE(response->complete()); + EXPECT_EQ("504", response->headers().Status()->value().getStringView()); +} + +// Testing that `x-envoy-expected-timeout-ms` header, set by egress envoy, is ignored by ingress +// envoy and new value is derived. Sends a request with a global timeout specified, +// sleeps for longer than the timeout, and ensures that a timeout is received. +TEST_P(HttpTimeoutIntegrationTest, IgnoreTimeoutSetByEgressEnvoy) { + enableRespectExpectedRqTimeout(false); + initialize(); + + codec_client_ = makeHttpConnection(makeClientConnection(lookupPort("http"))); + auto encoder_decoder = codec_client_->startRequest( + Http::TestHeaderMapImpl{{":method", "POST"}, + {":path", "/test/long/url"}, + {":scheme", "http"}, + {":authority", "host"}, + {"x-forwarded-for", "10.0.0.1"}, + {"x-envoy-upstream-rq-timeout-ms", "500"}, + {"x-envoy-expected-rq-timeout-ms", "600"}}); + auto response = std::move(encoder_decoder.second); + request_encoder_ = &encoder_decoder.first; + + ASSERT_TRUE(fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_)); + ASSERT_TRUE(fake_upstream_connection_->waitForNewStream(*dispatcher_, upstream_request_)); + ASSERT_TRUE(upstream_request_->waitForHeadersComplete()); + codec_client_->sendData(*request_encoder_, 0, true); + + ASSERT_TRUE(upstream_request_->waitForEndStream(*dispatcher_)); + + // Trigger global timeout, populated from `x-envoy-expected-rq-timeout-ms` header. + timeSystem().sleep(std::chrono::milliseconds(501)); + + // Ensure we got a timeout downstream and canceled the upstream request. + response->waitForHeaders(); + ASSERT_TRUE(upstream_request_->waitForReset(std::chrono::seconds(15))); + + codec_client_->close(); + + EXPECT_TRUE(upstream_request_->complete()); + EXPECT_EQ(0U, upstream_request_->bodyLength()); + + EXPECT_TRUE(response->complete()); + EXPECT_EQ("504", response->headers().Status()->value().getStringView()); +} + // Regression test for https://github.com/envoyproxy/envoy/issues/7154 in which // resetStream() was only called after a response timeout for upstream requests // that had not received headers yet. This meant that decodeData might be diff --git a/test/integration/http_timeout_integration_test.h b/test/integration/http_timeout_integration_test.h index 230a82d2577a..3c9aa733da11 100644 --- a/test/integration/http_timeout_integration_test.h +++ b/test/integration/http_timeout_integration_test.h @@ -21,6 +21,24 @@ class HttpTimeoutIntegrationTest : public testing::TestWithParammutable_config()); + }); + } + + HttpIntegrationTest::initialize(); + } + + void enableRespectExpectedRqTimeout(bool enable) { respect_expected_rq_timeout = enable; } + + bool respect_expected_rq_timeout{false}; }; } // namespace Envoy diff --git a/test/integration/run_envoy_test.sh b/test/integration/run_envoy_test.sh index 805fdb5a2493..a84ec07be4d0 100755 --- a/test/integration/run_envoy_test.sh +++ b/test/integration/run_envoy_test.sh @@ -1,6 +1,6 @@ #!/bin/bash -source "$TEST_RUNDIR/test/integration/test_utility.sh" +source "${TEST_SRCDIR}/envoy/test/integration/test_utility.sh" function expect_fail_with_error() { log="${TEST_TMPDIR}/envoy.log" diff --git a/test/integration/sds_dynamic_integration_test.cc b/test/integration/sds_dynamic_integration_test.cc index dc5867b0faed..5b4f3ef376e6 100644 --- a/test/integration/sds_dynamic_integration_test.cc +++ b/test/integration/sds_dynamic_integration_test.cc @@ -69,9 +69,9 @@ class SdsDynamicIntegrationBaseTest : public Grpc::GrpcClientIntegrationParamTes secret.set_name(server_cert_); auto* tls_certificate = secret.mutable_tls_certificate(); tls_certificate->mutable_certificate_chain()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/servercert.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/servercert.pem")); tls_certificate->mutable_private_key()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/serverkey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/serverkey.pem")); return secret; } @@ -99,9 +99,9 @@ class SdsDynamicIntegrationBaseTest : public Grpc::GrpcClientIntegrationParamTes secret.set_name(client_cert_); auto* tls_certificate = secret.mutable_tls_certificate(); tls_certificate->mutable_certificate_chain()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/clientcert.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/clientcert.pem")); tls_certificate->mutable_private_key()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/clientkey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/clientkey.pem")); return secret; } @@ -249,9 +249,9 @@ class SdsDynamicDownstreamCertValidationContextTest : public SdsDynamicDownstrea auto* tls_certificate = common_tls_context->add_tls_certificates(); tls_certificate->mutable_certificate_chain()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/servercert.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/servercert.pem")); tls_certificate->mutable_private_key()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/serverkey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/serverkey.pem")); if (use_combined_validation_context_) { // Modify the listener context validation type to use combined certificate validation diff --git a/test/integration/sds_static_integration_test.cc b/test/integration/sds_static_integration_test.cc index cbbf3085e987..fc06e178f57b 100644 --- a/test/integration/sds_static_integration_test.cc +++ b/test/integration/sds_static_integration_test.cc @@ -60,9 +60,9 @@ class SdsStaticDownstreamIntegrationTest secret->set_name("server_cert"); auto* tls_certificate = secret->mutable_tls_certificate(); tls_certificate->mutable_certificate_chain()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/servercert.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/servercert.pem")); tls_certificate->mutable_private_key()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/serverkey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/serverkey.pem")); }); HttpIntegrationTest::initialize(); @@ -121,9 +121,9 @@ class SdsStaticUpstreamIntegrationTest : public testing::TestWithParamset_name("client_cert"); auto* tls_certificate = secret->mutable_tls_certificate(); tls_certificate->mutable_certificate_chain()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/clientcert.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/clientcert.pem")); tls_certificate->mutable_private_key()->set_filename( - TestEnvironment::runfilesPath("/test/config/integration/certs/clientkey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/clientkey.pem")); }); HttpIntegrationTest::initialize(); diff --git a/test/integration/server.cc b/test/integration/server.cc index 83777e19db1e..052b8a94f707 100644 --- a/test/integration/server.cc +++ b/test/integration/server.cc @@ -188,6 +188,7 @@ void IntegrationTestServerImpl::createAndRunEnvoyServer( Runtime::RandomGeneratorPtr&& random_generator, absl::optional> process_object) { { + Init::ManagerImpl init_manager{"Server"}; Stats::SymbolTablePtr symbol_table = Stats::SymbolTableCreator::makeSymbolTable(); Server::HotRestartNopImpl restarter; ThreadLocal::InstanceImpl tls; @@ -197,9 +198,9 @@ void IntegrationTestServerImpl::createAndRunEnvoyServer( if (process_object.has_value()) { process_context = std::make_unique(process_object->get()); } - Server::InstanceImpl server(options, time_system, local_address, hooks, restarter, stat_store, - access_log_lock, component_factory, std::move(random_generator), - tls, Thread::threadFactoryForTest(), + Server::InstanceImpl server(init_manager, options, time_system, local_address, hooks, restarter, + stat_store, access_log_lock, component_factory, + std::move(random_generator), tls, Thread::threadFactoryForTest(), Filesystem::fileSystemForTest(), std::move(process_context)); // This is technically thread unsafe (assigning to a shared_ptr accessed // across threads), but because we synchronize below through serverReady(), the only diff --git a/test/integration/test_utility.sh b/test/integration/test_utility.sh index 0fc84ddc4bbc..ee5ab5316c75 100644 --- a/test/integration/test_utility.sh +++ b/test/integration/test_utility.sh @@ -75,4 +75,4 @@ enableHeapCheck () { HEAPCHECK=${SAVED_HEAPCHECK} } -[[ -z "${ENVOY_BIN}" ]] && ENVOY_BIN="${TEST_RUNDIR}"/source/exe/envoy-static +[[ -z "${ENVOY_BIN}" ]] && ENVOY_BIN="${TEST_SRCDIR}"/envoy/source/exe/envoy-static diff --git a/test/main.cc b/test/main.cc index b7295edd0b02..132b9e8ae990 100644 --- a/test/main.cc +++ b/test/main.cc @@ -11,6 +11,9 @@ #include "common/signal/signal_action.h" #endif +#include "tools/cpp/runfiles/runfiles.h" + +using bazel::tools::cpp::runfiles::Runfiles; // The main entry point (and the rest of this file) should have no logic in it, // this allows overriding by site specific versions of main.cc. int main(int argc, char** argv) { @@ -22,10 +25,15 @@ int main(int argc, char** argv) { Envoy::SignalAction handle_sigs; #endif - Envoy::TestEnvironment::setEnvVar("TEST_RUNDIR", - (Envoy::TestEnvironment::getCheckedEnvVar("TEST_SRCDIR") + "/" + - Envoy::TestEnvironment::getCheckedEnvVar("TEST_WORKSPACE")), - 1); + // Create a Runfiles object for runfiles lookup. + // https://github.com/bazelbuild/bazel/blob/master/tools/cpp/runfiles/runfiles_src.h#L32 + std::string error; + std::unique_ptr runfiles(Runfiles::Create(argv[0], &error)); + RELEASE_ASSERT(Envoy::TestEnvironment::getOptionalEnvVar("NORUNFILES").has_value() || + runfiles != nullptr, + error); + + Envoy::TestEnvironment::setRunfiles(runfiles.get()); // Select whether to test only for IPv4, IPv6, or both. The default is to // test for both. Options are {"v4only", "v6only", "all"}. Set diff --git a/test/mocks/config/BUILD b/test/mocks/config/BUILD index 69698c7dc732..c9bc1a0a8d46 100644 --- a/test/mocks/config/BUILD +++ b/test/mocks/config/BUILD @@ -20,9 +20,6 @@ envoy_cc_mock( "//source/common/config:resources_lib", "//source/common/protobuf:utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:cds_cc", - "@envoy_api//envoy/api/v2:eds_cc", - "@envoy_api//envoy/api/v2:lds_cc", - "@envoy_api//envoy/api/v2:rds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) diff --git a/test/mocks/network/BUILD b/test/mocks/network/BUILD index deb550922321..68e3aff2c76a 100644 --- a/test/mocks/network/BUILD +++ b/test/mocks/network/BUILD @@ -39,6 +39,6 @@ envoy_cc_mock( "//test/mocks/event:event_mocks", "//test/mocks/stream_info:stream_info_mocks", "//test/test_common:printers_lib", - "@envoy_api//envoy/api/v2/core:base_cc", + "@envoy_api//envoy/api/v2/core:pkg_cc_proto", ], ) diff --git a/test/mocks/server/BUILD b/test/mocks/server/BUILD index 695f49be6c23..f58bf23389ac 100644 --- a/test/mocks/server/BUILD +++ b/test/mocks/server/BUILD @@ -46,6 +46,6 @@ envoy_cc_mock( "//test/mocks/tracing:tracing_mocks", "//test/mocks/upstream:upstream_mocks", "//test/test_common:test_time_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) diff --git a/test/proto/BUILD b/test/proto/BUILD index 71f551469cdf..d2aa8efa6249 100644 --- a/test/proto/BUILD +++ b/test/proto/BUILD @@ -31,7 +31,7 @@ envoy_proto_descriptor( name = "bookstore_proto_descriptor", srcs = [ "bookstore.proto", - # JSON transcoder doesn't link against ":helloworld_proto_cc", so we can add it to the + # JSON transcoder doesn't link against ":helloworld_proto_cc_proto", so we can add it to the # descriptor and test that we can actually transcode types not linked into the test binary. "helloworld.proto", ], diff --git a/test/server/BUILD b/test/server/BUILD index 84a3b4684d54..48fa39379369 100644 --- a/test/server/BUILD +++ b/test/server/BUILD @@ -128,7 +128,7 @@ envoy_cc_test( "//test/test_common:logging_lib", "//test/test_common:threadsafe_singleton_injector_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ], ) @@ -162,7 +162,7 @@ envoy_cc_test( "//test/mocks/server:server_mocks", "//test/test_common:environment_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:lds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) @@ -343,7 +343,7 @@ envoy_cc_test_library( deps = [ "//source/common/protobuf:utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:lds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) diff --git a/test/server/http/BUILD b/test/server/http/BUILD index 20df4a917b1b..c6789966d89e 100644 --- a/test/server/http/BUILD +++ b/test/server/http/BUILD @@ -29,7 +29,7 @@ envoy_cc_test( "//test/test_common:logging_lib", "//test/test_common:network_utility_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/admin/v2alpha:memory_cc", + "@envoy_api//envoy/admin/v2alpha:pkg_cc_proto", ], ) diff --git a/test/server/lds_api_test.cc b/test/server/lds_api_test.cc index 72aee52328b5..a15788822fef 100644 --- a/test/server/lds_api_test.cc +++ b/test/server/lds_api_test.cc @@ -364,8 +364,8 @@ TEST_F(LdsApiTest, TlsConfigWithoutCaCert) { )EOF"; std::string response2_json = fmt::format(response2_basic, - TestEnvironment::runfilesPath("/test/config/integration/certs/servercert.pem"), - TestEnvironment::runfilesPath("/test/config/integration/certs/serverkey.pem")); + TestEnvironment::runfilesPath("test/config/integration/certs/servercert.pem"), + TestEnvironment::runfilesPath("test/config/integration/certs/serverkey.pem")); auto response2 = TestUtility::parseYaml(response2_json); makeListenersAndExpectCall({ diff --git a/test/server/server_fuzz_test.cc b/test/server/server_fuzz_test.cc index b47f1aed9622..df47293d7cea 100644 --- a/test/server/server_fuzz_test.cc +++ b/test/server/server_fuzz_test.cc @@ -72,6 +72,7 @@ DEFINE_PROTO_FUZZER(const envoy::config::bootstrap::v2::Bootstrap& input) { ThreadLocal::InstanceImpl thread_local_instance; DangerousDeprecatedTestTime test_time; Fuzz::PerTestEnvironment test_env; + Init::ManagerImpl init_manager{"Server"}; { const std::string bootstrap_path = test_env.temporaryPath("bootstrap.pb_text"); @@ -84,7 +85,7 @@ DEFINE_PROTO_FUZZER(const envoy::config::bootstrap::v2::Bootstrap& input) { std::unique_ptr server; try { server = std::make_unique( - options, test_time.timeSystem(), + init_manager, options, test_time.timeSystem(), std::make_shared("127.0.0.1"), hooks, restart, stats_store, fakelock, component_factory, std::make_unique(), thread_local_instance, Thread::threadFactoryForTest(), Filesystem::fileSystemForTest(), diff --git a/test/server/server_test.cc b/test/server/server_test.cc index b5688754eaa8..1abb1ba977b8 100644 --- a/test/server/server_test.cc +++ b/test/server/server_test.cc @@ -141,27 +141,6 @@ class InitializingInitManager : public Init::ManagerImpl { State state() const override { return State::Initializing; } }; -class InitializingInstanceImpl : public InstanceImpl { -private: - InitializingInitManager init_manager_{"Server"}; - -public: - InitializingInstanceImpl(const Options& options, Event::TimeSystem& time_system, - Network::Address::InstanceConstSharedPtr local_address, - ListenerHooks& hooks, HotRestart& restarter, Stats::StoreRoot& store, - Thread::BasicLockable& access_log_lock, - ComponentFactory& component_factory, - Runtime::RandomGeneratorPtr&& random_generator, - ThreadLocal::Instance& tls, Thread::ThreadFactory& thread_factory, - Filesystem::Instance& file_system, - std::unique_ptr process_context) - : InstanceImpl(options, time_system, local_address, hooks, restarter, store, access_log_lock, - component_factory, std::move(random_generator), tls, thread_factory, - file_system, std::move(process_context)) {} - - Init::Manager& initManager() override { return init_manager_; } -}; - // Class creates minimally viable server instance for testing. class ServerInstanceImplTestBase { protected: @@ -176,25 +155,16 @@ class ServerInstanceImplTestBase { if (process_object_ != nullptr) { process_context_ = std::make_unique(*process_object_); } - if (use_intializing_instance) { - server_ = std::make_unique( - options_, test_time_.timeSystem(), - Network::Address::InstanceConstSharedPtr(new Network::Address::Ipv4Instance("127.0.0.1")), - hooks_, restart_, stats_store_, fakelock_, component_factory_, - std::make_unique>(), *thread_local_, - Thread::threadFactoryForTest(), Filesystem::fileSystemForTest(), - std::move(process_context_)); - - } else { - server_ = std::make_unique( - options_, test_time_.timeSystem(), - Network::Address::InstanceConstSharedPtr(new Network::Address::Ipv4Instance("127.0.0.1")), - hooks_, restart_, stats_store_, fakelock_, component_factory_, - std::make_unique>(), *thread_local_, - Thread::threadFactoryForTest(), Filesystem::fileSystemForTest(), - std::move(process_context_)); - } + init_manager_ = use_intializing_instance ? std::make_unique("Server") + : std::make_unique("Server"); + server_ = std::make_unique( + *init_manager_, options_, test_time_.timeSystem(), + Network::Address::InstanceConstSharedPtr(new Network::Address::Ipv4Instance("127.0.0.1")), + hooks_, restart_, stats_store_, fakelock_, component_factory_, + std::make_unique>(), *thread_local_, + Thread::threadFactoryForTest(), Filesystem::fileSystemForTest(), + std::move(process_context_)); EXPECT_TRUE(server_->api().fileSystem().fileExists("/dev/null")); } @@ -206,8 +176,9 @@ class ServerInstanceImplTestBase { {"health_check_interval", fmt::format("{}", interval).c_str()}}, TestEnvironment::PortMap{}, version_); thread_local_ = std::make_unique(); + init_manager_ = std::make_unique("Server"); server_ = std::make_unique( - options_, test_time_.timeSystem(), + *init_manager_, options_, test_time_.timeSystem(), Network::Address::InstanceConstSharedPtr(new Network::Address::Ipv4Instance("127.0.0.1")), hooks_, restart_, stats_store_, fakelock_, component_factory_, std::make_unique>(), *thread_local_, @@ -256,6 +227,8 @@ class ServerInstanceImplTestBase { DangerousDeprecatedTestTime test_time_; ProcessObject* process_object_ = nullptr; std::unique_ptr process_context_; + std::unique_ptr init_manager_; + std::unique_ptr server_; }; @@ -781,9 +754,10 @@ TEST_P(ServerInstanceImplTest, LogToFileError) { // an empty config. TEST_P(ServerInstanceImplTest, NoOptionsPassed) { thread_local_ = std::make_unique(); + init_manager_ = std::make_unique("Server"); EXPECT_THROW_WITH_MESSAGE( server_.reset(new InstanceImpl( - options_, test_time_.timeSystem(), + *init_manager_, options_, test_time_.timeSystem(), Network::Address::InstanceConstSharedPtr(new Network::Address::Ipv4Instance("127.0.0.1")), hooks_, restart_, stats_store_, fakelock_, component_factory_, std::make_unique>(), *thread_local_, diff --git a/test/test_common/BUILD b/test/test_common/BUILD index e1bb1467dc19..6b35f1b484db 100644 --- a/test/test_common/BUILD +++ b/test/test_common/BUILD @@ -23,7 +23,10 @@ envoy_cc_test_library( name = "environment_lib", srcs = ["environment.cc"], hdrs = ["environment.h"], - external_deps = ["abseil_optional"], + external_deps = [ + "abseil_optional", + "bazel_runfiles", + ], deps = [ ":network_utility_lib", "//include/envoy/server:options_interface", @@ -112,8 +115,8 @@ envoy_cc_test_library( "//source/common/stats:fake_symbol_table_lib", "//source/common/stats:stats_lib", "//test/mocks/stats:stats_mocks", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", - "@envoy_api//envoy/service/discovery/v2:rtds_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", + "@envoy_api//envoy/service/discovery/v2:pkg_cc_proto", ], ) diff --git a/test/test_common/environment.cc b/test/test_common/environment.cc index d0f0577f4763..ec27ffbaa93e 100644 --- a/test/test_common/environment.cc +++ b/test/test_common/environment.cc @@ -34,6 +34,8 @@ #include "gtest/gtest.h" #include "spdlog/spdlog.h" +using bazel::tools::cpp::runfiles::Runfiles; + namespace Envoy { namespace { @@ -189,8 +191,14 @@ const std::string& TestEnvironment::temporaryDirectory() { CONSTRUCT_ON_FIRST_USE(std::string, getTemporaryDirectory()); } -const std::string& TestEnvironment::runfilesDirectory() { - CONSTRUCT_ON_FIRST_USE(std::string, getCheckedEnvVar("TEST_RUNDIR")); +std::string TestEnvironment::runfilesDirectory(const std::string& workspace) { + RELEASE_ASSERT(runfiles_ != nullptr, ""); + return runfiles_->Rlocation(workspace); +} + +std::string TestEnvironment::runfilesPath(const std::string& path, const std::string& workspace) { + RELEASE_ASSERT(runfiles_ != nullptr, ""); + return runfiles_->Rlocation(absl::StrCat(workspace, "/", path)); } const std::string TestEnvironment::unixDomainSocketDirectory() { @@ -362,4 +370,8 @@ void TestEnvironment::unsetEnvVar(const std::string& name) { #endif } +void TestEnvironment::setRunfiles(Runfiles* runfiles) { runfiles_ = runfiles; } + +Runfiles* TestEnvironment::runfiles_{}; + } // namespace Envoy diff --git a/test/test_common/environment.h b/test/test_common/environment.h index 77ca0c20311b..f5c82d5d5e51 100644 --- a/test/test_common/environment.h +++ b/test/test_common/environment.h @@ -11,6 +11,7 @@ #include "common/json/json_loader.h" #include "absl/types/optional.h" +#include "tools/cpp/runfiles/runfiles.h" namespace Envoy { class TestEnvironment { @@ -79,18 +80,17 @@ class TestEnvironment { /** * Obtain read-only test input data directory. + * @param workspace the name of the Bazel workspace where the input data is. * @return const std::string& with the path to the read-only test input directory. */ - static const std::string& runfilesDirectory(); + static std::string runfilesDirectory(const std::string& workspace = "envoy"); /** * Prefix a given path with the read-only test input data directory. * @param path path suffix. * @return std::string path qualified with read-only test input data directory. */ - static std::string runfilesPath(const std::string& path) { - return runfilesDirectory() + "/" + path; - } + static std::string runfilesPath(const std::string& path, const std::string& workspace = "envoy"); /** * Obtain Unix Domain Socket temporary directory. @@ -208,6 +208,14 @@ class TestEnvironment { * Removes environment variable. Same args as unsetenv(3). */ static void unsetEnvVar(const std::string& name); + + /** + * Set runfiles with current test, this have to be called before calling path related functions. + */ + static void setRunfiles(bazel::tools::cpp::runfiles::Runfiles* runfiles); + +private: + static bazel::tools::cpp::runfiles::Runfiles* runfiles_; }; } // namespace Envoy diff --git a/test/test_runner.cc b/test/test_runner.cc new file mode 100644 index 000000000000..411c78b18466 --- /dev/null +++ b/test/test_runner.cc @@ -0,0 +1,124 @@ +#include "test/test_runner.h" + +#include + +#include "common/common/logger.h" +#include "common/common/logger_delegates.h" +#include "common/common/thread.h" +#include "common/event/libevent.h" +#include "common/http/http2/codec_impl.h" +#include "common/runtime/runtime_features.h" + +#include "exe/process_wide.h" + +#include "test/common/runtime/utility.h" +#include "test/mocks/access_log/mocks.h" +#include "test/test_common/environment.h" +#include "test/test_listener.h" + +#include "gmock/gmock.h" + +namespace Envoy { + +namespace { + +std::string findAndRemove(const std::regex& pattern, int& argc, char**& argv) { + std::smatch matched; + std::string return_value; + for (int i = 0; i < argc; ++i) { + if (return_value.empty()) { + std::string argument = std::string(argv[i]); + if (regex_search(argument, matched, pattern)) { + return_value = matched[1]; + argc--; + } + } + if (!return_value.empty() && i < argc) { + argv[i] = argv[i + 1]; + } + } + return return_value; +} + +// This class is created iff a test is run with the special runtime override flag. +class RuntimeManagingListener : public ::testing::EmptyTestEventListener { +public: + RuntimeManagingListener(std::string& runtime_override) : runtime_override_(runtime_override) {} + + // On each test start, edit RuntimeFeaturesDefaults with our custom runtime defaults. + void OnTestStart(const ::testing::TestInfo&) override { + if (!runtime_override_.empty()) { + if (!Runtime::RuntimeFeaturesPeer::addFeature(runtime_override_)) { + // If the entry was already in the hash map, don't remove it OnTestEnd. + runtime_override_.clear(); + } + } + } + + // As each test ends, clean up the RuntimeFeaturesDefaults state. + void OnTestEnd(const ::testing::TestInfo&) override { + if (!runtime_override_.empty()) { + Runtime::RuntimeFeaturesPeer::removeFeature(runtime_override_); + } + } + std::string runtime_override_; +}; + +} // namespace + +int TestRunner::RunTests(int argc, char** argv) { + ::testing::InitGoogleMock(&argc, argv); + // We hold on to process_wide to provide RAII cleanup of process-wide + // state. + ProcessWide process_wide; + // Add a test-listener so we can call a hook where we can do a quiescence + // check after each method. See + // https://github.com/google/googletest/blob/master/googletest/docs/advanced.md + // for details. + ::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners(); + listeners.Append(new TestListener); + + // Use the recommended, but not default, "threadsafe" style for the Death Tests. + // See: https://github.com/google/googletest/commit/84ec2e0365d791e4ebc7ec249f09078fb5ab6caa + ::testing::FLAGS_gtest_death_test_style = "threadsafe"; + + // Set gtest properties + // (https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#logging-additional-information), + // they are available in the test XML. + // TODO(htuch): Log these as well? + testing::Test::RecordProperty("TemporaryDirectory", TestEnvironment::temporaryDirectory()); + + TestEnvironment::setEnvVar("TEST_UDSDIR", TestEnvironment::unixDomainSocketDirectory(), 1); + + // Before letting TestEnvironment latch argv and argc, remove any runtime override flag. + // This allows doing test overrides of Envoy runtime features without adding + // test flags to the Envoy production command line. + const std::regex PATTERN{"--runtime-feature-override-for-tests=(.*)", std::regex::optimize}; + std::string runtime_override = findAndRemove(PATTERN, argc, argv); + if (!runtime_override.empty()) { + ENVOY_LOG_TO_LOGGER(Logger::Registry::getLog(Logger::Id::testing), info, + "Running with runtime feature override {}", runtime_override); + // Set up a listener which will create a global runtime and set the feature + // to true for the duration of each test instance. + ::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners(); + listeners.Append(new RuntimeManagingListener(runtime_override)); + } + + TestEnvironment::initializeOptions(argc, argv); + Thread::MutexBasicLockable lock; + Logger::Context logging_state(TestEnvironment::getOptions().logLevel(), + TestEnvironment::getOptions().logFormat(), lock); + + // Allocate fake log access manager. + testing::NiceMock access_log_manager; + std::unique_ptr file_logger; + + // Redirect all logs to fake file when --log-path arg is specified in command line. + if (!TestEnvironment::getOptions().logPath().empty()) { + file_logger = std::make_unique( + TestEnvironment::getOptions().logPath(), access_log_manager, Logger::Registry::getSink()); + } + return RUN_ALL_TESTS(); +} + +} // namespace Envoy diff --git a/test/test_runner.h b/test/test_runner.h index 8f70da98a945..64e7507bd0a7 100644 --- a/test/test_runner.h +++ b/test/test_runner.h @@ -1,126 +1,10 @@ #pragma once -#include - -#include "common/common/logger.h" -#include "common/common/logger_delegates.h" -#include "common/common/thread.h" -#include "common/event/libevent.h" -#include "common/http/http2/codec_impl.h" -#include "common/runtime/runtime_features.h" - -#include "exe/process_wide.h" - -#include "test/common/runtime/utility.h" -#include "test/mocks/access_log/mocks.h" -#include "test/test_common/environment.h" -#include "test/test_listener.h" - -#include "gmock/gmock.h" - namespace Envoy { -namespace { - -std::string findAndRemove(const std::regex& pattern, int& argc, char**& argv) { - std::smatch matched; - std::string return_value; - for (int i = 0; i < argc; ++i) { - if (return_value.empty()) { - std::string argument = std::string(argv[i]); - if (regex_search(argument, matched, pattern)) { - return_value = matched[1]; - argc--; - } - } - if (!return_value.empty() && i < argc) { - argv[i] = argv[i + 1]; - } - } - return return_value; -} - -// This class is created iff a test is run with the special runtime override flag. -class RuntimeManagingListener : public ::testing::EmptyTestEventListener { -public: - RuntimeManagingListener(std::string& runtime_override) : runtime_override_(runtime_override) {} - - // On each test start, edit RuntimeFeaturesDefaults with our custom runtime defaults. - void OnTestStart(const ::testing::TestInfo&) override { - if (!runtime_override_.empty()) { - if (!Runtime::RuntimeFeaturesPeer::addFeature(runtime_override_)) { - // If the entry was already in the hash map, don't remove it OnTestEnd. - runtime_override_.clear(); - } - } - } - - // As each test ends, clean up the RuntimeFeaturesDefaults state. - void OnTestEnd(const ::testing::TestInfo&) override { - if (!runtime_override_.empty()) { - Runtime::RuntimeFeaturesPeer::removeFeature(runtime_override_); - } - } - std::string runtime_override_; -}; - -} // namespace class TestRunner { public: - static int RunTests(int argc, char** argv) { - ::testing::InitGoogleMock(&argc, argv); - // We hold on to process_wide to provide RAII cleanup of process-wide - // state. - ProcessWide process_wide; - // Add a test-listener so we can call a hook where we can do a quiescence - // check after each method. See - // https://github.com/google/googletest/blob/master/googletest/docs/advanced.md - // for details. - ::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners(); - listeners.Append(new TestListener); - - // Use the recommended, but not default, "threadsafe" style for the Death Tests. - // See: https://github.com/google/googletest/commit/84ec2e0365d791e4ebc7ec249f09078fb5ab6caa - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - - // Set gtest properties - // (https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#logging-additional-information), - // they are available in the test XML. - // TODO(htuch): Log these as well? - testing::Test::RecordProperty("TemporaryDirectory", TestEnvironment::temporaryDirectory()); - testing::Test::RecordProperty("RunfilesDirectory", TestEnvironment::runfilesDirectory()); - - TestEnvironment::setEnvVar("TEST_UDSDIR", TestEnvironment::unixDomainSocketDirectory(), 1); - - // Before letting TestEnvironment latch argv and argc, remove any runtime override flag. - // This allows doing test overrides of Envoy runtime features without adding - // test flags to the Envoy production command line. - const std::regex PATTERN{"--runtime-feature-override-for-tests=(.*)", std::regex::optimize}; - std::string runtime_override = findAndRemove(PATTERN, argc, argv); - if (!runtime_override.empty()) { - ENVOY_LOG_TO_LOGGER(Logger::Registry::getLog(Logger::Id::testing), info, - "Running with runtime feature override {}", runtime_override); - // Set up a listener which will create a global runtime and set the feature - // to true for the duration of each test instance. - ::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners(); - listeners.Append(new RuntimeManagingListener(runtime_override)); - } - - TestEnvironment::initializeOptions(argc, argv); - Thread::MutexBasicLockable lock; - Logger::Context logging_state(TestEnvironment::getOptions().logLevel(), - TestEnvironment::getOptions().logFormat(), lock); - - // Allocate fake log access manager. - testing::NiceMock access_log_manager; - std::unique_ptr file_logger; - - // Redirect all logs to fake file when --log-path arg is specified in command line. - if (!TestEnvironment::getOptions().logPath().empty()) { - file_logger = std::make_unique( - TestEnvironment::getOptions().logPath(), access_log_manager, Logger::Registry::getSink()); - } - return RUN_ALL_TESTS(); - } + static int RunTests(int argc, char** argv); }; + } // namespace Envoy diff --git a/test/tools/router_check/BUILD b/test/tools/router_check/BUILD index c4a1a2facf4b..f16509afef78 100644 --- a/test/tools/router_check/BUILD +++ b/test/tools/router_check/BUILD @@ -27,7 +27,7 @@ envoy_cc_test_library( copts = ["-DHAVE_LONG_LONG"], external_deps = ["tclap"], deps = [ - ":validation_proto_cc", + ":validation_proto_cc_proto", "//source/common/config:rds_json_lib", "//source/common/event:dispatcher_lib", "//source/common/http:header_map_lib", @@ -45,5 +45,5 @@ envoy_cc_test_library( envoy_proto_library( name = "validation_proto", srcs = ["validation.proto"], - deps = ["@envoy_api//envoy/api/v2/core:base_export"], + deps = ["@envoy_api//envoy/api/v2/core:pkg"], ) diff --git a/test/tools/router_check/test/route_tests.sh b/test/tools/router_check/test/route_tests.sh index 26a5a2a010d6..58c9f6d69bdf 100755 --- a/test/tools/router_check/test/route_tests.sh +++ b/test/tools/router_check/test/route_tests.sh @@ -3,10 +3,10 @@ set -e # Router_check_tool binary path -PATH_BIN="${TEST_RUNDIR}"/test/tools/router_check/router_check_tool +PATH_BIN="${TEST_SRCDIR}/envoy"/test/tools/router_check/router_check_tool # Config json path -PATH_CONFIG="${TEST_RUNDIR}"/test/tools/router_check/test/config +PATH_CONFIG="${TEST_SRCDIR}/envoy"/test/tools/router_check/test/config TESTS=("ContentType" "ClusterHeader" "HeaderMatchedRouting" "Redirect" "Redirect2" "Redirect3" "TestRoutes" "Weighted") diff --git a/test/tools/schema_validator/BUILD b/test/tools/schema_validator/BUILD index 14526b6cb6ff..e55b8df0be28 100644 --- a/test/tools/schema_validator/BUILD +++ b/test/tools/schema_validator/BUILD @@ -29,6 +29,6 @@ envoy_cc_test_library( "//source/common/protobuf:utility_lib", "//source/common/stats:isolated_store_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/api/v2:rds_cc", + "@envoy_api//envoy/api/v2:pkg_cc_proto", ], ) diff --git a/tools/BUILD b/tools/BUILD index d5268089978b..e3f44a5f9646 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -34,6 +34,6 @@ envoy_cc_binary( "//source/common/protobuf:message_validator_lib", "//source/common/protobuf:utility_lib", "//source/common/stats:isolated_store_lib", - "@envoy_api//envoy/config/bootstrap/v2:bootstrap_cc", + "@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto", ] + envoy_cc_platform_dep("//source/exe:platform_impl_lib"), ) diff --git a/tools/api_proto_plugin/plugin.bzl b/tools/api_proto_plugin/plugin.bzl new file mode 100644 index 000000000000..afcc6d56797a --- /dev/null +++ b/tools/api_proto_plugin/plugin.bzl @@ -0,0 +1,89 @@ +# Borrowed from +# https://github.com/bazelbuild/rules_go/blob/master/proto/toolchain.bzl. This +# does some magic munging to remove workspace prefixes from output paths to +# convert path as understood by Bazel into paths as understood by protoc. +def _proto_path(proto): + """ + The proto path is not really a file path + It's the path to the proto that was seen when the descriptor file was generated. + """ + path = proto.path + root = proto.root.path + ws = proto.owner.workspace_root + if path.startswith(root): + path = path[len(root):] + if path.startswith("/"): + path = path[1:] + if path.startswith(ws): + path = path[len(ws):] + if path.startswith("/"): + path = path[1:] + return path + +def api_proto_plugin_impl(target, ctx, output_group, mnemonic, output_suffixes): + # Compute output files from the current proto_library node's dependencies. + transitive_outputs = depset(transitive = [dep.output_groups[output_group] for dep in ctx.rule.attr.deps]) + proto_sources = target[ProtoInfo].direct_sources + + # If this proto_library doesn't actually name any sources, e.g. //api:api, + # but just glues together other libs, we just need to follow the graph. + if not proto_sources: + return [OutputGroupInfo(**{output_group: transitive_outputs})] + + # Figure out the set of import paths. Ideally we would use descriptor sets + # built by proto_library, which avoid having to do nasty path mangling, but + # these don't include source_code_info, which we need for comment + # extractions. See https://github.com/bazelbuild/bazel/issues/3971. + import_paths = [] + for f in target[ProtoInfo].transitive_sources.to_list(): + if f.root.path: + import_path = f.root.path + "/" + f.owner.workspace_root + else: + import_path = f.owner.workspace_root + if import_path: + import_paths += [import_path] + + # The outputs live in the ctx.label's package root. We add some additional + # path information to match with protoc's notion of path relative locations. + outputs = [] + for output_suffix in output_suffixes: + outputs += [ctx.actions.declare_file(ctx.label.name + "/" + _proto_path(f) + + output_suffix) for f in proto_sources] + + # Create the protoc command-line args. + ctx_path = ctx.label.package + "/" + ctx.label.name + output_path = outputs[0].root.path + "/" + outputs[0].owner.workspace_root + "/" + ctx_path + args = ["-I./" + ctx.label.workspace_root] + args += ["-I" + import_path for import_path in import_paths] + args += ["--plugin=protoc-gen-api_proto_plugin=" + ctx.executable._api_proto_plugin.path, "--api_proto_plugin_out=" + output_path] + args += [_proto_path(src) for src in target[ProtoInfo].direct_sources] + ctx.actions.run( + executable = ctx.executable._protoc, + arguments = args, + inputs = target[ProtoInfo].transitive_sources, + tools = [ctx.executable._api_proto_plugin], + outputs = outputs, + mnemonic = mnemonic, + use_default_shell_env = True, + ) + + transitive_outputs = depset(outputs, transitive = [transitive_outputs]) + return [OutputGroupInfo(**{output_group: transitive_outputs})] + +def api_proto_plugin_aspect(tool_label, aspect_impl): + return aspect( + attr_aspects = ["deps"], + attrs = { + "_protoc": attr.label( + default = Label("@com_google_protobuf//:protoc"), + executable = True, + cfg = "exec", + ), + "_api_proto_plugin": attr.label( + default = Label(tool_label), + executable = True, + cfg = "exec", + ), + }, + implementation = aspect_impl, + ) diff --git a/tools/bazel-test-gdb b/tools/bazel-test-gdb deleted file mode 100755 index c61ddb0d881f..000000000000 --- a/tools/bazel-test-gdb +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -# Run a single Bazel test target under gdb. Usage: -# -# tools/bazel-test-gdb //test/foo:bar --some_other --bazel_args -# -# The default build type ("fastbuild") does not generate debugging symbols so -# you almost certainly want to use "-c opt" or "-c dbg" Bazel arguments to -# trigger generation of debug symbols. By default the "opt" build type does not -# include symbols for tests: see bazel/envoy_build_system.bzl for details. - -if [[ ! "$1" =~ (@[a-zA-Z0-9_-]+)?//.*:[a-zA-Z0-9_-]+ ]] -then - echo "First argument to $0 must be a [@repo]//test/foo:bar label identifying a single test to run" - echo "$1 does not match this pattern" - exit 1 -fi - -SCRIPT_DIR="$(realpath "$(dirname "$0")")" -[[ -z "${BAZEL}" ]] && BAZEL=bazel -[[ -z "${GDB}" ]] && GDB=gdb - -GDB_RUNNER=$(mktemp -t "bazel-test-gdb.XXXXXXX") -function cleanup() { - rm -f "${GDB_RUNNER}" -} -trap cleanup EXIT - -"${BAZEL}" test "$@" --strategy=TestRunner=standalone --cache_test_results=no \ - --test_output=summary --run_under="${SCRIPT_DIR}/gen_gdb_wrapper_script.py ${GDB} ${GDB_RUNNER}" -chmod u+x "${GDB_RUNNER}" -"${GDB_RUNNER}" diff --git a/tools/gen_gdb_wrapper_script.py b/tools/gen_gdb_wrapper_script.py deleted file mode 100755 index 03508a7b1dbe..000000000000 --- a/tools/gen_gdb_wrapper_script.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -# Support script for tools/bazel-test-gdb. This is passed to bazel test --run_under, and instead of -# running the test program it generates a wrapper program to allow for invoking gdb with the program -# in the bazel test environment. This is a workaround for the fact that --run_under does not attach -# stdin. - -from __future__ import print_function - -import os -import pipes -import string -import sys - -GDB_RUNNER_SCRIPT = string.Template("""#!/usr/bin/env python - -import os - -env = ${b64env} -for k, v in env.items(): - os.environ[k] = v - -os.system("${gdb} --fullname --args ${test_args}") -""") - -if __name__ == '__main__': - gdb = sys.argv[1] - generated_path = sys.argv[2] - test_args = sys.argv[3:] - test_args[0] = os.path.abspath(test_args[0]) - with open(generated_path, 'w') as f: - f.write( - GDB_RUNNER_SCRIPT.substitute(b64env=str(dict(os.environ)), - gdb=gdb, - test_args=' '.join(pipes.quote(arg) for arg in test_args))) - # To make bazel consider the test a failure we exit non-zero. - print('Test was not run, instead a gdb wrapper script was produced in %s' % generated_path) - sys.exit(1) diff --git a/tools/proto_format.sh b/tools/proto_format.sh index 8e7cb0b05820..816e40aff8fb 100755 --- a/tools/proto_format.sh +++ b/tools/proto_format.sh @@ -15,7 +15,7 @@ rm -rf bazel-bin/external/envoy_api # the precise set of protos we want to format, but as a starting place it seems # reasonable. In the future, we should change the logic here. bazel build ${BAZEL_BUILD_OPTIONS} @envoy_api//docs:protos --aspects \ - tools/protoxform/protoxform.bzl%proto_xform_aspect --output_groups=proto --action_env=CPROFILE_ENABLED=1 \ + tools/protoxform/protoxform.bzl%protoxform_aspect --output_groups=proto --action_env=CPROFILE_ENABLED=1 \ --spawn_strategy=standalone --host_force_python=PY3 # Find all source protos. diff --git a/tools/proto_sync.py b/tools/proto_sync.py index 809126eff520..f6d100918e89 100755 --- a/tools/proto_sync.py +++ b/tools/proto_sync.py @@ -3,11 +3,58 @@ # Diff or copy protoxform artifacts from Bazel cache back to the source tree. import glob +import os import re import shutil +import string import subprocess import sys +from importlib.util import spec_from_loader, module_from_spec +from importlib.machinery import SourceFileLoader + +# api/bazel/external_protos_deps.bzl must have a .bzl suffix for Starlark +# import, so we are forced to this workaround. +_external_proto_deps_spec = spec_from_loader( + 'external_proto_deps', + SourceFileLoader('external_proto_deps', 'api/bazel/external_proto_deps.bzl')) +external_proto_deps = module_from_spec(_external_proto_deps_spec) +_external_proto_deps_spec.loader.exec_module(external_proto_deps) + +# These .proto import direct path prefixes are already handled by +# api_proto_package() as implicit dependencies. +API_BUILD_SYSTEM_IMPORT_PREFIXES = [ + 'google/api/annotations.proto', + 'google/protobuf/', + 'google/rpc/status.proto', + 'validate/validate.proto', +] + +BUILD_FILE_TEMPLATE = string.Template( + """# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package($fields) +""") + +IMPORT_REGEX = re.compile('import "(.*)";') +SERVICE_REGEX = re.compile('service \w+ {') + + +class ProtoSyncError(Exception): + pass + + +class RequiresReformatError(ProtoSyncError): + + def __init__(self, message): + super(RequiresReformatError, self).__init__( + '%s; either run ./ci/do_ci.sh fix_format or ./tools/proto_format.sh fix to reformat.\n' % + message) + def LabelPaths(label, src_suffix): """Compute single proto file source/destination paths from a Bazel proto label. @@ -15,6 +62,7 @@ def LabelPaths(label, src_suffix): Args: label: Bazel source proto label string. src_suffix: suffix string to append to source path. + Returns: source, destination path tuple. The source indicates where in the Bazel cache the protoxform.py artifact with src_suffix can be found. The @@ -51,10 +99,7 @@ def SyncProtoFile(cmd, src, dst): try: subprocess.check_call(['diff', src, dst]) except subprocess.CalledProcessError: - sys.stderr.write( - '%s and %s do not match, either run ./ci/do_ci.sh fix_format or %s fix to reformat.\n' % - (src, dst, sys.argv[0])) - sys.exit(1) + raise RequiresReformatError('%s and %s do not match' % (src, dst)) def SyncV2(cmd, src_labels): @@ -84,8 +129,111 @@ def SyncV3Alpha(cmd, src_labels): SyncProtoFile(cmd, src, dst) +def GetImportDeps(proto_path): + """Obtain the Bazel dependencies for the import paths from a .proto file. + + Args: + proto_path: path to .proto. + + Returns: + A list of Bazel targets reflecting the imports in the .proto at proto_path. + """ + imports = [] + with open(proto_path, 'r', encoding='utf8') as f: + for line in f: + match = re.match(IMPORT_REGEX, line) + if match: + import_path = match.group(1) + # We can ignore imports provided implicitly by api_proto_package(). + if any(import_path.startswith(p) for p in API_BUILD_SYSTEM_IMPORT_PREFIXES): + continue + # Explicit remapping for external deps, compute paths for envoy/*. + if import_path in external_proto_deps.EXTERNAL_PROTO_IMPORT_BAZEL_DEP_MAP: + imports.append(external_proto_deps.EXTERNAL_PROTO_IMPORT_BAZEL_DEP_MAP[import_path]) + continue + if import_path.startswith('envoy/'): + # Ignore package internal imports. + if os.path.dirname(os.path.join('api', import_path)) == os.path.dirname(proto_path): + continue + imports.append('//%s:pkg' % os.path.dirname(import_path)) + continue + raise ProtoSyncError( + 'Unknown import path mapping for %s, please update the mappings in tools/proto_sync.py.\n' + % import_path) + return imports + + +def HasServices(proto_path): + """Does a .proto file have any service definitions? + + Args: + proto_path: path to .proto. + + Returns: + True iff there are service definitions in the .proto at proto_path. + """ + with open(proto_path, 'r', encoding='utf8') as f: + for line in f: + if re.match(SERVICE_REGEX, line): + return True + return False + + +def BuildFileContents(root, files): + """Compute the canonical BUILD contents for an api/ proto directory. + + Args: + root: base path to directory. + files: a list of files in the directory. + + Returns: + A string containing the canonical BUILD file content for root. + """ + import_deps = set(sum([GetImportDeps(os.path.join(root, f)) for f in files], [])) + has_services = any(HasServices(os.path.join(root, f)) for f in files) + fields = [] + if has_services: + fields.append(' has_services = True,') + if import_deps: + if len(import_deps) == 1: + formatted_deps = '"%s"' % list(import_deps)[0] + else: + formatted_deps = '\n' + '\n'.join( + ' "%s",' % dep + for dep in sorted(import_deps, key=lambda s: s.replace(':', '!'))) + '\n ' + fields.append(' deps = [%s],' % formatted_deps) + formatted_fields = '\n' + '\n'.join(fields) + '\n' if fields else '' + return BUILD_FILE_TEMPLATE.substitute(fields=formatted_fields) + + +def SyncBuildFiles(cmd): + """Diff or in-place update api/ BUILD files. + + Args: + cmd: 'check' or 'fix'. + """ + for root, dirs, files in os.walk('api/'): + is_proto_dir = any(f.endswith('.proto') for f in files) + if not is_proto_dir: + continue + build_contents = BuildFileContents(root, files) + build_path = os.path.join(root, 'BUILD') + if cmd == 'fix': + with open(build_path, 'w') as f: + f.write(build_contents) + else: + with open(build_path, 'r') as f: + if build_contents != f.read(): + raise RequiresReformatError('%s is not canonically formatted' % build_path) + + if __name__ == '__main__': cmd = sys.argv[1] src_labels = sys.argv[2:] - SyncV2(cmd, src_labels) - SyncV3Alpha(cmd, src_labels) + try: + SyncV2(cmd, src_labels) + SyncV3Alpha(cmd, src_labels) + SyncBuildFiles(cmd) + except ProtoSyncError as e: + sys.stderr.write('%s\n' % e) + sys.exit(1) diff --git a/tools/protodoc/protodoc.bzl b/tools/protodoc/protodoc.bzl index 4d78355ba0b7..b25ae7a3577d 100644 --- a/tools/protodoc/protodoc.bzl +++ b/tools/protodoc/protodoc.bzl @@ -1,94 +1,15 @@ -# Borrowed from -# https://github.com/bazelbuild/rules_go/blob/master/proto/toolchain.bzl. This -# does some magic munging to remove workspace prefixes from output paths to -# convert path as understood by Bazel into paths as understood by protoc. -def _proto_path(proto): - """ - The proto path is not really a file path - It's the path to the proto that was seen when the descriptor file was generated. - """ - path = proto.path - root = proto.root.path - ws = proto.owner.workspace_root - if path.startswith(root): - path = path[len(root):] - if path.startswith("/"): - path = path[1:] - if path.startswith(ws): - path = path[len(ws):] - if path.startswith("/"): - path = path[1:] - return path +load("//tools/api_proto_plugin:plugin.bzl", "api_proto_plugin_aspect", "api_proto_plugin_impl") + +def _protodoc_impl(target, ctx): + return api_proto_plugin_impl(target, ctx, "rst", "protodoc", [".rst"]) # Bazel aspect (https://docs.bazel.build/versions/master/skylark/aspects.html) # that can be invoked from the CLI to produce docs via //tools/protodoc for # proto_library targets. Example use: # -# bazel build //api --aspects tools/protodoc/protodoc.bzl%proto_doc_aspect \ +# bazel build //api --aspects tools/protodoc/protodoc.bzl%protodoc_aspect \ # --output_groups=rst # # The aspect builds the transitive docs, so any .proto in the dependency graph # get docs created. -def _proto_doc_aspect_impl(target, ctx): - # Compute RST files from the current proto_library node's dependencies. - transitive_outputs = depset(transitive = [dep.output_groups["rst"] for dep in ctx.rule.attr.deps]) - proto_sources = target[ProtoInfo].direct_sources - - # If this proto_library doesn't actually name any sources, e.g. //api:api, - # but just glues together other libs, we just need to follow the graph. - if not proto_sources: - return [OutputGroupInfo(rst = transitive_outputs)] - - # Figure out the set of import paths. Ideally we would use descriptor sets - # built by proto_library, which avoid having to do nasty path mangling, but - # these don't include source_code_info, which we need for comment - # extractions. See https://github.com/bazelbuild/bazel/issues/3971. - import_paths = [] - for f in target[ProtoInfo].transitive_sources.to_list(): - if f.root.path: - import_path = f.root.path + "/" + f.owner.workspace_root - else: - import_path = f.owner.workspace_root - if import_path: - import_paths += [import_path] - - # The outputs live in the ctx.label's package root. We add some additional - # path information to match with protoc's notion of path relative locations. - outputs = [ctx.actions.declare_file(ctx.label.name + "/" + _proto_path(f) + - ".rst") for f in proto_sources] - - # Create the protoc command-line args. - ctx_path = ctx.label.package + "/" + ctx.label.name - output_path = outputs[0].root.path + "/" + outputs[0].owner.workspace_root + "/" + ctx_path - args = ["-I./" + ctx.label.workspace_root] - args += ["-I" + import_path for import_path in import_paths] - args += ["--plugin=protoc-gen-protodoc=" + ctx.executable._protodoc.path, "--protodoc_out=" + output_path] - args += [_proto_path(src) for src in target[ProtoInfo].direct_sources] - ctx.actions.run( - executable = ctx.executable._protoc, - arguments = args, - inputs = target[ProtoInfo].transitive_sources, - tools = [ctx.executable._protodoc], - outputs = outputs, - mnemonic = "ProtoDoc", - use_default_shell_env = True, - ) - transitive_outputs = depset(outputs, transitive = [transitive_outputs]) - return [OutputGroupInfo(rst = transitive_outputs)] - -proto_doc_aspect = aspect( - attr_aspects = ["deps"], - attrs = { - "_protoc": attr.label( - default = Label("@com_google_protobuf//:protoc"), - executable = True, - cfg = "exec", - ), - "_protodoc": attr.label( - default = Label("//tools/protodoc"), - executable = True, - cfg = "exec", - ), - }, - implementation = _proto_doc_aspect_impl, -) +protodoc_aspect = api_proto_plugin_aspect("//tools/protodoc", _protodoc_impl) diff --git a/tools/protoxform/protoxform.bzl b/tools/protoxform/protoxform.bzl index 5a793eb12928..d8df4c439705 100644 --- a/tools/protoxform/protoxform.bzl +++ b/tools/protoxform/protoxform.bzl @@ -1,98 +1,12 @@ -# TODO(htuch): this is a clone+modify from //tools/protodoc:protodoc.bzl. -# Factor out common parts for this kind of API protoc aspect. +load("//tools/api_proto_plugin:plugin.bzl", "api_proto_plugin_aspect", "api_proto_plugin_impl") -# Borrowed from -# https://github.com/bazelbuild/rules_go/blob/master/proto/toolchain.bzl. This -# does some magic munging to remove workspace prefixes from output paths to -# convert path as understood by Bazel into paths as understood by protoc. -def _proto_path(proto): - """ - The proto path is not really a file path - It's the path to the proto that was seen when the descriptor file was generated. - """ - path = proto.path - root = proto.root.path - ws = proto.owner.workspace_root - if path.startswith(root): - path = path[len(root):] - if path.startswith("/"): - path = path[1:] - if path.startswith(ws): - path = path[len(ws):] - if path.startswith("/"): - path = path[1:] - return path +def _protoxform_impl(target, ctx): + return api_proto_plugin_impl(target, ctx, "proto", "protoxform", [".v2.proto", ".v3alpha.proto"]) # Bazel aspect (https://docs.bazel.build/versions/master/skylark/aspects.html) # that can be invoked from the CLI to perform API transforms via //tools/protoxform for # proto_library targets. Example use: # -# bazel build //api --aspects tools/protoxform/protoxform.bzl%proto_xform_aspect \ +# bazel build //api --aspects tools/protoxform/protoxform.bzl%protoxform_aspect \ # --output_groups=proto -def _proto_xform_aspect_impl(target, ctx): - # Compute .proto files from the current proto_library node's dependencies. - transitive_outputs = depset(transitive = [dep.output_groups["proto"] for dep in ctx.rule.attr.deps]) - proto_sources = target[ProtoInfo].direct_sources - - # If this proto_library doesn't actually name any sources, e.g. //api:api, - # but just glues together other libs, we just need to follow the graph. - if not proto_sources: - return [OutputGroupInfo(proto = transitive_outputs)] - - # Figure out the set of import paths. Ideally we would use descriptor sets - # built by proto_library, which avoid having to do nasty path mangling, but - # these don't include source_code_info, which we need for comment - # extractions. See https://github.com/bazelbuild/bazel/issues/3971. - import_paths = [] - for f in target[ProtoInfo].transitive_sources.to_list(): - if f.root.path: - import_path = f.root.path + "/" + f.owner.workspace_root - else: - import_path = f.owner.workspace_root - if import_path: - import_paths += [import_path] - - # The outputs live in the ctx.label's package root. We add some additional - # path information to match with protoc's notion of path relative locations. - api_versions = ["v2", "v3alpha"] - outputs = [] - for api_version in api_versions: - outputs += [ctx.actions.declare_file(ctx.label.name + "/" + _proto_path(f) + - ".%s.proto" % api_version) for f in proto_sources] - - # Create the protoc command-line args. - ctx_path = ctx.label.package + "/" + ctx.label.name - output_path = outputs[0].root.path + "/" + outputs[0].owner.workspace_root + "/" + ctx_path - args = ["-I./" + ctx.label.workspace_root] - args += ["-I" + import_path for import_path in import_paths] - args += ["--plugin=protoc-gen-protoxform=" + ctx.executable._protoxform.path, "--protoxform_out=" + output_path] - args += [_proto_path(src) for src in target[ProtoInfo].direct_sources] - ctx.actions.run( - executable = ctx.executable._protoc, - arguments = args, - inputs = target[ProtoInfo].transitive_sources, - tools = [ctx.executable._protoxform], - outputs = outputs, - mnemonic = "protoxform", - use_default_shell_env = True, - ) - - transitive_outputs = depset(outputs, transitive = [transitive_outputs]) - return [OutputGroupInfo(proto = transitive_outputs)] - -proto_xform_aspect = aspect( - attr_aspects = ["deps"], - attrs = { - "_protoc": attr.label( - default = Label("@com_google_protobuf//:protoc"), - executable = True, - cfg = "exec", - ), - "_protoxform": attr.label( - default = Label("//tools/protoxform"), - executable = True, - cfg = "exec", - ), - }, - implementation = _proto_xform_aspect_impl, -) +protoxform_aspect = api_proto_plugin_aspect("//tools/protoxform", _protoxform_impl)