Skip to content

Commit

Permalink
all: apply api booster to tree. (#9347)
Browse files Browse the repository at this point in the history
This applies the API booster in #9329 to the Envoy tree. So far it just
figures out the correct include headers based on encountered API protos,
more to follow.

Risk level: Low
Testing: bazel test //test/....

Signed-off-by: Harvey Tuch <htuch@google.com>
  • Loading branch information
htuch authored Dec 15, 2019
1 parent abc2a84 commit 7ff7cb4
Show file tree
Hide file tree
Showing 879 changed files with 2,010 additions and 254 deletions.
1 change: 1 addition & 0 deletions include/envoy/network/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ envoy_cc_library(
":connection_interface",
":listen_socket_interface",
"//include/envoy/stats:stats_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
],
)

Expand Down
2 changes: 1 addition & 1 deletion include/envoy/network/hash_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ class HashPolicy {
const Network::Address::Instance* upstream_address) const PURE;
};
} // namespace Network
} // namespace Envoy
} // namespace Envoy
1 change: 1 addition & 0 deletions include/envoy/network/listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string>

#include "envoy/api/io_error.h"
#include "envoy/api/v2/core/base.pb.h"
#include "envoy/common/exception.h"
#include "envoy/network/connection.h"
#include "envoy/network/connection_balancer.h"
Expand Down
3 changes: 3 additions & 0 deletions include/envoy/router/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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/api/v2:pkg_cc_proto",
"@envoy_api//envoy/config/filter/network/http_connection_manager/v2:pkg_cc_proto",
],
)
Expand All @@ -42,6 +43,7 @@ envoy_cc_library(
":rds_interface",
"//include/envoy/common:time_interface",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand All @@ -63,6 +65,7 @@ envoy_cc_library(
"//source/common/protobuf",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/type:pkg_cc_proto",
],
)

Expand Down
1 change: 1 addition & 0 deletions include/envoy/router/route_config_provider_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <string>

#include "envoy/api/v2/rds.pb.h"
#include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.pb.h"
#include "envoy/event/dispatcher.h"
#include "envoy/json/json_object.h"
Expand Down
2 changes: 2 additions & 0 deletions include/envoy/router/route_config_update_receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include <memory>

#include "envoy/api/v2/discovery.pb.h"
#include "envoy/api/v2/rds.pb.h"
#include "envoy/common/pure.h"
#include "envoy/common/time.h"
#include "envoy/router/rds.h"
Expand Down
1 change: 1 addition & 0 deletions include/envoy/router/router.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "envoy/http/hash_policy.h"
#include "envoy/http/header_map.h"
#include "envoy/tracing/http_tracer.h"
#include "envoy/type/percent.pb.h"
#include "envoy/upstream/resource_manager.h"
#include "envoy/upstream/retry.h"

Expand Down
1 change: 1 addition & 0 deletions include/envoy/secret/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ envoy_cc_library(
deps = [
":secret_provider_interface",
"@envoy_api//envoy/api/v2/auth:pkg_cc_proto",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
],
)
1 change: 1 addition & 0 deletions include/envoy/secret/secret_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <string>

#include "envoy/api/v2/auth/cert.pb.h"
#include "envoy/api/v2/core/config_source.pb.h"
#include "envoy/secret/secret_provider.h"

namespace Envoy {
Expand Down
8 changes: 7 additions & 1 deletion include/envoy/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ envoy_cc_library(
"//include/envoy/ratelimit:ratelimit_interface",
"//include/envoy/tracing:http_tracer_interface",
"//include/envoy/upstream:cluster_manager_interface",
"@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto",
],
)

