Skip to content

Commit

Permalink
Update Envoy to f84c5d1 2024/02/12 (#1080)
Browse files Browse the repository at this point in the history
- sync files
- change `Envoy::StreamInfo::ResponseFlag` to `Envoy::StreamInfo::CoreResponseFlag` due to envoyproxy/envoy#32105

Signed-off-by: Qin Qin <[email protected]>
  • Loading branch information
qqustc authored Feb 12, 2024
1 parent a4818e9 commit b9ce298
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 23 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
18 changes: 9 additions & 9 deletions source/client/stream_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<StreamDecoder>(this));
Expand Down Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion source/client/stream_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class StreamDecoder : public Envoy::Http::ResponseDecoder,
Envoy::StreamInfo::StreamInfo& stream_info,
absl::optional<Envoy::Http::Protocol> protocol) override;

static Envoy::StreamInfo::ResponseFlag
static Envoy::StreamInfo::CoreResponseFlag
streamResetReasonToResponseFlag(Envoy::Http::StreamResetReason reset_reason);
void finalizeActiveSpan();
void setupForTracing();
Expand Down
20 changes: 10 additions & 10 deletions test/stream_decoder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tools/code_format/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b9ce298

Please sign in to comment.