Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 0 additions & 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,11 @@ 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/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
37 changes: 0 additions & 37 deletions source/common/config/protobuf_link_hacks.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
#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/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 +15,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 @@ -49,18 +26,4 @@ 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;

} // 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 @@ -413,7 +413,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
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
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::32::ZipkinConfig::HTTP_JSON_V1. In

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, fixed!

// 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
1 change: 0 additions & 1 deletion source/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ envoy_cc_library(
"//source/common/protobuf:utility_lib",
"//source/common/stats:stats_lib",
"//source/common/version:version_lib",
"@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto",
],
)

Expand Down
2 changes: 2 additions & 0 deletions test/common/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ envoy_cc_test(
"//test/test_common:simulated_time_system_lib",
"//test/test_common:test_runtime_lib",
"//test/test_common:utility_lib",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
Expand Down Expand Up @@ -258,6 +259,7 @@ envoy_cc_test_library(
"//test/mocks/grpc:grpc_mocks",
"//test/mocks/local_info:local_info_mocks",
"//test/mocks/runtime:runtime_mocks",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
"@envoy_api//envoy/config/endpoint/v3:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
Expand Down
1 change: 1 addition & 0 deletions test/common/config/delta_subscription_test_harness.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <queue>

#include "envoy/api/v2/discovery.pb.h"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still use v2?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this PR only fixes src/ :-)

#include "envoy/config/core/v3/base.pb.h"
#include "envoy/config/endpoint/v3/endpoint.pb.h"
#include "envoy/config/endpoint/v3/endpoint.pb.validate.h"
Expand Down
1 change: 1 addition & 0 deletions test/common/config/new_grpc_mux_impl_test.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <memory>

#include "envoy/api/v2/discovery.pb.h"
#include "envoy/config/endpoint/v3/endpoint.pb.h"
#include "envoy/config/endpoint/v3/endpoint.pb.validate.h"
#include "envoy/event/timer.h"
Expand Down