Expand Down Expand Up @@ -71,7 +72,10 @@ envoy_cc_library(
envoy_cc_library(
name = "health_checker_config_interface",
hdrs = ["health_checker_config.h"],
deps = ["//include/envoy/upstream:health_checker_interface"],
deps = [
"//include/envoy/upstream:health_checker_interface",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
],
)

envoy_cc_library(
Expand Down Expand Up @@ -191,6 +195,8 @@ envoy_cc_library(
"//include/envoy/ssl:context_interface",
"//source/common/protobuf",
"@envoy_api//envoy/admin/v2alpha:pkg_cc_proto",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/api/v2/listener:pkg_cc_proto",
],
)
Expand Down
1 change: 1 addition & 0 deletions include/envoy/server/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <string>
#include <vector>

#include "envoy/config/bootstrap/v2/bootstrap.pb.h"
#include "envoy/stats/sink.h"
#include "envoy/tracing/http_tracer.h"
#include "envoy/upstream/cluster_manager.h"
Expand Down
1 change: 1 addition & 0 deletions include/envoy/server/health_checker_config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "envoy/api/v2/core/health_check.pb.h"
#include "envoy/runtime/runtime.h"
#include "envoy/upstream/health_checker.h"

Expand Down
2 changes: 2 additions & 0 deletions include/envoy/server/listener_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <vector>

#include "envoy/admin/v2alpha/config_dump.pb.h"
#include "envoy/api/v2/core/config_source.pb.h"
#include "envoy/api/v2/lds.pb.h"
#include "envoy/api/v2/listener/listener.pb.h"
#include "envoy/network/filter.h"
#include "envoy/network/listen_socket.h"
Expand Down
4 changes: 3 additions & 1 deletion include/envoy/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ envoy_cc_library(
"//include/envoy/tcp:conn_pool_interface",
"//include/envoy/thread_local:thread_local_interface",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/config/bootstrap/v2:pkg_cc_proto",
],
)
Expand Down Expand Up @@ -149,6 +150,7 @@ envoy_cc_library(
"//include/envoy/ssl:context_interface",
"//include/envoy/ssl:context_manager_interface",
"//include/envoy/upstream:types_interface",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
],
)
Expand All @@ -171,6 +173,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/core:pkg_cc_proto",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)
2 changes: 1 addition & 1 deletion include/envoy/upstream/cluster_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "envoy/access_log/access_log.h"
#include "envoy/api/api.h"
#include "envoy/api/v2/core/base.pb.h"
#include "envoy/api/v2/cds.pb.h"
#include "envoy/event/dispatcher.h"
#include "envoy/local_info/local_info.h"
#include "envoy/network/dns.h"
Expand Down
2 changes: 2 additions & 0 deletions include/envoy/upstream/cluster_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "envoy/access_log/access_log.h"
#include "envoy/api/api.h"
#include "envoy/api/v2/cds.pb.h"
#include "envoy/api/v2/core/address.pb.h"
#include "envoy/api/v2/core/config_source.pb.h"
#include "envoy/config/bootstrap/v2/bootstrap.pb.h"
#include "envoy/config/grpc_mux.h"
#include "envoy/config/subscription_factory.h"
Expand Down
1 change: 1 addition & 0 deletions include/envoy/upstream/upstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string>
#include <vector>

#include "envoy/api/v2/cds.pb.h"
#include "envoy/api/v2/core/base.pb.h"
#include "envoy/common/callback.h"
#include "envoy/config/typed_metadata.h"
Expand Down
2 changes: 2 additions & 0 deletions source/common/access_log/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ envoy_cc_library(
"//source/common/stream_info:stream_info_lib",
"//source/common/tracing:http_tracer_lib",
"@envoy_api//envoy/config/filter/accesslog/v2:pkg_cc_proto",
"@envoy_api//envoy/type:pkg_cc_proto",
],
)

Expand All @@ -49,6 +50,7 @@ envoy_cc_library(
"//source/common/http:utility_lib",
"//source/common/protobuf:message_validator_lib",
"//source/common/stream_info:utility_lib",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
],
)

Expand Down
2 changes: 2 additions & 0 deletions source/common/access_log/access_log_formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <string>
#include <vector>

#include "envoy/api/v2/core/base.pb.h"

#include "common/common/assert.h"
#include "common/common/fmt.h"
#include "common/common/utility.h"
Expand Down
1 change: 1 addition & 0 deletions source/common/access_log/access_log_formatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <vector>

#include "envoy/access_log/access_log.h"
#include "envoy/api/v2/core/base.pb.h"
#include "envoy/common/time.h"
#include "envoy/stream_info/stream_info.h"

Expand Down
1 change: 1 addition & 0 deletions source/common/access_log/access_log_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <string>

#include "envoy/common/time.h"
#include "envoy/config/filter/accesslog/v2/accesslog.pb.h"
#include "envoy/config/filter/accesslog/v2/accesslog.pb.validate.h"
#include "envoy/filesystem/filesystem.h"
#include "envoy/http/header_map.h"
Expand Down
1 change: 1 addition & 0 deletions source/common/access_log/access_log_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "envoy/config/filter/accesslog/v2/accesslog.pb.h"
#include "envoy/runtime/runtime.h"
#include "envoy/server/access_log_config.h"
#include "envoy/type/percent.pb.h"

