Skip to content

Commit

Permalink
auto-merge envoyproxy/envoy[main] into envoyproxy/envoy-openssl[main]
Browse files Browse the repository at this point in the history
* upstream/main:
  Quiche roll 20240930141637 (#36385)
  Ext proc http functionality support (#35740)
  mobile: Mark the BidirectionalStreamTest as flaky (#36391)
  mobile: Fix the thread priority expectation in InternalEngineTest (#36390)
  srds: minor perf: move scoped_route_config to ScopedRouteInfo (#36270)
  • Loading branch information
sync-envoy[bot] committed Oct 1, 2024
2 parents cd50f2d + b67e3b4 commit 48ce0a8
Show file tree
Hide file tree
Showing 38 changed files with 1,130 additions and 190 deletions.
1 change: 1 addition & 0 deletions api/envoy/extensions/filters/http/ext_proc/v3/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ api_proto_package(
"//envoy/config/core/v3:pkg",
"//envoy/type/matcher/v3:pkg",
"@com_github_cncf_xds//udpa/annotations:pkg",
"@com_github_cncf_xds//xds/annotations/v3:pkg",
],
)
37 changes: 35 additions & 2 deletions api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import "envoy/type/matcher/v3/string.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";

import "xds/annotations/v3/status.proto";

import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
Expand Down Expand Up @@ -131,8 +133,39 @@ message ExternalProcessor {
// Only one of ``http_service`` or
// :ref:`grpc_service <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.grpc_service>`.
// can be set. It is required that one of them must be set.
ExtProcHttpService http_service = 20
[(udpa.annotations.field_migrate).oneof_promotion = "ext_proc_service_type"];
//
// If ``http_service`` is set, the
// :ref:`processing_mode <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.processing_mode>`
// can not be configured to send any body or trailers. i.e, http_service only supports
// sending request or response headers to the side stream server.
//
// With this configuration, Envoy behavior:
//
// 1. The headers are first put in a proto message
// :ref:`ProcessingRequest <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>`.
//
// 2. This proto message is then transcoded into a JSON text.
//
// 3. Envoy then sends a HTTP POST message with content-type as "application/json",
// and this JSON text as body to the side stream server.
//
// After the side-stream receives this HTTP request message, it is expected to do as follows:
//
// 1. It converts the body, which is a JSON string, into a ``ProcessingRequest``
// proto message to examine and mutate the headers.
//
// 2. It then sets the mutated headers into a new proto message
// :ref:`ProcessingResponse <envoy_v3_api_msg_service.ext_proc.v3.ProcessingResponse>`.
//
// 3. It converts ``ProcessingResponse`` proto message into a JSON text.
//
// 4. It then sends a HTTP response back to Envoy with status code as "200",
// content-type as "application/json" and sets the JSON text as the body.
//
ExtProcHttpService http_service = 20 [
(udpa.annotations.field_migrate).oneof_promotion = "ext_proc_service_type",
(xds.annotations.v3.field_status).work_in_progress = true
];

// By default, if the gRPC stream cannot be established, or if it is closed
// prematurely with an error, the filter will fail. Specifically, if the
Expand Down
49 changes: 20 additions & 29 deletions bazel/external/quiche.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ envoy_cc_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_data_source",
":http2_adapter_http2_protocol",
":http2_adapter_http2_visitor_interface",
":http2_adapter_nghttp2_include",
":quiche_common_platform_export",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -435,6 +435,7 @@ envoy_cc_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_chunked_buffer",
":http2_adapter_data_source",
":http2_adapter_event_forwarder",
Expand All @@ -453,7 +454,6 @@ envoy_cc_library(
":http2_header_byte_listener_interface_lib",
":http2_no_op_headers_handler_lib",
":quiche_common_callbacks",
":spdy_core_http2_header_block_lib",
"@com_google_absl//absl/algorithm",
"@com_google_absl//absl/cleanup",
],
Expand Down Expand Up @@ -498,9 +498,9 @@ envoy_cc_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_http2_protocol",
":quiche_common_platform_export",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -570,6 +570,7 @@ envoy_cc_test_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_adapter_chunked_buffer",
":http2_adapter_data_source",
":http2_adapter_http2_protocol",
Expand All @@ -578,7 +579,6 @@ envoy_cc_test_library(
":http2_core_protocol_lib",
":http2_hpack_hpack_lib",
":quiche_common_platform_test",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -1320,7 +1320,6 @@ envoy_cc_library(
srcs = ["quiche/http2/core/spdy_alt_svc_wire_format.cc"],
hdrs = [
"quiche/http2/core/spdy_alt_svc_wire_format.h",
"quiche/spdy/core/spdy_alt_svc_wire_format.h",
],
copts = quiche_copts,
repository = "@envoy",
Expand All @@ -1337,25 +1336,23 @@ envoy_cc_library(
hdrs = [
"quiche/http2/core/spdy_frame_builder.h",
"quiche/http2/core/spdy_framer.h",
"quiche/spdy/core/spdy_frame_builder.h",
"quiche/spdy/core/spdy_framer.h",
],
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_alt_svc_wire_format_lib",
":http2_core_headers_handler_interface_lib",
":http2_core_protocol_lib",
":http2_core_zero_copy_output_buffer_lib",
":http2_hpack_hpack_lib",
":quiche_common_platform",
":spdy_core_http2_header_block_lib",
],
)

envoy_cc_library(
name = "spdy_core_http2_header_block_lib",
hdrs = ["quiche/spdy/core/http2_header_block.h"],
name = "common_http_http_header_block_lib",
hdrs = ["quiche/common/http/http_header_block.h"],
copts = quiche_copts,
repository = "@envoy",
visibility = ["//visibility:public"],
Expand All @@ -1381,13 +1378,11 @@ envoy_cc_library(
envoy_cc_library(
name = "http2_core_http2_deframer_lib",
srcs = ["quiche/http2/core/http2_frame_decoder_adapter.cc"],
hdrs = [
"quiche/http2/core/http2_frame_decoder_adapter.h",
"quiche/spdy/core/http2_frame_decoder_adapter.h",
],
hdrs = ["quiche/http2/core/http2_frame_decoder_adapter.h"],
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_constants_lib",
":http2_core_alt_svc_wire_format_lib",
":http2_core_headers_handler_interface_lib",
Expand All @@ -1396,11 +1391,10 @@ envoy_cc_library(
":http2_decoder_decode_status_lib",
":http2_decoder_frame_decoder_lib",
":http2_decoder_frame_decoder_listener_lib",
":http2_hpack_hpack_decoder_adapter_lib",
":http2_hpack_hpack_lib",
":http2_structures_lib",
":quiche_common_platform",
":spdy_core_hpack_hpack_decoder_adapter_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1427,7 +1421,6 @@ envoy_cc_library(
"quiche/http2/hpack/hpack_header_table.h",
"quiche/http2/hpack/hpack_output_stream.h",
"quiche/http2/hpack/hpack_static_table.h",
"quiche/spdy/core/hpack/hpack_encoder.h",
],
copts = quiche_copts,
repository = "@envoy",
Expand All @@ -1442,12 +1435,13 @@ envoy_cc_library(
)

envoy_cc_library(
name = "spdy_core_hpack_hpack_decoder_adapter_lib",
srcs = ["quiche/spdy/core/hpack/hpack_decoder_adapter.cc"],
hdrs = ["quiche/spdy/core/hpack/hpack_decoder_adapter.h"],
name = "http2_hpack_hpack_decoder_adapter_lib",
srcs = ["quiche/http2/hpack/hpack_decoder_adapter.cc"],
hdrs = ["quiche/http2/hpack/hpack_decoder_adapter.h"],
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":http2_decoder_decode_buffer_lib",
":http2_decoder_decode_status_lib",
Expand All @@ -1458,7 +1452,6 @@ envoy_cc_library(
":http2_hpack_hpack_lib",
":http2_no_op_headers_handler_lib",
":quiche_common_platform",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1482,16 +1475,14 @@ envoy_cc_library(
hdrs = [
"quiche/http2/core/spdy_bitmasks.h",
"quiche/http2/core/spdy_protocol.h",
"quiche/spdy/core/spdy_bitmasks.h",
"quiche/spdy/core/spdy_protocol.h",
],
copts = quiche_copts,
repository = "@envoy",
visibility = ["//visibility:public"],
deps = [
":common_http_http_header_block_lib",
":http2_core_alt_svc_wire_format_lib",
":quiche_common_platform",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1501,8 +1492,8 @@ envoy_cc_library(
hdrs = ["quiche/http2/core/recording_headers_handler.h"],
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand All @@ -1513,11 +1504,11 @@ envoy_cc_test_library(
copts = quiche_copts,
repository = "@envoy",
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":http2_core_protocol_lib",
":quiche_common_platform",
":quiche_common_test_tools_test_utils_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -3088,13 +3079,13 @@ envoy_quic_cc_library(
srcs = ["quiche/quic/core/http/quic_header_list.cc"],
hdrs = ["quiche/quic/core/http/quic_header_list.h"],
deps = [
":common_http_http_header_block_lib",
":http2_core_headers_handler_interface_lib",
":http2_core_protocol_lib",
":quic_core_packets_lib",
":quic_core_qpack_qpack_header_table_lib",
":quic_platform_base",
":quiche_common_circular_deque_lib",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -3830,8 +3821,8 @@ envoy_quic_cc_library(
srcs = ["quiche/quic/core/qpack/value_splitting_header_list.cc"],
hdrs = ["quiche/quic/core/qpack/value_splitting_header_list.h"],
deps = [
":common_http_http_header_block_lib",
":quic_platform_base",
":spdy_core_http2_header_block_lib",
],
)

Expand Down Expand Up @@ -5600,10 +5591,10 @@ envoy_cc_library(
repository = "@envoy",
tags = ["nofips"],
deps = [
":common_http_http_header_block_lib",
":quiche_common_callbacks",
":quiche_common_platform_export",
":quiche_common_quiche_stream_lib",
":spdy_core_http2_header_block_lib",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
Expand Down
6 changes: 3 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1208,12 +1208,12 @@ REPOSITORY_LOCATIONS_SPEC = dict(
project_name = "QUICHE",
project_desc = "QUICHE (QUIC, HTTP/2, Etc) is Google‘s implementation of QUIC and related protocols",
project_url = "https://github.com/google/quiche",
version = "42b2e66c721f442bb439b40a1e037897360cf1b2",
sha256 = "f72f78d7fa57154ad302d559fee6b72e0695d51391684891ec991b2b5d90491f",
version = "171f6f89a6a119e8763f1216f8d85347f997cd3b",
sha256 = "3e0fec32dfa9c7568d4703516ee14c9e2316379e0a35f723d17a988be178e532",
urls = ["https://github.com/google/quiche/archive/{version}.tar.gz"],
strip_prefix = "quiche-{version}",
use_category = ["controlplane", "dataplane_core"],
release_date = "2024-09-17",
release_date = "2024-09-26",
cpe = "N/A",
license = "BSD-3-Clause",
license_url = "https://github.com/google/quiche/blob/{version}/LICENSE",
Expand Down
4 changes: 2 additions & 2 deletions mobile/test/common/internal_engine_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ TEST_F(ThreadPriorityInternalEngineTest, SetThreadPriority) {
}

TEST_F(ThreadPriorityInternalEngineTest, SetOutOfRangeThreadPriority) {
// 42 is outside the range of acceptable thread priorities.
const int expected_thread_priority = 42;
// 102 is outside the range of acceptable thread priorities on all platforms.
const int expected_thread_priority = 102;
const int actual_thread_priority = startEngineWithPriority(expected_thread_priority);
// The `setpriority` system call doesn't define what happens when the thread priority is out of
// range, and the behavior could be system dependent. On Linux, if the supplied priority value
Expand Down
1 change: 1 addition & 0 deletions mobile/test/java/org/chromium/net/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ envoy_mobile_android_test(
srcs = [
"BidirectionalStreamTest.java",
],
flaky = True, # TODO(fredyw): Debug the reason for it being flaky.
native_deps = [
"//test/jni:libenvoy_jni_with_test_extensions.so",
] + select({
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/http3/conn_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Http3ConnPoolImpl::Http3ConnPoolImpl(
random_generator, state, client_fn, codec_fn, protocol, {}, nullptr),
quic_info_(dynamic_cast<Quic::PersistentQuicInfoImpl&>(quic_info)),
server_id_(sni(transport_socket_options, host),
static_cast<uint16_t>(host_->address()->ip()->port()), false),
static_cast<uint16_t>(host_->address()->ip()->port())),
connect_callback_(connect_callback), attempt_happy_eyeballs_(attempt_happy_eyeballs),
network_observer_registry_(network_observer_registry) {}

Expand Down
6 changes: 3 additions & 3 deletions source/common/router/scoped_config_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ HeaderValueExtractorImpl::computeFragment(const Http::HeaderMap& headers) const
return nullptr;
}

ScopedRouteInfo::ScopedRouteInfo(envoy::config::route::v3::ScopedRouteConfiguration config_proto,
ScopedRouteInfo::ScopedRouteInfo(envoy::config::route::v3::ScopedRouteConfiguration&& config_proto,
ConfigConstSharedPtr route_config)
: config_proto_(config_proto), route_config_(route_config),
config_hash_(MessageUtil::hash(config_proto)) {
: config_proto_(std::move(config_proto)), route_config_(route_config),
config_hash_(MessageUtil::hash(config_proto_)) {
// TODO(stevenzzzz): Maybe worth a KeyBuilder abstraction when there are more than one type of
// Fragment.
for (const auto& fragment : config_proto_.key().fragments()) {
Expand Down
6 changes: 3 additions & 3 deletions source/common/router/scoped_config_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ScopeKeyBuilderImpl : public ScopeKeyBuilderBase {
// ScopedRouteConfiguration and corresponding RouteConfigProvider.
class ScopedRouteInfo {
public:
ScopedRouteInfo(envoy::config::route::v3::ScopedRouteConfiguration config_proto,
ScopedRouteInfo(envoy::config::route::v3::ScopedRouteConfiguration&& config_proto,
ConfigConstSharedPtr route_config);

const ConfigConstSharedPtr& routeConfig() const { return route_config_; }
Expand All @@ -89,9 +89,9 @@ class ScopedRouteInfo {
uint64_t configHash() const { return config_hash_; }

private:
envoy::config::route::v3::ScopedRouteConfiguration config_proto_;
const envoy::config::route::v3::ScopedRouteConfiguration config_proto_;
ScopeKey scope_key_;
ConfigConstSharedPtr route_config_;
const ConfigConstSharedPtr route_config_;
const uint64_t config_hash_;
};
using ScopedRouteInfoConstSharedPtr = std::shared_ptr<const ScopedRouteInfo>;
Expand Down
2 changes: 1 addition & 1 deletion source/common/router/scoped_rds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ makeScopedRouteInfos(ProtobufTypes::ConstMessagePtrVector&& config_protos,
config_provider_manager.routeConfigProviderManager().createStaticRouteConfigProvider(
scoped_route_config.route_configuration(), factory_context,
factory_context.messageValidationContext().staticValidationVisitor());
scopes.push_back(std::make_shared<const ScopedRouteInfo>(scoped_route_config,
scopes.push_back(std::make_shared<const ScopedRouteInfo>(std::move(scoped_route_config),
route_config_provider->configCast()));
}

Expand Down
Loading

0 comments on commit 48ce0a8

Please sign in to comment.