diff --git a/api/bazel/repository_locations.bzl b/api/bazel/repository_locations.bzl index 503d6bc89078b..afe78af1e47b2 100644 --- a/api/bazel/repository_locations.bzl +++ b/api/bazel/repository_locations.bzl @@ -33,7 +33,7 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/envoyproxy/protoc-gen-validate/archive/" + PGV_GIT_SHA + ".tar.gz"], ), com_google_googleapis = dict( - # TODO(dio): Consider writing a Skylark macro for importing Google API proto. + # TODO(dio): Consider writing a Starlark macro for importing Google API proto. sha256 = GOOGLEAPIS_SHA, strip_prefix = "googleapis-" + GOOGLEAPIS_GIT_SHA, urls = ["https://github.com/googleapis/googleapis/archive/" + GOOGLEAPIS_GIT_SHA + ".tar.gz"], diff --git a/bazel/envoy_library.bzl b/bazel/envoy_library.bzl index 6f8c56497093b..40cd6683836e7 100644 --- a/bazel/envoy_library.bzl +++ b/bazel/envoy_library.bzl @@ -21,7 +21,7 @@ def tcmalloc_external_deps(repository): # Envoy C++ library targets that need no transformations or additional dependencies before being # passed to cc_library should be specified with this function. Note: this exists to ensure that -# all envoy targets pass through an envoy-declared skylark function where they can be modified +# all envoy targets pass through an envoy-declared starlark function where they can be modified # before being passed to a native bazel function. def envoy_basic_cc_library(name, deps = [], external_deps = [], **kargs): cc_library( diff --git a/bazel/genrule_repository.bzl b/bazel/genrule_repository.bzl index ff4e6fe9dcaa0..28f37adfe55c7 100644 --- a/bazel/genrule_repository.bzl +++ b/bazel/genrule_repository.bzl @@ -68,7 +68,7 @@ def _genrule_cc_deps(ctx): genrule_cc_deps = rule( attrs = { "deps": attr.label_list( - providers = [], # CcSkylarkApiProvider + providers = [], # CcStarlarkApiProvider mandatory = True, allow_empty = False, ), diff --git a/generated_api_shadow/bazel/repository_locations.bzl b/generated_api_shadow/bazel/repository_locations.bzl index 503d6bc89078b..afe78af1e47b2 100644 --- a/generated_api_shadow/bazel/repository_locations.bzl +++ b/generated_api_shadow/bazel/repository_locations.bzl @@ -33,7 +33,7 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/envoyproxy/protoc-gen-validate/archive/" + PGV_GIT_SHA + ".tar.gz"], ), com_google_googleapis = dict( - # TODO(dio): Consider writing a Skylark macro for importing Google API proto. + # TODO(dio): Consider writing a Starlark macro for importing Google API proto. sha256 = GOOGLEAPIS_SHA, strip_prefix = "googleapis-" + GOOGLEAPIS_GIT_SHA, urls = ["https://github.com/googleapis/googleapis/archive/" + GOOGLEAPIS_GIT_SHA + ".tar.gz"], diff --git a/include/envoy/network/filter.h b/include/envoy/network/filter.h index f929f0472afda..a2603416e9df3 100644 --- a/include/envoy/network/filter.h +++ b/include/envoy/network/filter.h @@ -356,6 +356,8 @@ class DrainableFilterChain : public FilterChain { virtual void startDraining() PURE; }; +using DrainableFilterChainSharedPtr = std::shared_ptr; + /** * Interface for searching through configured filter chains. */ diff --git a/include/envoy/runtime/runtime.h b/include/envoy/runtime/runtime.h index f68b67a0ae563..89f904ffac084 100644 --- a/include/envoy/runtime/runtime.h +++ b/include/envoy/runtime/runtime.h @@ -257,6 +257,8 @@ class Snapshot { virtual const std::vector& getLayers() const PURE; }; +using SnapshotConstSharedPtr = std::shared_ptr; + /** * Loads runtime snapshots from storage (local disk, etc.). */ @@ -285,7 +287,7 @@ class Loader { * @return shared_ptr the current snapshot. This function may safely be called * from non-worker threads. */ - virtual std::shared_ptr threadsafeSnapshot() PURE; + virtual SnapshotConstSharedPtr threadsafeSnapshot() PURE; /** * Merge the given map of key-value pairs into the runtime's state. To remove a previous merge for diff --git a/include/envoy/server/factory_context.h b/include/envoy/server/factory_context.h index 245499464e1d2..56dac952be3e9 100644 --- a/include/envoy/server/factory_context.h +++ b/include/envoy/server/factory_context.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include "envoy/access_log/access_log.h" #include "envoy/config/core/v3/base.pb.h" diff --git a/include/envoy/stream_info/filter_state.h b/include/envoy/stream_info/filter_state.h index f68fca790ab2f..20377176b56f5 100644 --- a/include/envoy/stream_info/filter_state.h +++ b/include/envoy/stream_info/filter_state.h @@ -15,6 +15,10 @@ namespace Envoy { namespace StreamInfo { +class FilterState; + +using FilterStateSharedPtr = std::shared_ptr; + /** * FilterState represents dynamically generated information regarding a stream (TCP or HTTP level) * or a connection by various filters in Envoy. FilterState can be write-once or write-many. @@ -146,14 +150,12 @@ class FilterState { * @return the pointer of the parent FilterState that has longer life span. nullptr means this is * either the top LifeSpan or the parent is not yet created. */ - virtual std::shared_ptr parent() const PURE; + virtual FilterStateSharedPtr parent() const PURE; protected: virtual const Object* getDataReadOnlyGeneric(absl::string_view data_name) const PURE; virtual Object* getDataMutableGeneric(absl::string_view data_name) PURE; }; -using FilterStateSharedPtr = std::shared_ptr; - } // namespace StreamInfo } // namespace Envoy diff --git a/source/common/grpc/google_async_client_impl.h b/source/common/grpc/google_async_client_impl.h index a23a3791f6f23..f2dc3eded14dc 100644 --- a/source/common/grpc/google_async_client_impl.h +++ b/source/common/grpc/google_async_client_impl.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "envoy/api/api.h" @@ -128,6 +129,8 @@ class GoogleStub { grpc::CompletionQueue* cq) PURE; }; +using GoogleStubSharedPtr = std::shared_ptr; + class GoogleGenericStub : public GoogleStub { public: GoogleGenericStub(std::shared_ptr channel) : stub_(channel) {} @@ -148,12 +151,12 @@ class GoogleStubFactory { virtual ~GoogleStubFactory() = default; // Create a stub from a given channel. - virtual std::shared_ptr createStub(std::shared_ptr channel) PURE; + virtual GoogleStubSharedPtr createStub(std::shared_ptr channel) PURE; }; class GoogleGenericStubFactory : public GoogleStubFactory { public: - std::shared_ptr createStub(std::shared_ptr channel) override { + GoogleStubSharedPtr createStub(std::shared_ptr channel) override { return std::make_shared(channel); } }; @@ -185,7 +188,7 @@ class GoogleAsyncClientImpl final : public RawAsyncClient, Logger::Loggable stub_; + GoogleStubSharedPtr stub_; std::list> active_streams_; const std::string stat_prefix_; const Protobuf::RepeatedPtrField initial_metadata_; @@ -272,7 +275,7 @@ class GoogleAsyncStreamImpl : public RawAsyncStream, Event::Dispatcher& dispatcher_; // We hold a ref count on the stub_ to allow the stream to wait for its tags // to drain from the CQ on cleanup. - std::shared_ptr stub_; + GoogleStubSharedPtr stub_; std::string service_full_name_; std::string method_name_; RawAsyncStreamCallbacks& callbacks_; diff --git a/source/common/router/scoped_config_impl.cc b/source/common/router/scoped_config_impl.cc index 6a5d6ae2934cc..e5e51b763191f 100644 --- a/source/common/router/scoped_config_impl.cc +++ b/source/common/router/scoped_config_impl.cc @@ -103,8 +103,7 @@ ScopeKeyBuilderImpl::ScopeKeyBuilderImpl(ScopedRoutes::ScopeKeyBuilder&& config) } } -std::unique_ptr -ScopeKeyBuilderImpl::computeScopeKey(const Http::HeaderMap& headers) const { +ScopeKeyPtr ScopeKeyBuilderImpl::computeScopeKey(const Http::HeaderMap& headers) const { ScopeKey key; for (const auto& builder : fragment_builders_) { // returns nullopt if a null fragment is found. @@ -139,7 +138,7 @@ void ScopedConfigImpl::removeRoutingScope(const std::string& scope_name) { Router::ConfigConstSharedPtr ScopedConfigImpl::getRouteConfig(const Http::HeaderMap& headers) const { - std::unique_ptr scope_key = scope_key_builder_.computeScopeKey(headers); + ScopeKeyPtr scope_key = scope_key_builder_.computeScopeKey(headers); if (scope_key == nullptr) { return nullptr; } diff --git a/source/common/router/scoped_config_impl.h b/source/common/router/scoped_config_impl.h index 1879fb33a87de..575a097407d6a 100644 --- a/source/common/router/scoped_config_impl.h +++ b/source/common/router/scoped_config_impl.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include "envoy/config/route/v3/scoped_route.pb.h" @@ -77,6 +78,8 @@ class ScopeKey { std::vector> fragments_; }; +using ScopeKeyPtr = std::unique_ptr; + // String fragment. class StringKeyFragment : public ScopeKeyFragmentBase { public: @@ -130,7 +133,7 @@ class ScopeKeyBuilderBase { virtual ~ScopeKeyBuilderBase() = default; // Computes scope key for given headers, returns nullptr if a key can't be computed. - virtual std::unique_ptr computeScopeKey(const Http::HeaderMap& headers) const PURE; + virtual ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers) const PURE; protected: const ScopedRoutes::ScopeKeyBuilder config_; @@ -140,7 +143,7 @@ class ScopeKeyBuilderImpl : public ScopeKeyBuilderBase { public: explicit ScopeKeyBuilderImpl(ScopedRoutes::ScopeKeyBuilder&& config); - std::unique_ptr computeScopeKey(const Http::HeaderMap& headers) const override; + ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers) const override; private: std::vector> fragment_builders_; diff --git a/source/common/runtime/runtime_impl.cc b/source/common/runtime/runtime_impl.cc index a9f81c4f1a419..7d95b940344cc 100644 --- a/source/common/runtime/runtime_impl.cc +++ b/source/common/runtime/runtime_impl.cc @@ -604,7 +604,7 @@ const Snapshot& LoaderImpl::snapshot() { return tls_->getTyped(); } -std::shared_ptr LoaderImpl::threadsafeSnapshot() { +SnapshotConstSharedPtr LoaderImpl::threadsafeSnapshot() { if (tls_->currentThreadRegistered()) { return std::dynamic_pointer_cast(tls_->get()); } @@ -630,7 +630,7 @@ RuntimeStats LoaderImpl::generateStats(Stats::Store& store) { return stats; } -std::unique_ptr LoaderImpl::createNewSnapshot() { +SnapshotImplPtr LoaderImpl::createNewSnapshot() { std::vector layers; uint32_t disk_layers = 0; uint32_t error_layers = 0; diff --git a/source/common/runtime/runtime_impl.h b/source/common/runtime/runtime_impl.h index 480a345f3f72f..5bec747b93f7c 100644 --- a/source/common/runtime/runtime_impl.h +++ b/source/common/runtime/runtime_impl.h @@ -130,6 +130,8 @@ class SnapshotImpl : public Snapshot, RuntimeStats& stats_; }; +using SnapshotImplPtr = std::unique_ptr; + /** * Base implementation of OverrideLayer that by itself provides an empty values map. */ @@ -252,7 +254,7 @@ class LoaderImpl : public Loader, Logger::Loggable { // Runtime::Loader void initialize(Upstream::ClusterManager& cm) override; const Snapshot& snapshot() override; - std::shared_ptr threadsafeSnapshot() override; + SnapshotConstSharedPtr threadsafeSnapshot() override; void mergeValues(const std::unordered_map& values) override; void startRtdsSubscriptions(ReadyCallback on_done) override; @@ -260,7 +262,7 @@ class LoaderImpl : public Loader, Logger::Loggable { friend RtdsSubscription; // Create a new Snapshot - virtual std::unique_ptr createNewSnapshot(); + virtual SnapshotImplPtr createNewSnapshot(); // Load a new Snapshot into TLS void loadNewSnapshot(); RuntimeStats generateStats(Stats::Store& store); @@ -281,7 +283,7 @@ class LoaderImpl : public Loader, Logger::Loggable { Upstream::ClusterManager* cm_{}; absl::Mutex snapshot_mutex_; - std::shared_ptr thread_safe_snapshot_ ABSL_GUARDED_BY(snapshot_mutex_); + SnapshotConstSharedPtr thread_safe_snapshot_ ABSL_GUARDED_BY(snapshot_mutex_); }; } // namespace Runtime diff --git a/source/common/stream_info/filter_state_impl.cc b/source/common/stream_info/filter_state_impl.cc index 6097f02e04286..d873587abfcf8 100644 --- a/source/common/stream_info/filter_state_impl.cc +++ b/source/common/stream_info/filter_state_impl.cc @@ -97,8 +97,8 @@ void FilterStateImpl::maybeCreateParent(ParentAccessMode parent_access_mode) { if (life_span_ >= FilterState::LifeSpan::TopSpan) { return; } - if (absl::holds_alternative>(ancestor_)) { - std::shared_ptr ancestor = absl::get>(ancestor_); + if (absl::holds_alternative(ancestor_)) { + FilterStateSharedPtr ancestor = absl::get(ancestor_); if (ancestor == nullptr || ancestor->lifeSpan() != life_span_ + 1) { parent_ = std::make_shared(ancestor, FilterState::LifeSpan(life_span_ + 1)); } else { diff --git a/source/common/stream_info/filter_state_impl.h b/source/common/stream_info/filter_state_impl.h index 6bf8fb9ad517b..793938e29eadc 100644 --- a/source/common/stream_info/filter_state_impl.h +++ b/source/common/stream_info/filter_state_impl.h @@ -22,12 +22,12 @@ class FilterStateImpl : public FilterState { * @param ancestor a std::shared_ptr storing an already created ancestor. * @param life_span the life span this is handling. */ - FilterStateImpl(std::shared_ptr ancestor, FilterState::LifeSpan life_span) + FilterStateImpl(FilterStateSharedPtr ancestor, FilterState::LifeSpan life_span) : ancestor_(ancestor), life_span_(life_span) { maybeCreateParent(ParentAccessMode::ReadOnly); } - using LazyCreateAncestor = std::pair&, FilterState::LifeSpan>; + using LazyCreateAncestor = std::pair; /** * @param ancestor a std::pair storing an ancestor, that can be passed in as a way to lazy * initialize a FilterState that's owned by an object with bigger scope than this. This is to @@ -49,7 +49,7 @@ class FilterStateImpl : public FilterState { bool hasDataAtOrAboveLifeSpan(FilterState::LifeSpan life_span) const override; FilterState::LifeSpan lifeSpan() const override { return life_span_; } - std::shared_ptr parent() const override { return parent_; } + FilterStateSharedPtr parent() const override { return parent_; } private: // This only checks the local data_storage_ for data_name existence. @@ -62,8 +62,8 @@ class FilterStateImpl : public FilterState { FilterState::StateType state_type_; }; - absl::variant, LazyCreateAncestor> ancestor_; - std::shared_ptr parent_; + absl::variant ancestor_; + FilterStateSharedPtr parent_; const FilterState::LifeSpan life_span_; absl::flat_hash_map> data_storage_; }; diff --git a/source/common/stream_info/stream_info_impl.h b/source/common/stream_info/stream_info_impl.h index 3c440f91afa12..bf8af8d73b5b9 100644 --- a/source/common/stream_info/stream_info_impl.h +++ b/source/common/stream_info/stream_info_impl.h @@ -27,7 +27,7 @@ struct StreamInfoImpl : public StreamInfo { std::make_shared(FilterState::LifeSpan::FilterChain)) {} StreamInfoImpl(Http::Protocol protocol, TimeSource& time_source, - std::shared_ptr& parent_filter_state) + FilterStateSharedPtr& parent_filter_state) : StreamInfoImpl(protocol, time_source, std::make_shared( FilterStateImpl::LazyCreateAncestor(parent_filter_state, diff --git a/source/extensions/common/wasm/BUILD b/source/extensions/common/wasm/BUILD index c511d3806fe18..c31b2deb485be 100644 --- a/source/extensions/common/wasm/BUILD +++ b/source/extensions/common/wasm/BUILD @@ -21,6 +21,7 @@ envoy_cc_library( hdrs = ["wasm_vm.h"], deps = [ ":well_known_names", + "//include/envoy/stats:stats_interface", "//source/common/common:minimal_logger_lib", ], ) diff --git a/source/extensions/common/wasm/null/null_vm.h b/source/extensions/common/wasm/null/null_vm.h index e0cf345c51b6e..9bdaad668f8bd 100644 --- a/source/extensions/common/wasm/null/null_vm.h +++ b/source/extensions/common/wasm/null/null_vm.h @@ -55,7 +55,7 @@ struct NullVm : public WasmVmBase { #undef _REGISTER_CALLBACK std::string plugin_name_; - std::unique_ptr plugin_; + NullVmPluginPtr plugin_; }; } // namespace Null diff --git a/source/extensions/common/wasm/null/null_vm_plugin.h b/source/extensions/common/wasm/null/null_vm_plugin.h index bc89271452c6b..1176c98c07c9c 100644 --- a/source/extensions/common/wasm/null/null_vm_plugin.h +++ b/source/extensions/common/wasm/null/null_vm_plugin.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "envoy/config/typed_config.h" #include "extensions/common/wasm/wasm_vm.h" @@ -24,6 +26,8 @@ class NullVmPlugin { #undef _DEFIN_GET_FUNCTIONE }; +using NullVmPluginPtr = std::unique_ptr; + /** * Pseudo-WASM plugins using the NullVM should implement this factory and register via * Registry::registerFactory or the convenience class RegisterFactory. @@ -37,7 +41,7 @@ class NullVmPluginFactory : public Config::UntypedFactory { /** * Create an instance of the plugin. */ - virtual std::unique_ptr create() const PURE; + virtual NullVmPluginPtr create() const PURE; }; } // namespace Null diff --git a/source/server/filter_chain_factory_context_callback.h b/source/server/filter_chain_factory_context_callback.h index 1230bfe5c7e15..883f1477b48e8 100644 --- a/source/server/filter_chain_factory_context_callback.h +++ b/source/server/filter_chain_factory_context_callback.h @@ -21,7 +21,7 @@ class FilterChainFactoryContextCreator { * Generate the filter chain factory context from proto. Note the caller does not own the filter * chain context. */ - virtual std::unique_ptr createFilterChainFactoryContext( + virtual Configuration::FilterChainFactoryContextPtr createFilterChainFactoryContext( const ::envoy::config::listener::v3::FilterChain* const filter_chain) PURE; }; diff --git a/source/server/filter_chain_manager_impl.cc b/source/server/filter_chain_manager_impl.cc index f6bdf328e9207..7c544ca665219 100644 --- a/source/server/filter_chain_manager_impl.cc +++ b/source/server/filter_chain_manager_impl.cc @@ -593,7 +593,7 @@ void FilterChainManagerImpl::convertIPsToTries() { } } -std::shared_ptr FilterChainManagerImpl::findExistingFilterChain( +Network::DrainableFilterChainSharedPtr FilterChainManagerImpl::findExistingFilterChain( const envoy::config::listener::v3::FilterChain& filter_chain_message) { // Origin filter chain manager could be empty if the current is the ancestor. const auto* origin = getOriginFilterChainManager(); @@ -609,8 +609,7 @@ std::shared_ptr FilterChainManagerImpl::findExist return nullptr; } -std::unique_ptr -FilterChainManagerImpl::createFilterChainFactoryContext( +Configuration::FilterChainFactoryContextPtr FilterChainManagerImpl::createFilterChainFactoryContext( const ::envoy::config::listener::v3::FilterChain* const filter_chain) { // TODO(lambdai): add stats UNREFERENCED_PARAMETER(filter_chain); diff --git a/source/server/filter_chain_manager_impl.h b/source/server/filter_chain_manager_impl.h index 4acdc52470c02..6857bba4620bf 100644 --- a/source/server/filter_chain_manager_impl.h +++ b/source/server/filter_chain_manager_impl.h @@ -30,7 +30,7 @@ class FilterChainFactoryBuilder { * @return Shared filter chain where builder is allowed to determine and reuse duplicated filter * chain. Throw exception if failed. */ - virtual std::shared_ptr + virtual Network::DrainableFilterChainSharedPtr buildFilterChain(const envoy::config::listener::v3::FilterChain& filter_chain, FilterChainFactoryContextCreator& context_creator) const PURE; }; @@ -168,7 +168,7 @@ class FilterChainManagerImpl : public Network::FilterChainManager, public: using FcContextMap = absl::flat_hash_map, MessageUtil, MessageUtil>; + Network::DrainableFilterChainSharedPtr, MessageUtil, MessageUtil>; FilterChainManagerImpl(const Network::Address::InstanceConstSharedPtr& address, Configuration::FactoryContext& factory_context, Init::Manager& init_manager) @@ -179,7 +179,7 @@ class FilterChainManagerImpl : public Network::FilterChainManager, Init::Manager& init_manager, const FilterChainManagerImpl& parent_manager); // FilterChainFactoryContextCreator - std::unique_ptr createFilterChainFactoryContext( + Configuration::FilterChainFactoryContextPtr createFilterChainFactoryContext( const ::envoy::config::listener::v3::FilterChain* const filter_chain) override; // Network::FilterChainManager @@ -288,7 +288,7 @@ class FilterChainManagerImpl : public Network::FilterChainManager, const FilterChainManagerImpl* getOriginFilterChainManager() { return origin_.value(); } // Duplicate the inherent factory context if any. - std::shared_ptr + Network::DrainableFilterChainSharedPtr findExistingFilterChain(const envoy::config::listener::v3::FilterChain& filter_chain_message); // Mapping from filter chain message to filter chain. This is used by LDS response handler to diff --git a/source/server/listener_manager_impl.cc b/source/server/listener_manager_impl.cc index ca7bc7547148f..f4e6e87e9528a 100644 --- a/source/server/listener_manager_impl.cc +++ b/source/server/listener_manager_impl.cc @@ -936,18 +936,16 @@ ListenerFilterChainFactoryBuilder::ListenerFilterChainFactoryBuilder( : validator_(validator), listener_component_factory_(listener_component_factory), factory_context_(factory_context) {} -std::shared_ptr ListenerFilterChainFactoryBuilder::buildFilterChain( +Network::DrainableFilterChainSharedPtr ListenerFilterChainFactoryBuilder::buildFilterChain( const envoy::config::listener::v3::FilterChain& filter_chain, FilterChainFactoryContextCreator& context_creator) const { return buildFilterChainInternal(filter_chain, context_creator.createFilterChainFactoryContext(&filter_chain)); } -std::shared_ptr -ListenerFilterChainFactoryBuilder::buildFilterChainInternal( +Network::DrainableFilterChainSharedPtr ListenerFilterChainFactoryBuilder::buildFilterChainInternal( const envoy::config::listener::v3::FilterChain& filter_chain, - std::unique_ptr&& filter_chain_factory_context) - const { + Configuration::FilterChainFactoryContextPtr&& filter_chain_factory_context) const { // If the cluster doesn't have transport socket configured, then use the default "raw_buffer" // transport socket or BoringSSL-based "tls" transport socket if TLS settings are configured. // We copy by value first then override if necessary. diff --git a/source/server/listener_manager_impl.h b/source/server/listener_manager_impl.h index 8a734350103b7..b677792800e41 100644 --- a/source/server/listener_manager_impl.h +++ b/source/server/listener_manager_impl.h @@ -318,15 +318,14 @@ class ListenerFilterChainFactoryBuilder : public FilterChainFactoryBuilder { ListenerComponentFactory& listener_component_factory, Server::Configuration::TransportSocketFactoryContextImpl& factory_context); - std::shared_ptr + Network::DrainableFilterChainSharedPtr buildFilterChain(const envoy::config::listener::v3::FilterChain& filter_chain, FilterChainFactoryContextCreator& context_creator) const override; private: - std::shared_ptr - buildFilterChainInternal(const envoy::config::listener::v3::FilterChain& filter_chain, - std::unique_ptr&& - filter_chain_factory_context) const; + Network::DrainableFilterChainSharedPtr buildFilterChainInternal( + const envoy::config::listener::v3::FilterChain& filter_chain, + Configuration::FilterChainFactoryContextPtr&& filter_chain_factory_context) const; ProtobufMessage::ValidationVisitor& validator_; ListenerComponentFactory& listener_component_factory_; diff --git a/test/common/grpc/google_async_client_impl_test.cc b/test/common/grpc/google_async_client_impl_test.cc index 86066f8bc66ad..1fa083234e1dc 100644 --- a/test/common/grpc/google_async_client_impl_test.cc +++ b/test/common/grpc/google_async_client_impl_test.cc @@ -39,12 +39,12 @@ class MockGenericStub : public GoogleStub { class MockStubFactory : public GoogleStubFactory { public: - std::shared_ptr createStub(std::shared_ptr /*channel*/) override { + GoogleStubSharedPtr createStub(std::shared_ptr /*channel*/) override { return shared_stub_; } MockGenericStub* stub_ = new MockGenericStub(); - std::shared_ptr shared_stub_{stub_}; + GoogleStubSharedPtr shared_stub_{stub_}; }; class EnvoyGoogleAsyncClientImplTest : public testing::Test { diff --git a/test/common/router/scoped_config_impl_test.cc b/test/common/router/scoped_config_impl_test.cc index df842d51cf35d..e84540850b9b7 100644 --- a/test/common/router/scoped_config_impl_test.cc +++ b/test/common/router/scoped_config_impl_test.cc @@ -299,7 +299,7 @@ TEST(ScopeKeyBuilderImplTest, Parse) { TestUtility::loadFromYaml(yaml_plain, config); ScopeKeyBuilderImpl key_builder(std::move(config)); - std::unique_ptr key = key_builder.computeScopeKey(TestRequestHeaderMapImpl{ + ScopeKeyPtr key = key_builder.computeScopeKey(TestRequestHeaderMapImpl{ {"foo_header", "a=b,bar=bar_value,e=f"}, {"bar_header", "a=b;bar=bar_value;index2"}, }); diff --git a/test/mocks/runtime/mocks.h b/test/mocks/runtime/mocks.h index 1f4d5d0589faf..7e02d94f13971 100644 --- a/test/mocks/runtime/mocks.h +++ b/test/mocks/runtime/mocks.h @@ -73,7 +73,7 @@ class MockLoader : public Loader { MOCK_METHOD(void, initialize, (Upstream::ClusterManager & cm)); MOCK_METHOD(const Snapshot&, snapshot, ()); - MOCK_METHOD(std::shared_ptr, threadsafeSnapshot, ()); + MOCK_METHOD(SnapshotConstSharedPtr, threadsafeSnapshot, ()); MOCK_METHOD(void, mergeValues, ((const std::unordered_map&))); MOCK_METHOD(void, startRtdsSubscriptions, (ReadyCallback)); diff --git a/test/server/filter_chain_benchmark_test.cc b/test/server/filter_chain_benchmark_test.cc index 56a3ec4754df8..819932e968f97 100644 --- a/test/server/filter_chain_benchmark_test.cc +++ b/test/server/filter_chain_benchmark_test.cc @@ -28,7 +28,7 @@ namespace Server { namespace { class MockFilterChainFactoryBuilder : public FilterChainFactoryBuilder { - std::shared_ptr + Network::DrainableFilterChainSharedPtr buildFilterChain(const envoy::config::listener::v3::FilterChain&, FilterChainFactoryContextCreator&) const override { // A place holder to be found diff --git a/test/server/filter_chain_manager_impl_test.cc b/test/server/filter_chain_manager_impl_test.cc index 85a67482abfc5..4779dc32576ea 100644 --- a/test/server/filter_chain_manager_impl_test.cc +++ b/test/server/filter_chain_manager_impl_test.cc @@ -51,7 +51,7 @@ class MockFilterChainFactoryBuilder : public FilterChainFactoryBuilder { .WillByDefault(Return(std::make_shared())); } - MOCK_METHOD(std::shared_ptr, buildFilterChain, + MOCK_METHOD(Network::DrainableFilterChainSharedPtr, buildFilterChain, (const envoy::config::listener::v3::FilterChain&, FilterChainFactoryContextCreator&), (const)); }; diff --git a/tools/protodoc/protodoc.bzl b/tools/protodoc/protodoc.bzl index b25ae7a3577df..0ed26121fe6ab 100644 --- a/tools/protodoc/protodoc.bzl +++ b/tools/protodoc/protodoc.bzl @@ -3,7 +3,7 @@ load("//tools/api_proto_plugin:plugin.bzl", "api_proto_plugin_aspect", "api_prot 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) +# Bazel aspect (https://docs.bazel.build/versions/master/starlark/aspects.html) # that can be invoked from the CLI to produce docs via //tools/protodoc for # proto_library targets. Example use: # diff --git a/tools/protoxform/protoxform.bzl b/tools/protoxform/protoxform.bzl index d3ea805348963..abdbac95b3963 100644 --- a/tools/protoxform/protoxform.bzl +++ b/tools/protoxform/protoxform.bzl @@ -13,7 +13,7 @@ def _protoxform_impl(target, ctx): ], ) -# Bazel aspect (https://docs.bazel.build/versions/master/skylark/aspects.html) +# Bazel aspect (https://docs.bazel.build/versions/master/starlark/aspects.html) # that can be invoked from the CLI to perform API transforms via //tools/protoxform for # proto_library targets. Example use: # diff --git a/tools/type_whisperer/type_whisperer.bzl b/tools/type_whisperer/type_whisperer.bzl index 248b1752eeb6b..b9df280829ad2 100644 --- a/tools/type_whisperer/type_whisperer.bzl +++ b/tools/type_whisperer/type_whisperer.bzl @@ -3,7 +3,7 @@ load("//tools/api_proto_plugin:plugin.bzl", "api_proto_plugin_aspect", "api_prot def _type_whisperer_impl(target, ctx): return api_proto_plugin_impl(target, ctx, "types_pb_text", "TypeWhisperer", [".types.pb_text"]) -# Bazel aspect (https://docs.bazel.build/versions/master/skylark/aspects.html) +# Bazel aspect (https://docs.bazel.build/versions/master/starlark/aspects.html) # that can be invoked from the CLI to perform API type analysis via //tools/type_whisperer for # proto_library targets. Example use: #