grpc 1.82.0 → 1.83.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +8 -5
- data/etc/roots.pem +10400 -3855
- data/include/grpc/grpc_audit_logging.h +2 -2
- data/include/grpc/grpc_security_constants.h +2 -0
- data/include/grpc/impl/channel_arg_names.h +23 -0
- data/src/core/call/call_filters.h +19 -3
- data/src/core/call/call_spine.h +4 -4
- data/src/core/call/client_call.cc +1 -1
- data/src/core/call/metadata.cc +7 -2
- data/src/core/call/server_call.cc +13 -3
- data/src/core/call/server_call.h +5 -3
- data/src/core/client_channel/backup_poller.cc +2 -17
- data/src/core/client_channel/client_channel.cc +17 -14
- data/src/core/client_channel/client_channel.h +3 -1
- data/src/core/client_channel/client_channel_filter.cc +11 -13
- data/src/core/client_channel/client_channel_service_config.cc +5 -13
- data/src/core/client_channel/direct_channel.cc +5 -1
- data/src/core/client_channel/direct_channel.h +3 -1
- data/src/core/config/experiment_env_var.cc +30 -0
- data/src/core/config/experiment_env_var.h +26 -0
- data/src/core/credentials/call/regional_access_boundary_fetcher.cc +6 -6
- data/src/core/credentials/transport/ssl/ssl_security_connector.cc +14 -2
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.cc +172 -0
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.h +103 -0
- data/src/core/credentials/transport/tls/load_system_roots_fallback.cc +3 -2
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +10 -3
- data/src/core/credentials/transport/tls/tls_security_connector.cc +14 -2
- data/src/core/credentials/transport/xds/xds_credentials.cc +4 -12
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +2 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +19 -13
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +11 -9
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/flow_control.h +3 -2
- data/src/core/ext/transport/chttp2/transport/frame.cc +58 -1
- data/src/core/ext/transport/chttp2/transport/frame.h +13 -1
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +2 -4
- data/src/core/ext/transport/chttp2/transport/frame_security.cc +10 -1
- data/src/core/ext/transport/chttp2/transport/frame_security.h +2 -1
- data/src/core/ext/transport/chttp2/transport/goaway.cc +11 -1
- data/src/core/ext/transport/chttp2/transport/goaway.h +17 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +9 -0
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +117 -276
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +44 -17
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +382 -496
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +75 -77
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +30 -11
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +24 -9
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +26 -0
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +2 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +4 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +4 -10
- data/src/core/ext/transport/chttp2/transport/read_context.h +62 -20
- data/src/core/ext/transport/chttp2/transport/security_frame.h +1 -0
- data/src/core/ext/transport/chttp2/transport/stream.h +271 -120
- data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +77 -61
- data/src/core/handshaker/security/secure_endpoint.cc +0 -13
- data/src/core/lib/channel/promise_based_filter.cc +77 -3
- data/src/core/lib/channel/promise_based_filter.h +238 -184
- data/src/core/lib/event_engine/extensions/receive_coalescing_extension.h +0 -4
- data/src/core/lib/event_engine/extensions/tcp_trace.h +1 -1
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +2 -12
- data/src/core/lib/event_engine/shim.cc +2 -16
- data/src/core/lib/event_engine/shim.h +0 -4
- data/src/core/lib/experiments/experiments.cc +51 -102
- data/src/core/lib/experiments/experiments.h +37 -59
- data/src/core/lib/iomgr/error.cc +3 -73
- data/src/core/lib/iomgr/error.h +8 -6
- data/src/core/lib/iomgr/error_cfstream.cc +1 -2
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +2 -6
- data/src/core/lib/iomgr/ev_poll_posix.cc +2 -6
- data/src/core/lib/iomgr/tcp_posix.cc +2 -6
- data/src/core/lib/security/authorization/audit_logging.cc +2 -2
- data/src/core/lib/security/authorization/audit_logging.h +3 -3
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +11 -13
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +1 -1
- data/src/core/lib/security/authorization/matchers.cc +20 -20
- data/src/core/lib/security/authorization/matchers.h +15 -16
- data/src/core/lib/security/authorization/rbac_policy.h +1 -1
- data/src/core/lib/security/authorization/stdout_logger.cc +3 -3
- data/src/core/lib/security/authorization/stdout_logger.h +6 -5
- data/src/core/lib/surface/call.cc +0 -8
- data/src/core/lib/surface/call.h +2 -0
- data/src/core/lib/surface/channel.cc +21 -2
- data/src/core/lib/surface/channel.h +14 -6
- data/src/core/lib/surface/filter_stack_call.cc +10 -29
- data/src/core/lib/surface/legacy_channel.cc +7 -7
- data/src/core/lib/surface/legacy_channel.h +3 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +13 -13
- data/src/core/lib/transport/bdp_estimator.h +9 -5
- data/src/core/lib/transport/error_utils.cc +26 -138
- data/src/core/lib/transport/promise_endpoint.h +2 -4
- data/src/core/load_balancing/grpclb/grpclb.cc +2 -1
- data/src/core/load_balancing/pick_first/pick_first.cc +33 -2
- data/src/core/load_balancing/pick_first/pick_first.h +6 -0
- data/src/core/load_balancing/ring_hash/ring_hash.cc +3 -10
- data/src/core/load_balancing/rls/rls.cc +2 -1
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +2 -7
- data/src/core/load_balancing/xds/cds.cc +80 -56
- data/src/core/load_balancing/xds/cds.h +21 -0
- data/src/core/mitigation_engine/mitigation.h +53 -0
- data/src/core/mitigation_engine/mitigation_provider.h +62 -0
- data/src/core/resolver/dns/dns_resolver_plugin.cc +1 -6
- data/src/core/resolver/xds/xds_resolver.cc +14 -11
- data/src/core/server/server.h +1 -4
- data/src/core/server/server_config_selector.h +5 -4
- data/src/core/server/server_config_selector_filter.cc +67 -80
- data/src/core/server/xds_server_config_fetcher.cc +681 -692
- data/src/core/server/xds_server_config_fetcher_legacy.cc +15 -12
- data/src/core/telemetry/call_tracer.cc +49 -2
- data/src/core/telemetry/call_tracer.h +1 -0
- data/src/core/telemetry/tcp_tracer.h +38 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
- data/src/core/tsi/ssl_telemetry_utils.cc +343 -0
- data/src/core/tsi/ssl_telemetry_utils.h +74 -0
- data/src/core/tsi/ssl_transport_security.cc +577 -301
- data/src/core/tsi/ssl_transport_security.h +22 -6
- data/src/core/tsi/ssl_transport_security_utils.cc +2 -0
- data/src/core/tsi/transport_security.h +7 -0
- data/src/core/util/http_client/httpcli.cc +1 -4
- data/src/core/util/http_client/httpcli_security_connector.cc +2 -1
- data/src/core/util/status_helper.cc +71 -192
- data/src/core/util/status_helper.h +16 -21
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +2 -11
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -7
- data/src/core/xds/grpc/xds_cluster_parser.cc +5 -16
- data/src/core/xds/grpc/xds_common_types.cc +94 -38
- data/src/core/xds/grpc/xds_common_types.h +33 -18
- data/src/core/xds/grpc/xds_common_types_parser.cc +168 -100
- data/src/core/xds/grpc/xds_common_types_parser.h +18 -1
- data/src/core/xds/grpc/xds_endpoint_parser.cc +6 -17
- data/src/core/xds/grpc/xds_http_filter_registry.cc +2 -10
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +3 -12
- data/src/core/xds/grpc/xds_metadata_parser.cc +0 -2
- data/src/core/xds/grpc/xds_route_config_parser.cc +7 -11
- data/src/core/xds/grpc/xds_routing.cc +113 -82
- data/src/core/xds/grpc/xds_routing.h +70 -20
- data/src/core/xds/grpc/xds_server_grpc.cc +22 -13
- data/src/core/xds/grpc/xds_server_grpc.h +16 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +10 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +123 -18
- data/src/core/xds/grpc/xds_transport_grpc.h +28 -4
- data/src/core/xds/xds_client/lrs_client.cc +3 -7
- data/src/core/xds/xds_client/xds_bootstrap.cc +4 -16
- data/src/core/xds/xds_client/xds_client.cc +2 -15
- data/src/core/xds/xds_client/xds_transport.h +3 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +1 -1
- metadata +9 -1
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
#include <optional>
|
|
30
30
|
#include <type_traits>
|
|
31
31
|
#include <utility>
|
|
32
|
-
#include <vector>
|
|
33
32
|
|
|
34
33
|
#include "src/core/call/call_spine.h"
|
|
35
34
|
#include "src/core/call/metadata.h"
|
|
@@ -38,7 +37,6 @@
|
|
|
38
37
|
#include "src/core/ext/transport/chttp2/transport/frame.h"
|
|
39
38
|
#include "src/core/ext/transport/chttp2/transport/goaway.h"
|
|
40
39
|
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
|
|
41
|
-
#include "src/core/ext/transport/chttp2/transport/hpack_parser.h"
|
|
42
40
|
#include "src/core/ext/transport/chttp2/transport/http2_settings_promises.h"
|
|
43
41
|
#include "src/core/ext/transport/chttp2/transport/http2_status.h"
|
|
44
42
|
#include "src/core/ext/transport/chttp2/transport/http2_transport.h"
|
|
@@ -75,7 +73,6 @@
|
|
|
75
73
|
#include "absl/container/flat_hash_map.h"
|
|
76
74
|
#include "absl/functional/any_invocable.h"
|
|
77
75
|
#include "absl/log/log.h"
|
|
78
|
-
#include "absl/meta/type_traits.h"
|
|
79
76
|
#include "absl/status/status.h"
|
|
80
77
|
#include "absl/status/statusor.h"
|
|
81
78
|
#include "absl/strings/string_view.h"
|
|
@@ -300,7 +297,7 @@ class Http2ClientTransport final : public ClientTransport,
|
|
|
300
297
|
// the writable streams and write to the endpoint.
|
|
301
298
|
auto MultiplexerLoop();
|
|
302
299
|
|
|
303
|
-
// Returns a promise to fetch data from the
|
|
300
|
+
// Returns a promise to fetch data from the CallHandler and pass it further
|
|
304
301
|
// down towards the endpoint.
|
|
305
302
|
auto CallOutboundLoop(RefCountedPtr<Stream> stream);
|
|
306
303
|
|
|
@@ -322,7 +319,7 @@ class Http2ClientTransport final : public ClientTransport,
|
|
|
322
319
|
"status: "
|
|
323
320
|
<< status << " at " << whence.file() << ":" << whence.line();
|
|
324
321
|
GRPC_UNUSED absl::Status unused_status = HandleError(
|
|
325
|
-
/*
|
|
322
|
+
/*stream=*/nullptr, ToHttpOkOrConnError(status), whence);
|
|
326
323
|
return false;
|
|
327
324
|
}
|
|
328
325
|
|
|
@@ -379,7 +376,7 @@ class Http2ClientTransport final : public ClientTransport,
|
|
|
379
376
|
[self = RefAsSubclass<Http2ClientTransport>()](absl::Status status) {
|
|
380
377
|
if (!status.ok()) {
|
|
381
378
|
GRPC_UNUSED absl::Status error = self->HandleError(
|
|
382
|
-
/*
|
|
379
|
+
/*stream=*/nullptr, ToHttpOkOrConnError(status));
|
|
383
380
|
}
|
|
384
381
|
});
|
|
385
382
|
}
|
|
@@ -485,14 +482,47 @@ class Http2ClientTransport final : public ClientTransport,
|
|
|
485
482
|
// Runs on the call party.
|
|
486
483
|
std::optional<RefCountedPtr<Stream>> MakeStream(CallHandler call_handler);
|
|
487
484
|
|
|
485
|
+
// Enqueues a RST_STREAM frame and immediately closes the stream for reads.
|
|
486
|
+
// Writes will be closed by the write loop after the RST_STREAM frame is
|
|
487
|
+
// written to the wire. Once writes are closed, the stream is considered fully
|
|
488
|
+
// closed and is removed from the active stream list (reducing the active
|
|
489
|
+
// stream count).
|
|
490
|
+
//
|
|
491
|
+
// NOTE: This function must be triggered ONLY in error scenarios (e.g., local
|
|
492
|
+
// stream errors, cancellation, transport closure). Normal call completion
|
|
493
|
+
// must not call this.
|
|
494
|
+
//
|
|
495
|
+
// Prefer calling HandleError over this API.
|
|
496
|
+
//
|
|
497
|
+
// Call flows that lead to this function:
|
|
498
|
+
// 1. Transport error: A protocol error or connection error is detected.
|
|
499
|
+
// 2. Application abort (Cancellation): Outbound loop detects cancellation,
|
|
500
|
+
// calls HandleError, which calls BeginCloseStream.
|
|
501
|
+
// 3. Transport close: Follows the same path as transport error.
|
|
502
|
+
//
|
|
503
|
+
// Stream reference counting: The stream ref is held in at most 3 places:
|
|
504
|
+
// 1. stream_list_ : Released when the stream is fully closed (both reads
|
|
505
|
+
// and writes are closed).
|
|
506
|
+
// 2. CallHandler OnDone : Released when Trailing Metadata is pushed to
|
|
507
|
+
// the call spine.
|
|
508
|
+
// 3. List of writable streams : Released after the final frame is dequeued
|
|
509
|
+
// from the StreamDataQueue.
|
|
488
510
|
void BeginCloseStream(RefCountedPtr<Stream> stream,
|
|
489
|
-
|
|
490
|
-
|
|
511
|
+
uint32_t reset_stream_error_code,
|
|
512
|
+
absl::Status trailing_metadata_status,
|
|
491
513
|
DebugLocation whence = {});
|
|
492
514
|
|
|
493
|
-
//
|
|
494
|
-
|
|
495
|
-
|
|
515
|
+
// Handles stream state changes by discarding pending header parsing if reads
|
|
516
|
+
// became closed, and triggering cleanup if the stream became closed.
|
|
517
|
+
// This function does not hold the transport mutex and MUST be called from
|
|
518
|
+
// the transport party.
|
|
519
|
+
void HandleStreamStateChange(Stream& stream, StreamStateChange change);
|
|
520
|
+
|
|
521
|
+
// Erases the stream from the active stream list. The caller MUST ensure the
|
|
522
|
+
// stream is closed. If it is the last stream and the transport is orphaned,
|
|
523
|
+
// it triggers transport closure.
|
|
524
|
+
// This function acquires the transport mutex internally.
|
|
525
|
+
void CleanupStream(Stream& stream);
|
|
496
526
|
|
|
497
527
|
//////////////////////////////////////////////////////////////////////////////
|
|
498
528
|
// Ping Keepalive and Goaway
|
|
@@ -527,9 +557,6 @@ class Http2ClientTransport final : public ClientTransport,
|
|
|
527
557
|
void MaybeSpawnCloseTransport(Http2Status http2_status,
|
|
528
558
|
DebugLocation whence = {});
|
|
529
559
|
|
|
530
|
-
bool CanCloseTransportLocked() const
|
|
531
|
-
ABSL_EXCLUSIVE_LOCKS_REQUIRED(transport_mutex_);
|
|
532
|
-
|
|
533
560
|
// This function MUST run on the transport party.
|
|
534
561
|
void CloseTransport();
|
|
535
562
|
|
|
@@ -541,8 +568,8 @@ class Http2ClientTransport final : public ClientTransport,
|
|
|
541
568
|
// should not be cancelled in case of stream errors.
|
|
542
569
|
// If the error is a connection error, it closes the transport and returns the
|
|
543
570
|
// corresponding (failed) absl status.
|
|
544
|
-
absl::Status HandleError(
|
|
545
|
-
|
|
571
|
+
absl::Status HandleError(RefCountedPtr<Stream> stream, Http2Status status,
|
|
572
|
+
DebugLocation whence = {});
|
|
546
573
|
|
|
547
574
|
//////////////////////////////////////////////////////////////////////////////
|
|
548
575
|
// Misc Transport Stuff
|
|
@@ -641,7 +668,7 @@ class Http2ClientTransport final : public ClientTransport,
|
|
|
641
668
|
//////////////////////////////////////////////////////////////////////////////
|
|
642
669
|
// All Data Members
|
|
643
670
|
|
|
644
|
-
RefCountedPtr<Party> general_party_; // Refer
|
|
671
|
+
RefCountedPtr<Party> general_party_; // Refer AGENTS.md for party slot usage
|
|
645
672
|
std::shared_ptr<grpc_event_engine::experimental::EventEngine> event_engine_;
|
|
646
673
|
|
|
647
674
|
PromiseEndpoint endpoint_;
|