Skip to content

Commit eeacbb6

Browse files
authored
Merge pull request #306 from jwendell/bump1324-2
Sync with upstream 1.32.4
2 parents 69a814b + 751b560 commit eeacbb6

File tree

17 files changed

+126
-24
lines changed

17 files changed

+126
-24
lines changed

Diff for: VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.32.4-dev
1+
1.32.4

Diff for: bazel/foreign_cc/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ envoy_cmake(
284284
cache_entries = {
285285
"BUILD_CURL_EXE": "off",
286286
"BUILD_TESTING": "off",
287+
"BUILD_LIBCURL_DOCS": "off",
287288
"BUILD_SHARED_LIBS": "off",
288289
"CURL_HIDDEN_SYMBOLS": "off",
289290
"CURL_USE_LIBSSH2": "off",

Diff for: changelogs/1.30.10.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
date: March 20, 2025
2+
3+
minor_behavior_changes:
4+
- area: rds
5+
change: |
6+
When a new RDS provider config is pushed via xDS and the only difference is change to
7+
:ref:`initial_fetch_timeout <envoy_v3_api_field_config.core.v3.ConfigSource.initial_fetch_timeout>`,
8+
the already existing provider will be reused. Envoy will not ask RDS server for routes
9+
config because existing provider already has up to date routes config.
10+
This behavioral change can be enabled by setting runtime guard
11+
``envoy.reloadable_features.normalize_rds_provider_config`` to true.
12+
13+
bug_fixes:
14+
- area: lrs
15+
change: |
16+
Fixes errors stat being incremented and warning log spamming for LoadStatsReporting graceful stream close.
17+
- area: ext_proc
18+
change: |
19+
Fixes a bug where local replies were incorrectly sent to the ext_proc server for external processing.
20+
This change can be temporarily reverted by setting runtime guard ``envoy_reloadable_features_skip_ext_proc_on_local_reply``
21+
to ``false``.
22+
- area: router
23+
change: |
24+
Fixes an Envoy crash issue when a local reply is sent.
25+
This change can be temporarily reverted by setting runtime guard
26+
``envoy_reloadable_features_router_filter_resetall_on_local_reply`` to ``false``.

Diff for: changelogs/1.31.6.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
date: March 20, 2025
2+
3+
minor_behavior_changes:
4+
- area: rds
5+
change: |
6+
When a new RDS provider config is pushed via xDS and the only difference is change to
7+
:ref:`initial_fetch_timeout <envoy_v3_api_field_config.core.v3.ConfigSource.initial_fetch_timeout>`,
8+
the already existing provider will be reused. Envoy will not ask RDS server for routes
9+
config because existing provider already has up to date routes config.
10+
This behavioral change can be enabled by setting runtime guard
11+
``envoy.reloadable_features.normalize_rds_provider_config`` to true.
12+
13+
bug_fixes:
14+
- area: lrs
15+
change: |
16+
Fixes errors stat being incremented and warning log spamming for LoadStatsReporting graceful stream close.
17+
- area: ext_proc
18+
change: |
19+
Fixes a bug where local replies were incorrectly sent to the ext_proc server for external processing.
20+
This change can be temporarily reverted by setting runtime guard ``envoy_reloadable_features_skip_ext_proc_on_local_reply``
21+
to ``false``.
22+
- area: router
23+
change: |
24+
Fixes an Envoy crash issue when a local reply is sent.
25+
This change can be temporarily reverted by setting runtime guard
26+
``envoy_reloadable_features_router_filter_resetall_on_local_reply`` to ``false``.

Diff for: changelogs/current.yaml

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
date: Pending
2-
3-
behavior_changes:
4-
# *Changes that are expected to cause an incompatibility if applicable; deployment changes are likely required*
1+
date: March 20, 2025
52

63
minor_behavior_changes:
7-
# *Changes that may cause incompatibilities for some users, but should not for most*
84
- area: rds
95
change: |
106
When a new RDS provider config is pushed via xDS and the only difference is change to
@@ -15,13 +11,16 @@ minor_behavior_changes:
1511
``envoy.reloadable_features.normalize_rds_provider_config`` to true.
1612
1713
bug_fixes:
18-
- area: http/1
14+
- area: lrs
1915
change: |
20-
Fixes sending overload crashes when HTTP/1 request is reset.
21-
- area: happy_eyeballs
16+
Fixes errors stat being incremented and warning log spamming for LoadStatsReporting graceful stream close.
17+
- area: ext_proc
2218
change: |
23-
Validate that ``additional_address`` are IP addresses instead of crashing when sorting.
24-
- area: balsa
19+
Fixes a bug where local replies were incorrectly sent to the ext_proc server for external processing.
20+
This change can be temporarily reverted by setting runtime guard ``envoy_reloadable_features_skip_ext_proc_on_local_reply``
21+
to ``false``.
22+
- area: router
2523
change: |
26-
Fix incorrect handling of non-101 1xx responses. This fix can be temporarily reverted by setting runtime guard
27-
``envoy.reloadable_features.wait_for_first_byte_before_balsa_msg_done`` to false.
24+
Fixes an Envoy crash issue when a local reply is sent.
25+
This change can be temporarily reverted by setting runtime guard
26+
``envoy_reloadable_features_router_filter_resetall_on_local_reply`` to ``false``.

Diff for: ci/Dockerfile-envoy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG BUILD_OS=ubuntu
22
ARG BUILD_TAG=22.04
3-
ARG BUILD_SHA=0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97
3+
ARG BUILD_SHA=ed1544e454989078f5dec1bfdabd8c5cc9c48e0705d07b678ab6ae3fb61952d2
44
ARG ENVOY_VRP_BASE_IMAGE=envoy-base
55

66

Diff for: ci/docker_ci.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ config_env() {
8484
fi
8585

8686
# Install QEMU emulators
87-
docker run --rm --privileged tonistiigi/binfmt --install all
87+
docker run --rm --privileged tonistiigi/binfmt:qemu-v7.0.0 --install all
8888

8989
# Remove older build instance
9090
docker buildx rm multi-builder 2> /dev/null || :

Diff for: docs/inventories/v1.30/objects.inv

23 Bytes
Binary file not shown.

Diff for: docs/inventories/v1.31/objects.inv

49 Bytes
Binary file not shown.

Diff for: docs/inventories/v1.32/objects.inv

79 Bytes
Binary file not shown.

Diff for: docs/versions.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"1.27": 1.27.7
2424
"1.28": 1.28.7
2525
"1.29": 1.29.12
26-
"1.30": 1.30.9
27-
"1.31": 1.31.5
28-
"1.32": 1.32.2
26+
"1.30": 1.30.10
27+
"1.31": 1.31.6
28+
"1.32": 1.32.3

Diff for: source/common/router/router.h

+9
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,15 @@ class Filter : Logger::Loggable<Logger::Id::router>,
320320
// Http::StreamFilterBase
321321
void onDestroy() override;
322322

323+
Http::LocalErrorStatus onLocalReply(const LocalReplyData&) override {
324+
// Clean up the upstream_requests_.
325+
if (Runtime::runtimeFeatureEnabled(
326+
"envoy.reloadable_features.router_filter_resetall_on_local_reply")) {
327+
resetAll();
328+
}
329+
return Http::LocalErrorStatus::Continue;
330+
}
331+
323332
// Http::StreamDecoderFilter
324333
Http::FilterHeadersStatus decodeHeaders(Http::RequestHeaderMap& headers,
325334
bool end_stream) override;

Diff for: source/common/runtime/runtime_features.cc

+2
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,13 @@ RUNTIME_GUARD(envoy_reloadable_features_quic_upstream_reads_fixed_number_packets
8787
RUNTIME_GUARD(envoy_reloadable_features_quic_upstream_socket_use_address_cache_for_read);
8888
RUNTIME_GUARD(envoy_reloadable_features_reject_invalid_yaml);
8989
RUNTIME_GUARD(envoy_reloadable_features_report_stream_reset_error_code);
90+
RUNTIME_GUARD(envoy_reloadable_features_router_filter_resetall_on_local_reply);
9091
RUNTIME_GUARD(envoy_reloadable_features_sanitize_http2_headers_without_nghttp2);
9192
RUNTIME_GUARD(envoy_reloadable_features_sanitize_sni_in_access_log);
9293
RUNTIME_GUARD(envoy_reloadable_features_sanitize_te);
9394
RUNTIME_GUARD(envoy_reloadable_features_send_local_reply_when_no_buffer_and_upstream_request);
9495
RUNTIME_GUARD(envoy_reloadable_features_skip_dns_lookup_for_proxied_requests);
96+
RUNTIME_GUARD(envoy_reloadable_features_skip_ext_proc_on_local_reply);
9597
RUNTIME_GUARD(envoy_reloadable_features_strict_duration_validation);
9698
RUNTIME_GUARD(envoy_reloadable_features_tcp_tunneling_send_downstream_fin_on_upstream_trailers);
9799
RUNTIME_GUARD(envoy_reloadable_features_test_feature_true);

Diff for: source/common/upstream/load_stats_reporter.cc

+14-5
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ LoadStatsReporter::LoadStatsReporter(const LocalInfo::LocalInfo& local_info,
2020
time_source_(dispatcher.timeSource()) {
2121
request_.mutable_node()->MergeFrom(local_info.node());
2222
request_.mutable_node()->add_client_features("envoy.lrs.supports_send_all_clusters");
23-
retry_timer_ = dispatcher.createTimer([this]() -> void { establishNewStream(); });
23+
retry_timer_ = dispatcher.createTimer([this]() -> void {
24+
stats_.retries_.inc();
25+
establishNewStream();
26+
});
2427
response_timer_ = dispatcher.createTimer([this]() -> void { sendLoadStatsRequest(); });
2528
establishNewStream();
2629
}
2730

2831
void LoadStatsReporter::setRetryTimer() {
32+
ENVOY_LOG(info, "Load reporter stats stream/connection will retry in {} ms.", RETRY_DELAY_MS);
2933
retry_timer_->enableTimer(std::chrono::milliseconds(RETRY_DELAY_MS));
3034
}
3135

@@ -150,8 +154,6 @@ void LoadStatsReporter::sendLoadStatsRequest() {
150154
}
151155

152156
void LoadStatsReporter::handleFailure() {
153-
ENVOY_LOG(warn, "Load reporter stats stream/connection failure, will retry in {} ms.",
154-
RETRY_DELAY_MS);
155157
stats_.errors_.inc();
156158
setRetryTimer();
157159
}
@@ -243,10 +245,17 @@ void LoadStatsReporter::onReceiveTrailingMetadata(Http::ResponseTrailerMapPtr&&
243245
}
244246

245247
void LoadStatsReporter::onRemoteClose(Grpc::Status::GrpcStatus status, const std::string& message) {
246-
ENVOY_LOG(warn, "{} gRPC config stream closed: {}, {}", service_method_.name(), status, message);
247248
response_timer_->disableTimer();
248249
stream_ = nullptr;
249-
handleFailure();
250+
if (status != Grpc::Status::WellKnownGrpcStatus::Ok) {
251+
ENVOY_LOG(warn, "{} gRPC config stream closed: {}, {}", service_method_.name(), status,
252+
message);
253+
handleFailure();
254+
} else {
255+
ENVOY_LOG(debug, "{} gRPC config stream closed gracefully, {}", service_method_.name(),
256+
message);
257+
setRetryTimer();
258+
}
250259
}
251260

252261
} // namespace Upstream

Diff for: source/common/upstream/load_stats_reporter.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ namespace Upstream {
1919
#define ALL_LOAD_REPORTER_STATS(COUNTER) \
2020
COUNTER(requests) \
2121
COUNTER(responses) \
22-
COUNTER(errors)
22+
COUNTER(errors) \
23+
COUNTER(retries)
2324

2425
/**
2526
* Struct definition for all load reporter stats. @see stats_macros.h
@@ -43,6 +44,7 @@ class LoadStatsReporter
4344
std::unique_ptr<envoy::service::load_stats::v3::LoadStatsResponse>&& message) override;
4445
void onReceiveTrailingMetadata(Http::ResponseTrailerMapPtr&& metadata) override;
4546
void onRemoteClose(Grpc::Status::GrpcStatus status, const std::string& message) override;
47+
const LoadReporterStats& getStats() { return stats_; };
4648

4749
// TODO(htuch): Make this configurable or some static.
4850
const uint32_t RETRY_DELAY_MS = 5000;

Diff for: source/extensions/filters/http/ext_proc/ext_proc.h

+12
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,18 @@ class Filter : public Logger::Loggable<Logger::Id::ext_proc>,
455455
void onComplete(envoy::service::ext_proc::v3::ProcessingResponse& response) override;
456456
void onError() override;
457457

458+
Envoy::Http::LocalErrorStatus
459+
onLocalReply(const Envoy::Http::StreamFilterBase::LocalReplyData&) override {
460+
if (Runtime::runtimeFeatureEnabled("envoy.reloadable_features.skip_ext_proc_on_local_reply")) {
461+
ENVOY_STREAM_LOG(debug,
462+
"When onLocalReply() is called, set processing_complete_ to true to skip "
463+
"external processing",
464+
*decoder_callbacks_);
465+
processing_complete_ = true;
466+
}
467+
return ::Envoy::Http::LocalErrorStatus::Continue;
468+
}
469+
458470
private:
459471
void mergePerRouteConfig();
460472
StreamOpenState openStream();

Diff for: test/common/upstream/load_stats_reporter_test.cc

+16
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,24 @@ TEST_F(LoadStatsReporterTest, RemoteStreamClose) {
369369
EXPECT_CALL(*async_client_, startRaw(_, _, _, _)).WillOnce(Return(&async_stream_));
370370
expectSendMessage({});
371371
retry_timer_cb_();
372+
EXPECT_EQ(load_stats_reporter_->getStats().errors_.value(), 1);
373+
EXPECT_EQ(load_stats_reporter_->getStats().retries_.value(), 1);
372374
}
373375

376+
// Validate that errors stat is not incremented for a graceful stream termination.
377+
TEST_F(LoadStatsReporterTest, RemoteStreamGracefulClose) {
378+
EXPECT_CALL(*async_client_, startRaw(_, _, _, _)).WillOnce(Return(&async_stream_));
379+
expectSendMessage({});
380+
createLoadStatsReporter();
381+
EXPECT_CALL(*response_timer_, disableTimer());
382+
EXPECT_CALL(*retry_timer_, enableTimer(_, _));
383+
load_stats_reporter_->onRemoteClose(Grpc::Status::WellKnownGrpcStatus::Ok, "");
384+
EXPECT_CALL(*async_client_, startRaw(_, _, _, _)).WillOnce(Return(&async_stream_));
385+
expectSendMessage({});
386+
retry_timer_cb_();
387+
EXPECT_EQ(load_stats_reporter_->getStats().errors_.value(), 0);
388+
EXPECT_EQ(load_stats_reporter_->getStats().retries_.value(), 1);
389+
}
374390
} // namespace
375391
} // namespace Upstream
376392
} // namespace Envoy

0 commit comments

Comments
 (0)