diff --git a/.bazelrc b/.bazelrc index ffdeb2d0d..ebe80e94c 100644 --- a/.bazelrc +++ b/.bazelrc @@ -74,6 +74,7 @@ build:linux --copt=-fdebug-types-section build:linux --copt=-fPIC build:linux --copt=-Wno-deprecated-declarations build:linux --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 +build:linux --cxxopt=-fsized-deallocation --host_cxxopt=-fsized-deallocation build:linux --conlyopt=-fexceptions build:linux --fission=dbg,opt build:linux --features=per_object_debug_info diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 87950aa87..aef5a37ef 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -1,7 +1,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -ENVOY_COMMIT = "14faf9d16c1082a2d8f2f65e4eb69a23db49e5e1" -ENVOY_SHA = "ca582f3ac947a260acefebb125df88a3c8e46a35e4258320fc43264d455ab259" +ENVOY_COMMIT = "f84c5d119eedf80d726ddc6e3fb164df3dfb9e46" +ENVOY_SHA = "4393db0613875c26938f14527dc3f9f13a68807bba7be8b85b52c46f06c90ddf" HDR_HISTOGRAM_C_VERSION = "0.11.2" # October 12th, 2020 HDR_HISTOGRAM_C_SHA = "637f28b5f64de2e268131e4e34e6eef0b91cf5ff99167db447d9b2825eae6bad" diff --git a/source/client/stream_decoder.cc b/source/client/stream_decoder.cc index f1c54448b..23daab898 100644 --- a/source/client/stream_decoder.cc +++ b/source/client/stream_decoder.cc @@ -97,7 +97,7 @@ void StreamDecoder::onPoolFailure(Envoy::Http::ConnectionPool::PoolFailureReason absl::string_view /* transport_failure_reason */, Envoy::Upstream::HostDescriptionConstSharedPtr) { decoder_completion_callback_.onPoolFailure(reason); - stream_info_.setResponseFlag(Envoy::StreamInfo::ResponseFlag::UpstreamConnectionFailure); + stream_info_.setResponseFlag(Envoy::StreamInfo::CoreResponseFlag::UpstreamConnectionFailure); finalizeActiveSpan(); caller_completion_callback_(false, false); dispatcher_.deferredDelete(std::unique_ptr(this)); @@ -144,28 +144,28 @@ void StreamDecoder::onPoolReady(Envoy::Http::RequestEncoder& encoder, // TODO(https://github.com/envoyproxy/nighthawk/issues/139): duplicated from // envoy/source/common/router/router.cc -Envoy::StreamInfo::ResponseFlag +Envoy::StreamInfo::CoreResponseFlag StreamDecoder::streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason reset_reason) { switch (reset_reason) { case Envoy::Http::StreamResetReason::LocalConnectionFailure: case Envoy::Http::StreamResetReason::RemoteConnectionFailure: case Envoy::Http::StreamResetReason::ConnectionTimeout: - return Envoy::StreamInfo::ResponseFlag::UpstreamConnectionFailure; + return Envoy::StreamInfo::CoreResponseFlag::UpstreamConnectionFailure; case Envoy::Http::StreamResetReason::ConnectionTermination: - return Envoy::StreamInfo::ResponseFlag::UpstreamConnectionTermination; + return Envoy::StreamInfo::CoreResponseFlag::UpstreamConnectionTermination; case Envoy::Http::StreamResetReason::LocalReset: case Envoy::Http::StreamResetReason::LocalRefusedStreamReset: - return Envoy::StreamInfo::ResponseFlag::LocalReset; + return Envoy::StreamInfo::CoreResponseFlag::LocalReset; case Envoy::Http::StreamResetReason::Overflow: - return Envoy::StreamInfo::ResponseFlag::UpstreamOverflow; + return Envoy::StreamInfo::CoreResponseFlag::UpstreamOverflow; case Envoy::Http::StreamResetReason::ConnectError: case Envoy::Http::StreamResetReason::RemoteReset: case Envoy::Http::StreamResetReason::RemoteRefusedStreamReset: - return Envoy::StreamInfo::ResponseFlag::UpstreamRemoteReset; + return Envoy::StreamInfo::CoreResponseFlag::UpstreamRemoteReset; case Envoy::Http::StreamResetReason::ProtocolError: - return Envoy::StreamInfo::ResponseFlag::UpstreamProtocolError; + return Envoy::StreamInfo::CoreResponseFlag::UpstreamProtocolError; case Envoy::Http::StreamResetReason::OverloadManager: - return Envoy::StreamInfo::ResponseFlag::OverloadManager; + return Envoy::StreamInfo::CoreResponseFlag::OverloadManager; } PANIC("not reached"); } diff --git a/source/client/stream_decoder.h b/source/client/stream_decoder.h index 5c1251757..c440cae5b 100644 --- a/source/client/stream_decoder.h +++ b/source/client/stream_decoder.h @@ -92,7 +92,7 @@ class StreamDecoder : public Envoy::Http::ResponseDecoder, Envoy::StreamInfo::StreamInfo& stream_info, absl::optional protocol) override; - static Envoy::StreamInfo::ResponseFlag + static Envoy::StreamInfo::CoreResponseFlag streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason reset_reason); void finalizeActiveSpan(); void setupForTracing(); diff --git a/test/stream_decoder_test.cc b/test/stream_decoder_test.cc index 4b2b1fedd..4d6455105 100644 --- a/test/stream_decoder_test.cc +++ b/test/stream_decoder_test.cc @@ -197,34 +197,34 @@ TEST_F(StreamDecoderTest, PoolFailureTest) { TEST_F(StreamDecoderTest, StreamResetReasonToResponseFlag) { ASSERT_EQ(StreamDecoder::streamResetReasonToResponseFlag( Envoy::Http::StreamResetReason::LocalConnectionFailure), - Envoy::StreamInfo::ResponseFlag::UpstreamConnectionFailure); + Envoy::StreamInfo::CoreResponseFlag::UpstreamConnectionFailure); ASSERT_EQ(StreamDecoder::streamResetReasonToResponseFlag( Envoy::Http::StreamResetReason::RemoteConnectionFailure), - Envoy::StreamInfo::ResponseFlag::UpstreamConnectionFailure); + Envoy::StreamInfo::CoreResponseFlag::UpstreamConnectionFailure); ASSERT_EQ(StreamDecoder::streamResetReasonToResponseFlag( Envoy::Http::StreamResetReason::ConnectionTimeout), - Envoy::StreamInfo::ResponseFlag::UpstreamConnectionFailure); + Envoy::StreamInfo::CoreResponseFlag::UpstreamConnectionFailure); ASSERT_EQ(StreamDecoder::streamResetReasonToResponseFlag( Envoy::Http::StreamResetReason::ConnectionTermination), - Envoy::StreamInfo::ResponseFlag::UpstreamConnectionTermination); + Envoy::StreamInfo::CoreResponseFlag::UpstreamConnectionTermination); ASSERT_EQ( StreamDecoder::streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason::LocalReset), - Envoy::StreamInfo::ResponseFlag::LocalReset); + Envoy::StreamInfo::CoreResponseFlag::LocalReset); ASSERT_EQ(StreamDecoder::streamResetReasonToResponseFlag( Envoy::Http::StreamResetReason::LocalRefusedStreamReset), - Envoy::StreamInfo::ResponseFlag::LocalReset); + Envoy::StreamInfo::CoreResponseFlag::LocalReset); ASSERT_EQ( StreamDecoder::streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason::Overflow), - Envoy::StreamInfo::ResponseFlag::UpstreamOverflow); + Envoy::StreamInfo::CoreResponseFlag::UpstreamOverflow); ASSERT_EQ( StreamDecoder::streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason::RemoteReset), - Envoy::StreamInfo::ResponseFlag::UpstreamRemoteReset); + Envoy::StreamInfo::CoreResponseFlag::UpstreamRemoteReset); ASSERT_EQ(StreamDecoder::streamResetReasonToResponseFlag( Envoy::Http::StreamResetReason::RemoteRefusedStreamReset), - Envoy::StreamInfo::ResponseFlag::UpstreamRemoteReset); + Envoy::StreamInfo::CoreResponseFlag::UpstreamRemoteReset); ASSERT_EQ( StreamDecoder::streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason::ConnectError), - Envoy::StreamInfo::ResponseFlag::UpstreamRemoteReset); + Envoy::StreamInfo::CoreResponseFlag::UpstreamRemoteReset); } // This test parameterization structure carries the response header name that ought to be treated diff --git a/tools/code_format/config.yaml b/tools/code_format/config.yaml index 9fa40d194..6812cb388 100644 --- a/tools/code_format/config.yaml +++ b/tools/code_format/config.yaml @@ -129,7 +129,6 @@ paths: - source/common/protobuf/utility.cc - source/common/protobuf/message_validator_impl.cc - source/common/quic/quic_server_transport_socket_factory.cc - - source/common/access_log/access_log_manager_impl.cc - source/common/secret/secret_manager_impl.cc - source/common/grpc/async_client_manager_impl.cc - source/common/grpc/google_grpc_utils.cc @@ -168,6 +167,9 @@ paths: - source/common/secret/sds_api.cc - source/common/router/router.cc - source/common/config/config_provider_impl.h + - source/common/common/logger_delegates.cc + - source/common/upstream/health_checker_event_logger.h + - source/common/upstream/outlier_detection_impl.h # Only one C++ file should instantiate grpc_init grpc_init: