Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/envoy/service/health/v3/hds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,8 @@ message HealthCheckSpecifier {
// The default is 1 second.
google.protobuf.Duration interval = 2;
}

// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message HdsDummy {
}
6 changes: 6 additions & 0 deletions api/envoy/service/health/v4alpha/hds.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions generated_api_shadow/envoy/service/health/v3/hds.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions generated_api_shadow/envoy/service/health/v4alpha/hds.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions source/common/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ envoy_cc_library(
"//source/common/common:token_bucket_impl_lib",
"//source/common/grpc:common_lib",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)
Expand Down Expand Up @@ -172,7 +171,6 @@ envoy_cc_library(
"//source/common/memory:utils_lib",
"//source/common/protobuf",
"@com_google_absl//absl/container:btree",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)
Expand Down Expand Up @@ -205,7 +203,6 @@ envoy_cc_library(
"//envoy/event:dispatcher_interface",
"//envoy/grpc:async_client_interface",
"//source/common/memory:utils_lib",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)
Expand All @@ -231,7 +228,6 @@ envoy_cc_library(
"//source/common/http:rest_api_fetcher_lib",
"//source/common/protobuf",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)
Expand Down Expand Up @@ -277,15 +273,12 @@ envoy_cc_library(
name = "protobuf_link_hacks",
hdrs = ["protobuf_link_hacks.h"],
deps = [
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto",
"@envoy_api//envoy/service/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v2:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
"@envoy_api//envoy/service/endpoint/v3:pkg_cc_proto",
"@envoy_api//envoy/service/extension/v3:pkg_cc_proto",
"@envoy_api//envoy/service/health/v3:pkg_cc_proto",
"@envoy_api//envoy/service/listener/v3:pkg_cc_proto",
"@envoy_api//envoy/service/ratelimit/v2:pkg_cc_proto",
"@envoy_api//envoy/service/ratelimit/v3:pkg_cc_proto",
"@envoy_api//envoy/service/route/v3:pkg_cc_proto",
"@envoy_api//envoy/service/runtime/v3:pkg_cc_proto",
Expand Down
1 change: 0 additions & 1 deletion source/common/config/delta_subscription_state.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include "envoy/api/v2/discovery.pb.h"
#include "envoy/config/subscription.h"
#include "envoy/event/dispatcher.h"
#include "envoy/grpc/status.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/config/grpc_mux_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <memory>
#include <queue>

#include "envoy/api/v2/discovery.pb.h"
#include "envoy/common/random_generator.h"
#include "envoy/common/time.h"
#include "envoy/config/grpc_mux.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/config/http_subscription_impl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include "envoy/api/v2/discovery.pb.h"
#include "envoy/common/random_generator.h"
#include "envoy/config/subscription.h"
#include "envoy/event/dispatcher.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/config/new_grpc_mux_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <memory>

#include "envoy/api/v2/discovery.pb.h"
#include "envoy/common/random_generator.h"
#include "envoy/common/token_bucket.h"
#include "envoy/config/grpc_mux.h"
Expand Down
40 changes: 3 additions & 37 deletions source/common/config/protobuf_link_hacks.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
#pragma once

#include "envoy/api/v2/cds.pb.h"
#include "envoy/api/v2/eds.pb.h"
#include "envoy/api/v2/lds.pb.h"
#include "envoy/api/v2/rds.pb.h"
#include "envoy/api/v2/srds.pb.h"
#include "envoy/config/bootstrap/v2/bootstrap.pb.h"
#include "envoy/service/cluster/v3/cds.pb.h"
#include "envoy/service/discovery/v2/ads.pb.h"
#include "envoy/service/discovery/v2/hds.pb.h"
#include "envoy/service/discovery/v2/rtds.pb.h"
#include "envoy/service/discovery/v2/sds.pb.h"
#include "envoy/service/discovery/v3/ads.pb.h"
#include "envoy/service/endpoint/v3/eds.pb.h"
#include "envoy/service/extension/v3/config_discovery.pb.h"
#include "envoy/service/health/v3/hds.pb.h"
#include "envoy/service/listener/v3/lds.pb.h"
#include "envoy/service/ratelimit/v2/rls.pb.h"
#include "envoy/service/ratelimit/v3/rls.pb.h"
#include "envoy/service/route/v3/rds.pb.h"
#include "envoy/service/route/v3/srds.pb.h"
Expand All @@ -26,18 +16,6 @@

namespace Envoy {

// Hack to force linking of the service: https://github.com/google/protobuf/issues/4221.
// This file should be included ONLY if this hack is required.
const envoy::service::discovery::v2::AdsDummy _ads_dummy_v2;
const envoy::service::ratelimit::v2::RateLimitRequest _rls_dummy_v2;
const envoy::service::discovery::v2::SdsDummy _sds_dummy_v2;
const envoy::service::discovery::v2::RtdsDummy _tds_dummy_v2;
const envoy::api::v2::LdsDummy _lds_dummy_v2;
const envoy::api::v2::RdsDummy _rds_dummy_v2;
const envoy::api::v2::CdsDummy _cds_dummy_v2;
const envoy::api::v2::EdsDummy _eds_dummy_v2;
const envoy::api::v2::SrdsDummy _srds_dummy_v2;

const envoy::service::discovery::v3::AdsDummy _ads_dummy_v3;
const envoy::service::ratelimit::v3::RateLimitRequest _rls_dummy_v3;
const envoy::service::secret::v3::SdsDummy _sds_dummy_v3;
Expand All @@ -48,19 +26,7 @@ const envoy::service::cluster::v3::CdsDummy _cds_dummy_v3;
const envoy::service::endpoint::v3::EdsDummy _eds_dummy_v3;
const envoy::service::route::v3::SrdsDummy _srds_dummy_v3;
const envoy::service::extension::v3::EcdsDummy _ecds_dummy_v3;

// With the v2 -> v3 migration there is another, related linking issue.
// Symbols for v2 protos which headers are not included in any file in the codebase are being
// dropped by the linker in some circumstances. For example, in the Envoy Mobile iOS build system.
// Even though all v2 packages are included as a dependency in their corresponding v3 package, and
// `always_link` is set for all proto bazel targets.
// Further proof of this can be seen by way of counter example with the envoy.api.v2.Cluster type,
// which is checked for by proto_descriptors.cc. This type **is** getting linked because its headers
// is still included in cds_api_impl.cc. On the other side because the v2 hds header is not included
// anywhere the v2 service type is getting dropped, and thus the descriptor is not present in the
// descriptor pool.
// https://github.com/envoyproxy/envoy/issues/9639
const envoy::config::bootstrap::v2::Bootstrap _bootstrap_dummy_v2;
const envoy::service::discovery::v2::Capability _hds_dummy_v2;
const envoy::service::runtime::v3::RtdsDummy _rtds_dummy_v3;
const envoy::service::health::v3::HdsDummy _hds_dummy_v3;

} // namespace Envoy
3 changes: 0 additions & 3 deletions source/common/router/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ envoy_cc_library(
"//source/common/init:target_lib",
"//source/common/protobuf:utility_lib",
"//source/common/router:route_config_update_impl_lib",
"@envoy_api//envoy/api/v2/route:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/route/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
Expand Down Expand Up @@ -189,7 +188,6 @@ envoy_cc_library(
"//source/common/router:route_config_update_impl_lib",
"//source/common/router:vhds_lib",
"@envoy_api//envoy/admin/v3:pkg_cc_proto",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/route/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3:pkg_cc_proto",
Expand Down Expand Up @@ -237,7 +235,6 @@ envoy_cc_library(
"//source/common/init:manager_lib",
"//source/common/init:watcher_lib",
"@envoy_api//envoy/admin/v3:pkg_cc_proto",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/route/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3:pkg_cc_proto",
Expand Down
1 change: 0 additions & 1 deletion source/common/router/rds_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <string>

#include "envoy/admin/v3/config_dump.pb.h"
#include "envoy/api/v2/route.pb.h"
#include "envoy/config/core/v3/config_source.pb.h"
#include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.h"
#include "envoy/service/discovery/v3/discovery.pb.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/router/scoped_rds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <memory>

#include "envoy/admin/v3/config_dump.pb.h"
#include "envoy/api/v2/scoped_route.pb.h"
#include "envoy/config/core/v3/config_source.pb.h"
#include "envoy/config/route/v3/scoped_route.pb.h"
#include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/router/vhds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <memory>
#include <string>

#include "envoy/api/v2/route/route_components.pb.h"
#include "envoy/config/core/v3/config_source.pb.h"
#include "envoy/config/subscription.h"
#include "envoy/service/discovery/v3/discovery.pb.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/secret/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ envoy_cc_library(
"//source/common/protobuf:utility_lib",
"//source/common/ssl:certificate_validation_context_config_impl_lib",
"//source/common/ssl:tls_certificate_config_impl_lib",
"@envoy_api//envoy/api/v2/auth:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/extensions/transport_sockets/tls/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
Expand Down
1 change: 0 additions & 1 deletion source/common/secret/sds_api.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "source/common/secret/sds_api.h"

#include "envoy/api/v2/auth/cert.pb.h"
#include "envoy/config/core/v3/config_source.pb.h"
#include "envoy/extensions/transport_sockets/tls/v3/cert.pb.h"
#include "envoy/service/discovery/v3/discovery.pb.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ envoy_cc_library(
"//source/common/network:resolver_lib",
"//source/common/network:utility_lib",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
Expand Down
1 change: 0 additions & 1 deletion source/common/upstream/eds.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "source/common/upstream/eds.h"

#include "envoy/api/v2/endpoint.pb.h"
#include "envoy/common/exception.h"
#include "envoy/config/cluster/v3/cluster.pb.h"
#include "envoy/config/core/v3/config_source.pb.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace AccessLoggers {
namespace GrpcCommon {

void validateProtoDescriptors() {
const auto method = "envoy.service.accesslog.v2.AccessLogService.StreamAccessLogs";
const auto method = "envoy.service.accesslog.v3.AccessLogService.StreamAccessLogs";

RELEASE_ASSERT(Protobuf::DescriptorPool::generated_pool()->FindMethodByName(method) != nullptr,
"");
Expand Down
1 change: 0 additions & 1 deletion source/extensions/filters/http/oauth2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ envoy_cc_extension(
":oauth_lib",
"//envoy/registry",
"//source/extensions/filters/http/common:factory_base_lib",
"@envoy_api//envoy/api/v2/auth:pkg_cc_proto",
"@envoy_api//envoy/extensions/filters/http/oauth2/v3alpha:pkg_cc_proto",
],
)
1 change: 0 additions & 1 deletion source/extensions/filters/http/oauth2/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <memory>
#include <string>

#include "envoy/api/v2/auth/secret.pb.h"
#include "envoy/common/exception.h"
#include "envoy/extensions/filters/http/oauth2/v3alpha/oauth.pb.validate.h"
#include "envoy/registry/registry.h"
Expand Down
3 changes: 2 additions & 1 deletion source/extensions/filters/http/squash/squash_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ void SquashFilterConfig::updateTemplateInValue(ProtobufWkt::Value& curvalue) {
To interpolate an environment variable named ENV, add '{{ ENV }}' (without the
quotes, with the spaces) to the template string.

See api/envoy/config/filter/http/squash/v2/squash.proto for the motivation on why this is needed.
See api/envoy/extensions/filters/http/squash/v3/squash.proto for the motivation on why this is
needed.
*/
std::string SquashFilterConfig::replaceEnv(const std::string& attachment_template) {
std::string s;
Expand Down
4 changes: 2 additions & 2 deletions source/extensions/tracers/zipkin/span_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SpanBuffer {
* the method allocateBuffer(size).
*
* @param version The selected Zipkin collector version. @see
* api/envoy/config/trace/v2/trace.proto.
* api/envoy/config/trace/v3/trace.proto.
* @param shared_span_context To determine whether client and server spans will share the same
* span context.
*/
Expand All @@ -35,7 +35,7 @@ class SpanBuffer {
* Constructor that initializes a buffer with the given size.
*
* @param version The selected Zipkin collector version. @see
* api/envoy/config/trace/v2/trace.proto.
* api/envoy/config/trace/v3/trace.proto.
* @param shared_span_context To determine whether client and server spans will share the same
* span context.
* @param size The desired buffer size.
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/tracers/zipkin/zipkin_tracer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ struct CollectorInfo {
std::string endpoint_{DEFAULT_COLLECTOR_ENDPOINT};

// The version of the collector. This is related to endpoint's supported payload specification and
// transport. Currently it defaults to envoy::config::trace::v2::ZipkinConfig::HTTP_JSON_V1. In
// transport. Currently it defaults to envoy::config::trace::v3::ZipkinConfig::HTTP_JSON_V1. In
// the future, we will throw when collector_endpoint_version is not specified.
envoy::config::trace::v3::ZipkinConfig::CollectorEndpointVersion version_{
envoy::config::trace::v3::ZipkinConfig::hidden_envoy_deprecated_HTTP_JSON_V1};
Expand Down
38 changes: 19 additions & 19 deletions source/server/proto_descriptors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ namespace Server {

void validateProtoDescriptors() {
const auto methods = {
"envoy.api.v2.ClusterDiscoveryService.FetchClusters",
"envoy.api.v2.ClusterDiscoveryService.StreamClusters",
"envoy.api.v2.ClusterDiscoveryService.DeltaClusters",
"envoy.api.v2.EndpointDiscoveryService.FetchEndpoints",
"envoy.api.v2.EndpointDiscoveryService.StreamEndpoints",
"envoy.api.v2.EndpointDiscoveryService.DeltaEndpoints",
"envoy.api.v2.ListenerDiscoveryService.FetchListeners",
"envoy.api.v2.ListenerDiscoveryService.StreamListeners",
"envoy.api.v2.ListenerDiscoveryService.DeltaListeners",
"envoy.api.v2.RouteDiscoveryService.FetchRoutes",
"envoy.api.v2.RouteDiscoveryService.StreamRoutes",
"envoy.api.v2.RouteDiscoveryService.DeltaRoutes",
"envoy.service.discovery.v2.AggregatedDiscoveryService.StreamAggregatedResources",
"envoy.service.discovery.v2.AggregatedDiscoveryService.DeltaAggregatedResources",
"envoy.service.discovery.v2.HealthDiscoveryService.FetchHealthCheck",
"envoy.service.discovery.v2.HealthDiscoveryService.StreamHealthCheck",
"envoy.service.discovery.v2.RuntimeDiscoveryService.FetchRuntime",
"envoy.service.discovery.v2.RuntimeDiscoveryService.StreamRuntime",
"envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit",
"envoy.service.cluster.v3.ClusterDiscoveryService.FetchClusters",
"envoy.service.cluster.v3.ClusterDiscoveryService.StreamClusters",
"envoy.service.cluster.v3.ClusterDiscoveryService.DeltaClusters",
"envoy.service.discovery.v3.AggregatedDiscoveryService.StreamAggregatedResources",
"envoy.service.discovery.v3.AggregatedDiscoveryService.DeltaAggregatedResources",
"envoy.service.endpoint.v3.EndpointDiscoveryService.FetchEndpoints",
"envoy.service.endpoint.v3.EndpointDiscoveryService.StreamEndpoints",
"envoy.service.endpoint.v3.EndpointDiscoveryService.DeltaEndpoints",
"envoy.service.health.v3.HealthDiscoveryService.FetchHealthCheck",
"envoy.service.health.v3.HealthDiscoveryService.StreamHealthCheck",
"envoy.service.listener.v3.ListenerDiscoveryService.FetchListeners",
"envoy.service.listener.v3.ListenerDiscoveryService.StreamListeners",
"envoy.service.listener.v3.ListenerDiscoveryService.DeltaListeners",
"envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit",
"envoy.service.route.v3.RouteDiscoveryService.FetchRoutes",
"envoy.service.route.v3.RouteDiscoveryService.StreamRoutes",
"envoy.service.route.v3.RouteDiscoveryService.DeltaRoutes",
"envoy.service.runtime.v3.RuntimeDiscoveryService.StreamRuntime",
"envoy.service.runtime.v3.RuntimeDiscoveryService.FetchRuntime",
};

for (const auto& method : methods) {
Expand Down
Loading