#include "common/grpc/status.h"
#include "common/http/header_utility.h"
Expand Down
2 changes: 1 addition & 1 deletion source/common/api/os_sys_calls_impl_hot_restart.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ class HotRestartOsSysCallsImpl : public HotRestartOsSysCalls {
using HotRestartOsSysCallsSingleton = ThreadSafeSingleton<HotRestartOsSysCallsImpl>;

} // namespace Api
} // namespace Envoy
} // namespace Envoy
4 changes: 4 additions & 0 deletions source/common/common/matchers.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "common/common/matchers.h"

#include "envoy/api/v2/core/base.pb.h"
#include "envoy/type/matcher/metadata.pb.h"
#include "envoy/type/matcher/number.pb.h"
#include "envoy/type/matcher/string.pb.h"
#include "envoy/type/matcher/value.pb.h"

#include "common/common/regex.h"
#include "common/config/metadata.h"
Expand Down
Empty file modified source/common/common/posix/thread_impl.h
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions source/common/common/regex.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "common/common/regex.h"

#include "envoy/common/exception.h"
#include "envoy/type/matcher/regex.pb.h"

#include "common/common/assert.h"
#include "common/common/fmt.h"
Expand Down
16 changes: 9 additions & 7 deletions source/common/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ envoy_cc_library(
"//source/common/common:minimal_logger_lib",
"//source/common/common:token_bucket_impl_lib",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand Down Expand Up @@ -104,7 +105,7 @@ envoy_cc_library(
"//source/common/protobuf",
"//source/common/protobuf:message_validator_lib",
"//source/common/protobuf:utility_lib",
"@envoy_api//envoy/api/v2/core:pkg_cc_proto",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand Down Expand Up @@ -137,6 +138,7 @@ envoy_cc_library(
"//include/envoy/upstream:cluster_manager_interface",
"//source/common/common:minimal_logger_lib",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand All @@ -152,7 +154,6 @@ envoy_cc_library(
"//source/common/common:minimal_logger_lib",
"//source/common/grpc:common_lib",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand All @@ -165,7 +166,6 @@ 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:pkg_cc_proto",
],
)

Expand Down Expand Up @@ -201,7 +201,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:pkg_cc_proto",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand All @@ -227,7 +227,6 @@ envoy_cc_library(
deps = [
"//source/common/common:assert_lib",
"@com_google_googleapis//google/rpc:status_cc_proto",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand Down Expand Up @@ -294,6 +293,8 @@ envoy_cc_library(
"//source/common/grpc:common_lib",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
"@envoy_api//envoy/api/v2/auth:pkg_cc_proto",
"@envoy_api//envoy/api/v2/route:pkg_cc_proto",
"@envoy_api//envoy/service/discovery/v2:pkg_cc_proto",
],
)
Expand Down Expand Up @@ -324,10 +325,10 @@ envoy_cc_library(
"//source/common/stats:stats_matcher_lib",
"//source/common/stats:tag_producer_lib",
"@com_github_cncf_udpa//udpa/type/v1:pkg_cc_proto",
"@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",
"@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/metrics/v2:pkg_cc_proto",
],
)

Expand All @@ -350,6 +351,7 @@ envoy_cc_library(
"//source/common/common:assert_lib",
"//source/common/common:minimal_logger_lib",
"//source/common/protobuf",
"@envoy_api//envoy/api/v2:pkg_cc_proto",
],
)

Expand Down
2 changes: 2 additions & 0 deletions source/common/config/datasource.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "common/config/datasource.h"

#include "envoy/api/v2/core/base.pb.h"

#include "fmt/format.h"

namespace Envoy {
Expand Down
2 changes: 2 additions & 0 deletions source/common/config/delta_subscription_impl.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "common/config/delta_subscription_impl.h"

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

namespace Envoy {
namespace Config {

Expand Down
1 change: 1 addition & 0 deletions source/common/config/delta_subscription_impl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

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

#include "common/config/new_grpc_mux_impl.h"
Expand Down
2 changes: 2 additions & 0 deletions source/common/config/delta_subscription_state.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "common/config/delta_subscription_state.h"

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

#include "common/common/assert.h"
#include "common/common/hash.h"

Expand Down
2 changes: 2 additions & 0 deletions source/common/config/filesystem_subscription_impl.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "common/config/filesystem_subscription_impl.h"

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

#include "common/common/macros.h"
#include "common/config/utility.h"
#include "common/protobuf/protobuf.h"
Expand Down
1 change: 0 additions & 1 deletion source/common/config/filesystem_subscription_impl.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include "envoy/api/api.h"
#include "envoy/api/v2/core/base.pb.h"
#include "envoy/config/subscription.h"
#include "envoy/event/dispatcher.h"
#include "envoy/filesystem/filesystem.h"
Expand Down
Loading

0 comments on commit 7ff7cb4

Please sign in to comment.