From 210bd8df0f7bd893cfc33e774c0fa2761413740e Mon Sep 17 00:00:00 2001 From: jpsim Date: Mon, 31 Oct 2022 14:10:37 +0000 Subject: [PATCH 1/3] Update Envoy Signed-off-by: GitHub Action --- envoy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envoy b/envoy index d57e496f61..f9daa53c35 160000 --- a/envoy +++ b/envoy @@ -1 +1 @@ -Subproject commit d57e496f617b20327eaabb6fe002f3935ecf5ea8 +Subproject commit f9daa53c352784043fbddc2f2d890c6419e5a361 From b54adf9717759b92e4e734118d2fed3102e3a36b Mon Sep 17 00:00:00 2001 From: Rafal Augustyniak Date: Wed, 2 Nov 2022 13:08:21 -0400 Subject: [PATCH 2/3] remove the usage of override_request_timeout_by_gateway_timeout Signed-off-by: Rafal Augustyniak --- test/swift/integration/IdleTimeoutTest.swift | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/swift/integration/IdleTimeoutTest.swift b/test/swift/integration/IdleTimeoutTest.swift index fd31bde902..cff72888e7 100644 --- a/test/swift/integration/IdleTimeoutTest.swift +++ b/test/swift/integration/IdleTimeoutTest.swift @@ -81,13 +81,6 @@ static_resources: - endpoint: address: socket_address: { address: 127.0.0.1, port_value: \(remotePort) } -layered_runtime: - layers: - - name: static_layer_0 - static_layer: - envoy: - reloadable_features: - override_request_timeout_by_gateway_timeout: false """ class IdleTimeoutValidationFilter: AsyncResponseFilter, ResponseFilter { From 4fc0f22df22365a1e17d54852a806de53ff4d93e Mon Sep 17 00:00:00 2001 From: Rafal Augustyniak Date: Wed, 2 Nov 2022 16:53:09 -0400 Subject: [PATCH 3/3] Copy-paste Alyssa's fix Signed-off-by: Rafal Augustyniak --- .../filters/http/platform_bridge/filter.cc | 23 +------------------ test/swift/integration/IdleTimeoutTest.swift | 4 ++-- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/library/common/extensions/filters/http/platform_bridge/filter.cc b/library/common/extensions/filters/http/platform_bridge/filter.cc index 4aafebcb78..baea5572ad 100644 --- a/library/common/extensions/filters/http/platform_bridge/filter.cc +++ b/library/common/extensions/filters/http/platform_bridge/filter.cc @@ -167,28 +167,7 @@ void PlatformBridgeFilter::onDestroy() { ENVOY_LOG(trace, "PlatformBridgeFilter({})::onDestroy", filter_name_); alive_ = false; - auto& info = decoder_callbacks_->streamInfo(); - if (response_filter_base_->state_.stream_complete_ && platform_filter_.on_error && - StreamInfo::isStreamIdleTimeout(info)) { - // If the stream info has a response code details with a stream idle timeout, treat as error. - ENVOY_LOG(trace, "PlatformBridgeFilter({})->on_error", filter_name_); - envoy_data error_message = Data::Utility::copyToBridgeData("Stream idle timeout"); - auto& info = decoder_callbacks_->streamInfo(); - int32_t attempts = static_cast(info.attemptCount().value_or(0)); - - auto callback_time_ms = std::make_unique( - config_->stats().on_error_callback_latency_, timeSource()); - - platform_filter_.on_error({ENVOY_REQUEST_TIMEOUT, error_message, attempts}, streamIntel(), - finalStreamIntel(), platform_filter_.instance_context); - - callback_time_ms->complete(); - auto elapsed = callback_time_ms->elapsed(); - if (elapsed > SlowCallbackWarningThreshold) { - ENVOY_LOG_EVENT(warn, "slow_on_error_cb", - filter_name_ + "|" + std::to_string(elapsed.count()) + "ms"); - } - } else if (!response_filter_base_->state_.stream_complete_ && platform_filter_.on_cancel) { + if (!response_filter_base_->state_.stream_complete_ && platform_filter_.on_cancel) { // If the filter chain is destroyed before a response is received, treat as cancellation. ENVOY_LOG(trace, "PlatformBridgeFilter({})->on_cancel", filter_name_); diff --git a/test/swift/integration/IdleTimeoutTest.swift b/test/swift/integration/IdleTimeoutTest.swift index cff72888e7..d7d1d63841 100644 --- a/test/swift/integration/IdleTimeoutTest.swift +++ b/test/swift/integration/IdleTimeoutTest.swift @@ -126,7 +126,7 @@ static_resources: } func onError(_ error: EnvoyError, streamIntel: FinalStreamIntel) { - XCTAssertEqual(error.errorCode, 4) + XCTAssertEqual(error.errorCode, 0) timeoutExpectation.fulfill() } @@ -159,7 +159,7 @@ static_resources: client .newStreamPrototype() .setOnError { error, _ in - XCTAssertEqual(error.errorCode, 4) + XCTAssertEqual(error.errorCode, 0) callbackExpectation.fulfill() } .setOnCancel { _ in