15440 Commits

Author SHA1 Message Date
Sergii Tkachenko
0a3681052b gRPC test DNS server: Synchronize shutdown to prevent data races
To avoid data races and use-after-free on shutdown in Python 3.13.
It seems to have worked before due to unintended guarantees of the
Python interpreter that are gone with the new version.

Uses `threading.Event` and `threading.Lock` to coordinate between the main thread handling signals and the `flush_stdout_loop` thread. The `_quit_on_signal` handler now signals the flush thread to exit, and waits for the flush thread to complete its current sleep cycle before calling `sys.exit()`. This prevents a use-after-free that shows up as a data race.

Ref b/474047558

PiperOrigin-RevId: 859182150
2026-01-21 11:15:46 -08:00
Mark D. Roth
61fe9b40a9 [xDS] update XdsClient fuzzer seeds to realistic examples (#41416)
CC @fuqianggao

Closes #41416

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41416 from markdroth:xds_fuzzer_seeds 130eb99741d712b160632c03f27d0c9bfd6e97cf
PiperOrigin-RevId: 858751551
2026-01-20 14:24:07 -08:00
Craig Tiller
b1eb9dea81 [tdigest] Remove code (#40933)
I added this in anticipation of wanting to use it, but that hasn't transpired... and we're seeing flaky tests. Removing for now.

Closes #40933

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40933 from ctiller:tdigest-- ba911bfe96cba57e0bfc97e13f0132c68dd67e64
PiperOrigin-RevId: 858731635
2026-01-20 13:38:52 -08:00
Akshit Patel
bfe88e0177 [PH2][Keepalive] Move spawn into the transport
PiperOrigin-RevId: 856971493
2026-01-15 22:34:44 -08:00
Craig Tiller
1bd3c5b429 [channelz] When multiple additional info are added with the same key, keep them all (#41277)
Closes #41277

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41277 from ctiller:x1 f7f2e59e4084b3b0ad1aba46bf08f6fc9b42a56c
PiperOrigin-RevId: 856763243
2026-01-15 12:13:29 -08:00
Alisha Nanda
1ba3b92767 Add forwarding metadata keys and remove ordering restriction in header assembler test.
PiperOrigin-RevId: 856738894
2026-01-15 11:19:37 -08:00
Tanvi Jagtap
01f57739a6 [PH2] Enable server_interceptors_end2end_test for PH2
PiperOrigin-RevId: 856145116
2026-01-14 04:05:09 -08:00
Tanvi Jagtap
b4ca1c97d8 [PH2] Enable client_interceptors_end2end_test for PH2
Adding PH2 experiment to the client_interceptors_end2end_test suite.

Also adding the Channel Arg wherever we missed it in the earlier PR : https://github.com/grpc/grpc/pull/41399/files

PiperOrigin-RevId: 856102643
2026-01-14 01:43:49 -08:00
Tanvi Jagtap
8a09cb0efa [PH2][Tests] Disabling Retry in multiple cpp end2end tests
PiperOrigin-RevId: 856040712
2026-01-13 22:32:34 -08:00
Michael Lumish
088436d01c [xds] Implement gRFC A101 (#41051)
This includes two major changes:

 1. An additional credentials option `sni_override` with the type `optional<string>`. If `nullopt`, it has no effect, and if set to the empty string it disables sending SNI entirely. Otherwise, the specified string will be sent.
 2. The implementation of [gRFC A101](https://github.com/grpc/proposal/blob/master/A101-SNI-setting-and-SNI-SAN-validation.md) using that new option. This includes options to set SNI and to validate SAN values against the set SNI value.

Closes #41051

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41051 from murgatroid99:xds_sni_support 6a1f8667dedc19947532720495b2932889236a12
PiperOrigin-RevId: 855765736
2026-01-13 09:48:39 -08:00
Akshit Patel
9a9ee947ef [PH2][Ping] Move spawns into the transport
PiperOrigin-RevId: 855535757
2026-01-12 22:39:12 -08:00
Tanvi Jagtap
ae8671efbd [PH2][Trivial] Adding comments
PiperOrigin-RevId: 855218071
2026-01-12 07:25:16 -08:00
Akshit Patel
5905db4ec3 [PH2][E2E] Disable flaky tests
PiperOrigin-RevId: 855204726
2026-01-12 06:39:00 -08:00
Tanvi Jagtap
ee91a1f4cb [PH2][Test] Removing flaky time dependent assert
This test is especially painfully slow in case of asan. However, we cannot disable a test or a single EXPECT just for asan. So the assert needs to be removed. It is creating too much noise.
Having time dependent tests is never a good idea.

PiperOrigin-RevId: 855129723
2026-01-12 02:16:03 -08:00
Tanvi Jagtap
1c2c9de77f [PH2][Tests] Enable time_change_test and mock_test
PiperOrigin-RevId: 855088648
2026-01-12 00:17:06 -08:00
Akshit Patel
b0db708479 [PH2][Write] Plumb write size policy.
PiperOrigin-RevId: 855055779
2026-01-11 22:34:24 -08:00
Craig Tiller
a8b31fab81 Refactor CallTracer API for SendInitialMetadata.
This change introduces a new experiment `call_tracer_send_initial_metadata_is_an_annotation`. When enabled, the `CallTracer::RecordSendInitialMetadata` method will now record a `SendInitialMetadataAnnotation` and call a new `MutateSendInitialMetadata` method on the underlying `CallTracerInterface`.

The `CallTracerInterface` and its implementations (including XorMetrics, OpenCensus, OpenTelemetry, and test fakes) have been updated to include the new `MutateSendInitialMetadata` virtual method. The existing `RecordSendInitialMetadata` implementations are modified to check the experiment flag and delegate to `MutateSendInitialMetadata` if the experiment is active.

A new `SendInitialMetadataAnnotation` class is added, which inherits from `CallTracerAnnotationInterface::Annotation`. This annotation type is used to capture the state of the initial metadata for immutable tracing purposes.

Additionally, `ForEachKeyValue` methods are added to `MetadataInfo` and `HttpAnnotation` to facilitate iterating over metadata key-value pairs for annotation recording. The experiment configuration files are updated to include the new experiment.

PiperOrigin-RevId: 854227812
2026-01-09 09:47:03 -08:00
Tanvi Jagtap
33588a85e2 [PH2][Tests] Enabling generic_end2end_test, end2end_test
Bypassing 1 test in end2end_test because we want earlier validation of the flakes.
Fixing the bug may take about 2-4 working days. We need to check for the stability of the suite and so we need these to run on Kokoro.

Disabled retries in async_end2end_test , but not enabled the suite because of some timeout failure.

Also, refactored the code to add a new function ApplyCommonChannelArguments

PiperOrigin-RevId: 854186178
2026-01-09 07:29:45 -08:00
Tanvi Jagtap - Google LLC
1170ac2ad6 [PH2][BUILD][Trivial] (#41374)
[PH2][BUILD][Trivial]

Closes #41374

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41374 from tanvi-jagtap:2026_01_09_temp 03501d9d22d6a96d1b3e3941986239f81d6f432d
PiperOrigin-RevId: 854080754
2026-01-09 01:23:49 -08:00
Tanvi Jagtap
7f02b665ce [PH2][Test] Enable hybrid_end2end_test and raw_end2end_test
streaming_throughput_test is edited to disabled retry interceptor. streaming_throughput_test has NOT been enabled. Have to debug a flake.

PiperOrigin-RevId: 853963781
2026-01-08 18:43:07 -08:00
yuanweiz
20d4f1b233 [bzlmod] Avoid hard-coding workspace name so C++ DNS tests can build. (#41355)
Adapted from PR #40420

The original author left team and the PR couldn't be merged due to CLA check.
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #41355

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41355 from yuanweiz:workspace adb60674979a5d722f45e13e7c75291f22722f41
PiperOrigin-RevId: 853745450
2026-01-08 08:07:55 -08:00
Tanvi Jagtap
60094bd25f [PH2] Enabling client_callback_end2end_test
The full suite of 43 tests is passing with Retries disabled and PH2 on.
This is ready to be enabled on kokoro.

PiperOrigin-RevId: 853666979
2026-01-08 04:01:33 -08:00
Akshit Patel
894886734f [PH2][E2E] Enable secure tests
PiperOrigin-RevId: 853614041
2026-01-08 01:17:36 -08:00
Tanvi Jagtap
e1e3ebebf9 [PH2][Bug][Test][Tests] Adding peer_string_
This was missing in the transport.
Reference from CHTTP2 :
1. ab1d8f3c2f/src/core/ext/transport/chttp2/transport/chttp2_transport.cc (L2272)
2. ab1d8f3c2f/src/core/ext/transport/chttp2/transport/internal.h (L311)

Found while running cpp end to end test : function : CheckIsLocalhost
file : https://github.com/grpc/grpc/blob/master/test/cpp/end2end/end2end_test.cc
PiperOrigin-RevId: 853600618
2026-01-08 00:38:18 -08:00
Tanvi Jagtap - Google LLC
518f4a5ef0 [PH2][Trivial][BUILD] Adding a util file to cpp end2end folder (#41361)
[PH2][Trivial][BUILD] Adding a util file to cpp end2end folder

Adding some temporary helper functions for that.

Closes #41361

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41361 from tanvi-jagtap:2026_01_07_util_file 0702cb4958f80117f44c8bd796f58fa59ceba0c1
PiperOrigin-RevId: 853164713
2026-01-07 02:40:00 -08:00
Tanvi Jagtap
580a28f890 [PH2][AI] Adding a Gemini.md file for the cpp end to end test folder
PiperOrigin-RevId: 853114764
2026-01-07 00:13:36 -08:00
Tanvi Jagtap
1b9025f71d [PH2][Tests] Adding a few logs to help with future debugging
PiperOrigin-RevId: 853069945
2026-01-06 21:41:31 -08:00
Luwei Ge
6aa618723e [core][credentials] Improve the error status returned from external account credentials (#41276)
The logic for the HTTP response code part is the same as #40907.

Also removed a few TODOs by moving from `GRPC_ERROR_CREATE` to `absl::XXError`.

Closes #41276

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41276 from rockspore:external_account_creds 9143e8450350bc9998fadfc3a8356bb35b7131cb
PiperOrigin-RevId: 852861049
2026-01-06 11:22:48 -08:00
Jordan Rupprecht
41780cddd1 Avoid multimap::find unspecified behavior (#41279)
When a `std::multimap` has multiple entries with the same key, calling `m.find(key)` returns an unspecified element.

Historically, this returns the first matching element. However, this is not guaranteed, and recent libc++ changes make this return an arbitrary element.

Using `m.equal_range(key)` is a replacement that will preserve the current behavior. The behavior of this is guaranteed to return a range of all matching elements in insertion order, and the beginning of the range is the same element as what's normally returned by `m.find(key)`.

Closes #41279

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41279 from rupprecht:multimap-find 70b116441d03eff80523e010b25336f5a75c70c2
PiperOrigin-RevId: 852844558
2026-01-06 10:44:32 -08:00
Craig Tiller
f045c84737 Rename EXPECT_DEATH tests to use a DeathTest suffix.
This change renames test suites containing EXPECT_DEATH assertions to include "DeathTest" in their name, following GoogleTest best practices for handling death tests.

PiperOrigin-RevId: 852840775
2026-01-06 10:39:03 -08:00
Siddharth Nohria
3751ad5aac [Resource Quota] Add Server wide Stream Quota
Add Stream quota, to allow users to set server wide max_outstanding_streams, in addition to the per-connection limit.

PiperOrigin-RevId: 852602058
2026-01-05 22:25:25 -08:00
ac-patel
3f94956663 [PH2][E2E] Add build files for secure tests (#41344)
Closes #41344

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41344 from ac-patel:build f0242b93a6a002560eb403c3d8c31ea819d50d46
PiperOrigin-RevId: 852577598
2026-01-05 21:04:42 -08:00
Mark D. Roth
160d4169c5 [subchannel] restructure APIs for starting a subchannel call (#41009)
This is a prerequisite for queuing calls in the subchannel, which will be needed for A105 (https://github.com/grpc/proposal/pull/516).

Today, callers that need to start a call on a subchannel (primarily the client channel, but there are a couple of others) need to first ask the subchannel for the `ConnectedSubchannel` and then start the call on the `ConnectedSubchannel`.  That works fine today, but when we add call queuing in the subchannel, this API would require us to acquire and release the subchannel's lock twice: once to get the `ConnectedSubchannel`, and again to add the call to the queue.

To avoid that, I have removed the `ConnectedSubchannel` from the subchannel's API and instead made it an internal implementation detail.  Instead, the subchannel itself has methods for starting a call and doing pings.

This PR predominantly affects the v1 stack.  There are essentially no changes to the v3 stack, since that code was already grabbing the `UnstartedCallDestination` out of the `ConnectedSubchannel` within a method on the subchannel.

This change is not completely trivial, but it should not cause any behavior changes, and it is sufficiently cross-cutting that I don't see an easy way to make it an experiment.

Closes #41009

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41009 from markdroth:subchannel_api_restructure ab6087d5b19f91a2a5e66871ddda5e6f74505d48
PiperOrigin-RevId: 852484250
2026-01-05 15:44:10 -08:00
Alisha Nanda
1c924c5f98 Fix no logging test (#41348)
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #41348

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41348 from ananda1066:no_logging_test cad655f3b45ac1297d924ab972c56130d08eb92e
PiperOrigin-RevId: 852480919
2026-01-05 15:34:38 -08:00
Craig Tiller
2fd66e865e [test] Timeout utility class (#41265)
Closes #41265

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41265 from ctiller:opt 71396e3c2e4d71167ba1838a8fcb46c144c1c88b
PiperOrigin-RevId: 852447067
2026-01-05 14:07:37 -08:00
Alisha Nanda
d3afb84946 Rename HttpConnectHandshaker to HttpConnectClientHandshaker in preparation for adding a HttpConnectServerHandshaker.
PiperOrigin-RevId: 852382782
2026-01-05 11:24:22 -08:00
Tanvi Jagtap - Google LLC
a9ceb676ed [PH2][Tests] Enable cpp end2end tests that are working (#41339)
[PH2][Tests] Enable cpp end2end tests that are working

Closes #41339

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41339 from tanvi-jagtap:2026_01_04_bulk_enable_cpp d501d8c35778de3adf59b7e68e876caa7ffd5b45
PiperOrigin-RevId: 852185367
2026-01-05 01:30:13 -08:00
Akshit Patel
fa2322ad27 [PH2][E2E] Enable ServerStreaming tests
PiperOrigin-RevId: 852129915
2026-01-04 22:20:45 -08:00
Akshit Patel
ffaba5bac9 [PH2][CallV3] CallV3 EOS
1. Currently trying to read server to client message after trailing metadata has been pulled results in failure as the `server_to_client_pull_state` transitions to `kTerminated`. Ideally, if the trailing metadata was pushed with a non-cancelled status, first server to client message read should resolve to a `null` message signifying end of stream notification. Any subsequent server to client message reads would resolve to failure. If the trailing metadata was pushed with a cancelled status any server to client message reads would resolve to failure.
2. Add a check to enforce only cancelled metadata can be pushed in unstarted `CallState`.
3. Add waiters to `PollPullServerToClientMessageAvailable` to fix a corner case where that promise will never be polled.

PiperOrigin-RevId: 852094321
2026-01-04 19:32:46 -08:00
Tanvi Jagtap - Google LLC
5dd931da69 [PH2][Tests] Cpp end to end enabling multiple tests (#41332)
[PH2][Tests] Cpp end to end enabling multiple tests

Closes #41332

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41332 from tanvi-jagtap:2026_01_02_bulk_enable_passing_tests 4976d566fbb0942f1f03202b6f45c5c216846dba
PiperOrigin-RevId: 851511191
2026-01-02 19:20:52 -08:00
Tanvi Jagtap
7ac02dfd54 [PH2][Security] Security frame support
PiperOrigin-RevId: 851296911
2026-01-02 04:50:32 -08:00
Tanvi Jagtap - Google LLC
4905ef5d27 [PH2][Tests] Cpp end to end enabling few tests (#41327)
[PH2][Tests] Cpp end to end enabling few tests

Closes #41327

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41327 from tanvi-jagtap:2025_12_30_thread_stress_test 5dd5e21feb7425436bd479bf3ca0d62f0a6b63c5
PiperOrigin-RevId: 850655928
2025-12-31 00:37:07 -08:00
Rishesh Agarwal
e96e1d0ce8 [BUILD] revert layering_check in test/cpp/end2end (#41326)
Closes #41326

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41326 from rishesh007:remove_parse_headers_2 9886d17265086ff3ec1979337250b66a6b4ba692
PiperOrigin-RevId: 850632406
2025-12-30 23:02:50 -08:00
Rishesh Agarwal
0d3ceaf900 [BUILD] revert layering_check in xds end2end test build file (#41302)
This reverts partial changes from  https://github.com/grpc/grpc/pull/41240.

As we don't want to maintain a separate copy of BUILD targets for all of the xDS protos, because
(a) this will be a maintenance burden
(b) it could lead to ODR violations if another target depends on both copies of the xDS proto targets.

Closes #41302

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41302 from rishesh007:remove_parse_headers 42134419d292d0b18ca1c1d71e7c3d1611c5115e
PiperOrigin-RevId: 850383567
2025-12-30 05:52:43 -08:00
Tanvi Jagtap - Google LLC
d7509f9913 [PH2][BUILD][Trivial] Build files (#41301)
[PH2][BUILD][Trivial] Build files

Closes #41301

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41301 from tanvi-jagtap:ph2_more_files 8b396d0f4b5cbb7559eebc4612cecb4ce0506361
PiperOrigin-RevId: 848476035
2025-12-24 01:34:53 -08:00
Akshit Patel
94bcf5725c [PH2][E2E] Disable retry tests on windows
PiperOrigin-RevId: 847948128
2025-12-22 18:19:47 -08:00
Tanvi Jagtap
ad19eab650 [PH2][Settings][Security]
1. Plumbing for ChannelArg GRPC_ARG_EXPERIMENTAL_HTTP2_PREFERRED_CRYPTO_FRAME_SIZE
2. Plumbing for SETTING preferred_receive_crypto_message_size_

PiperOrigin-RevId: 847808986
2025-12-22 10:27:56 -08:00
Vignesh Babu
7d2ad5df80 [Build Fix] grpc/core/master/linux/grpc_flaky_network (#41272)
Should fix build failure: https://btx.cloud.google.com/invocations/0a1f31fb-d340-4ff5-af2c-25543f19068e/log

Closes #41272

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41272 from Vignesh2208:cbf 28a57fb83eebedce3353f59a8a0c528b58c8c24e
PiperOrigin-RevId: 846857224
2025-12-19 14:00:55 -08:00
Rishesh Agarwal
c705f05d29 Adding layering_check and parse_headers in end2end test build file (#41240)
Closes #41240

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41240 from rishesh007:layering_test_2 d9daaf9bb00fb3d6b09a12b8acca79b6e45c1873
PiperOrigin-RevId: 846532341
2025-12-18 20:52:18 -08:00
Gregory Cooke
01ea97127c [Security - Test] Fix OpenSSL 1.0.2 tests that incorrectly assume TLS 1.3 is negotiated. (#41241)
OpenSSL1.0.2 doesn't support TLS1.3, so the assumption on this test was wrong - it falls back to TLS1.2 behavior.

Closes #41241

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41241 from gtcooke94:portability_fix cee64677d3d016b49ae978ca0ed0691f8a7dfaf9
PiperOrigin-RevId: 845396113
2025-12-16 12:52:19 -08:00