4609 Commits

Author SHA1 Message Date
Antony Polukhin
d7f3d36f68 [cleanup] Move strings if possible in grpc::Status (#40443)
Closes #40443

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40443 from apolukhin:status-optimize d53b7ad8901d0b0d5ef53c356d79e45433ebbcf6
PiperOrigin-RevId: 859387690
2026-01-21 20:43:09 -08:00
yuanweiz
62b4ac3649 [Fix] remove GRPCAPI annotation from cpp-only API to fix ruby tests. (#41407)
`tools/artifact_gen/metadata_for_wrapped_languages.cc` determines whether a header exports C API by matching file contents against regex `?:GPRAPI|GRPCAPI|CENSUSAPI)([^#;]*)`, and the headers later get included by `rb_grpc_imports.generated.h`. The C++ std utility `std::optional<>` end up breaking ruby distrib tests.

It seems like all pending PRs are affected. An example: https://btx.cloud.google.com/invocations/4caed1d7-19e0-4a59-9786-28a7ddb03051/targets

<!--

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 #41407

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41407 from yuanweiz:fix_ruby 97f5c958e4275d07ec39c48c63590894ff8d2ea9
PiperOrigin-RevId: 856229588
2026-01-14 08:43:22 -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
Siddharth Nohria
42ff45f92d Replace Call::PerformOps with a direct call to CallOpSet::FillOps, and remove all dependance on CallHook.
PiperOrigin-RevId: 853570227
2026-01-07 23:00:17 -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
Mark D. Roth
d54219b508 [build] add missing includes (#41351)
Fixes #41305.

Closes #41351

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41351 from markdroth:add_missing_includes 223be6932adb00d085149c53167c1b0318745f6c
PiperOrigin-RevId: 852829597
2026-01-06 10:13:09 -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
Michael Lumish
522dbbbb25 [Release] Bump version to 1.79.0-dev (on master branch) (#41291)
Change was **not** created by the release automation script, because it doesn't handle a +2 version bump. See go/grpc-release

Closes #41291

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41291 from murgatroid99:v1.79.0-dev_bump 9a9bf54e5a891459390792dc9d547bdc17b7dd4d
PiperOrigin-RevId: 848168598
2025-12-23 07:26:31 -08:00
Mark D. Roth
12c065157f [client channel] service config plumbing for max_connections_per_subchannel (#41030)
Part of gRFC A105 (https://github.com/grpc/proposal/pull/516).

Closes #41030

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41030 from markdroth:connection_scaling_service_config 6b32269fabb735694370494fd64e17ec92b462a2
PiperOrigin-RevId: 831020755
2025-11-11 12:22:10 -08:00
Siddharth Nohria
3489795bd9 [Resource Quota Write Tracking] Fetch client side memory allocator, and start tracking writes in Resource quota on the client side.
PiperOrigin-RevId: 828268805
2025-11-04 20:58:00 -08:00
Siddharth Nohria
96781630b8 [Resource Quota Write Tracking] Fetch server side memory allocator, and start tracking writes in Resource quota on the server side.
PiperOrigin-RevId: 826628255
2025-10-31 14:28:16 -07:00
Siddharth Nohria
f4742792e1 [Part 1] Resource Quota Write memory tracking.
Pass a MemoryAllocator to the serialize function, so that the write memory can be allocated towards Resource Quota accounting. Add templates for SerializationTraits, to allow implementations to continue using an implementation of Serialize, which does not take the allocator as a parameter. This change is a no-op for now, because all the callers of Serialize pass nullptr for the allocator.

PiperOrigin-RevId: 826159627
2025-10-30 13:21:27 -07:00
Craig Tiller
339906443b [clang-format] Match include file ordering to internal clang-format (#40905)
gRPC is currently getting formatted with two different clang-format implementations, and due to some weirdness they have different include file orderings. This change introduces clang-format configuration to ensure that the two systems align - it's *highly* expected that this will need some maintenance going forward as the two systems evolve.

Closes #40905

PiperOrigin-RevId: 819606209
2025-10-15 00:24:11 -07:00
Romain Geissler @ Amadeus
5896683262 [C++] Silence -Wunused-parameter warning in global_callback_hook.h (#40781)
This fixes this warning:
```
/data/mwrep/res/osp/Grpc/grpcxx/25-0-0-0/include/grpcpp/support/global_callback_hook.h: In member function 'virtual void grpc::DefaultGlobalCallbackHook::RunCallback(grpc_call*, absl::lts_20250814::FunctionRef<void()>)': /data/mwrep/res/osp/Grpc/grpcxx/25-0-0-0/include/grpcpp/support/global_callback_hook.h:48:31: warning: unused parameter 'call' [-Wunused-parameter]
   48 |   void RunCallback(grpc_call* call,
      |                    ~~~~~~~~~~~^~~~
```

Closes #40781

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40781 from Romain-Geissler-1A:fix-warning-global_callback_hook.h b8c3ec5c1a20671308e43c68b4a47f79c3e00d9f
PiperOrigin-RevId: 817415109
2025-10-09 18:19:41 -07:00
Rishesh Agarwal
cecb51649f [Sanity] fix (#40807)
Closes #40807

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40807 from rishesh007:sanity_fix 865744590d9c7bcb97680a4a0ea8a2659c76cd11
PiperOrigin-RevId: 813649852
2025-10-01 02:09:31 -07:00
Rishesh Agarwal
35636ef8a7 Fix cyclic deps to enable layering_check and parse_headers
PiperOrigin-RevId: 813595201
2025-09-30 23:10:29 -07:00
Sergii Tkachenko
02d82e4094 [Release] Bump version to 1.77.0-dev (on master branch) (#40796)
Change was created by the release automation script. See go/grpc-release.

Closes #40796

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40796 from sergiitk:bump_dev_version_202509291139 e7aa910253d1706a72822da986b8b8e7bc87931d
PiperOrigin-RevId: 812961524
2025-09-29 15:16:18 -07:00
Craig Tiller
e5062bcce8 [resource-quota] Revert #39125 (#40768)
Closes #40768

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40768 from ctiller:rollback 37692d6a818e080c25063991fe867837b22ff0a6
PiperOrigin-RevId: 811517736
2025-09-25 15:10:38 -07:00
Ana Salazar Maldonado
f4360e34f9 Add API to create google_compute_engine_credentials with ALTS (#39999)
<!--

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 #39999

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39999 from anniefrchz:directpath-cont 286d985c9a294e02dadf87ca0f77d1e91a6eb65a
PiperOrigin-RevId: 810204628
2025-09-22 16:57:31 -07:00
siddharth nohria
aed2f7989f [Resource Quota] Add Server wide Stream Quota (#39125)
Add Stream quota, to allow users to set server wide max_outstanding_streams, in addition to the per-connection limit.

Closes #39125

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39125 from siddharthnohria:max_outstanding_streams 32ae21514d5321a76b41b8445d16753a095914f8
PiperOrigin-RevId: 807985441
2025-09-16 22:20:22 -07:00
apolcyn
73c0f8ac9c [release] Bump dev version on to 1.76.0-dev (#40484)
As title

Closes #40484

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40484 from apolcyn:bump_dev_version_202508191952 e788be57e9dc7f5e8316bee4baadec26fba3f6e6
PiperOrigin-RevId: 798331971
2025-08-22 14:01:19 -07:00
Gregory Cooke
8cb02ab613 [Security] Spiffe Verification roll forward (#40476)
Roll forward #40321 with fixes relating to OpenSSL 1.0.2

This roll forward fixes two things broken by the original commit:
* OpenSSL 1.0.2 compatibility - `X509_up_ref` is not in 1.0.2, so `CRYPTO_add` is used along with compiler directives.
* The macOS tests flatten trust bundles, and two files in different directories were both named `ca.pem` in the new `spiffe_bundle_map_end2end_test.cc`. One was from the existing test that this new test file was modeled after and was not needed, so it was removed from the BUILD file resolving the double naming conflict.

Closes #40476

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40476 from gtcooke94:spiffe_roll_forward e30b7e4c1a873ff62565f557fac90e28225a3f56
PiperOrigin-RevId: 796537764
2025-08-18 12:50:18 -07:00
Gregory Cooke
368c313ffe Revert "[Security][XDS] Support Verification with SPIFFE Bundle Maps … (#40445)
This reverts commit 65cdfba95c.

Closes #40445

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40445 from gtcooke94:revert_spiffe 392219abd3ee8424a8f3bd6d59c258a0db7c1ee2
PiperOrigin-RevId: 795130272
2025-08-14 11:43:13 -07:00
Gregory Cooke
65cdfba95c [Security][XDS] Support Verification with SPIFFE Bundle Maps (#40321)
This PR adds APIs discussed in https://github.com/grpc/proposal/pull/506 and https://github.com/grpc/proposal/blob/master/A87-mtls-spiffe-support.md to support verification with SPIFFE Bundle Map roots.

RELEASE NOTES:
* Adds support for SPIFFE Bundle Maps in as roots of trust per [gRFC A87](https://github.com/grpc/proposal/blob/master/A87-mtls-spiffe-support.md) and [gRFC L127](https://github.com/grpc/proposal/pull/506)

Closes #40321

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40321 from gtcooke94:spiffe_verification 6ddc24e6b422489234ac3da2aeeff7f337b54729
PiperOrigin-RevId: 793688101
2025-08-11 09:51:36 -07:00
Yash Tibrewal
4c528497e9 [OTel C++] Implement retry metrics (#39195)
Implements OTel retry metrics as per https://github.com/grpc/proposal/pull/488

Closes #39195

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39195 from yashykt:AddOTelRetryMetrics b7e8b773839f6685564bf45c5c4c5eca630b8127
PiperOrigin-RevId: 787268504
2025-07-25 15:58:11 -07:00
Esun Kim
58022c65ff [Release] Bump version to 1.75.0-dev (on master branch) (#40120)
Change was created by the release automation script. See go/grpc-release.

Closes #40120

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40120 from veblush:bump_dev_version_202507041728 e403e80e566f334809e93e421d552d0b99076f68
PiperOrigin-RevId: 779336318
2025-07-04 18:59:21 -07:00
Rishesh Agarwal
fa4a4b13b1 [API] add new API to create channel from fd or endpoint that supports… (#40017)
re-merging of the previous changes [#39400](https://github.com/grpc/grpc/pull/39400/files)

Closes #40017

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/40017 from rishesh007:create_secure_channel_from_fd 995879ac30a925d631531fb447ccab868e34bbbb
PiperOrigin-RevId: 778763055
2025-07-02 22:38:31 -07:00
Craig Tiller
db6ed7f460 Automated rollback of commit b511685341.
PiperOrigin-RevId: 777624736
2025-06-30 10:26:28 -07:00
Craig Tiller
7fd9fbbf79 [channelz] Export json & proto additional data
PiperOrigin-RevId: 777315819
2025-06-29 15:09:13 -07:00
Craig Tiller
b511685341 Add #include <memory> to BoringSSL headers to make them work with Windows SDK.
PiperOrigin-RevId: 776832412
2025-06-27 21:24:36 -07:00
Takaki Makino
c858eaf082 Fix int32 overflow in grpc protobuf serialization.
PiperOrigin-RevId: 776710357
2025-06-27 14:07:54 -07:00
anniefrchz
ca2e8c98b1 support dual credentials in google_default_credentials (#39770)
Closes #39770

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39770 from anniefrchz:directpath2 35c0f4f5c39b368fd8c15e6255d322d924860d05
PiperOrigin-RevId: 775501652
2025-06-24 21:16:43 -07:00
Rishesh Agarwal
a78f6964a2 Automated rollback of commit 0640791c12.
PiperOrigin-RevId: 773308711
2025-06-19 05:18:46 -07:00
Rishesh Agarwal
0640791c12 [API] add new API to create channel from fd or endpoint that supports secure credentials (#39400)
Changes for [go/grpcpp-secure-channel-from-fd](http://goto.google.com/grpcpp-secure-channel-from-fd)

Closes #39400

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39400 from rishesh007:create_secure_channel_from_fd dfe0920812937e7a0320626beeca17e3e450f4da
PiperOrigin-RevId: 773200033
2025-06-18 22:41:38 -07:00
Yash Tibrewal
f4f80a3041 [EventEngine] Replace span with custom type in WriteEventSink to fix bugs where the underlying vector goes out of scope.
PiperOrigin-RevId: 772645721
2025-06-17 15:31:25 -07:00
Craig Tiller
18ad3eb577 [channel] Add experimental API to retrieve channelz uuid (#39788)
We'll use this for post-mortem debugging failed connections in a few workloads.

Closes #39788

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39788 from ctiller:cuuid bc15385cbea5a4eb6bd701203496a011d22e93d3
PiperOrigin-RevId: 771166125
2025-06-13 11:38:26 -07:00
Yash Tibrewal
00be47428c [EventEngine] Add explicit destruction of deprecated google specific pointer to avoid memory leaks
PiperOrigin-RevId: 769329686
2025-06-09 16:04:17 -07:00
Yash Tibrewal
a63c8a3efd [http2] Stabilize max_pings_wo_data_throttle experiment (#39783)
Closes #39783

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39783 from yashykt:StabilizePingsExp db24b04916e6882a31c638e1bed57e97d9dbe92a
PiperOrigin-RevId: 769325706
2025-06-09 15:52:38 -07:00
Yash Tibrewal
167cb27ba4 [chttp2] Add plumbing for TCP traces (#39690)
Builds on #39657

Closes #39690

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39690 from yashykt:Chttp2TcpTracerPlumbing 0508c79dc5dd558fd8c5e5c7591eeaa4b0a55e33
PiperOrigin-RevId: 766846522
2025-06-03 15:33:43 -07:00
Dennis
d76c6849eb Remove unnecessary copies/moves of std::function in unary client callback API (#39502)
Closes https://github.com/grpc/grpc/issues/39469

Closes #39502

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39502 from Tradias:issue-39469 88319e8017fbdc783c9ccdaf24b596f6707fdcd2
PiperOrigin-RevId: 766468488
2025-06-02 21:22:44 -07:00
Yash Tibrewal
0e54ed66b5 [Release] Bump version to 1.74.0-dev (on master branch) (#39614)
Change was created by the release automation script. See go/grpc-release.

Closes #39614

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39614 from yashykt:bump_dev_version_202505211516 89b3566bfa45e56bc555a70f9a61832ba26274d5
PiperOrigin-RevId: 762218178
2025-05-22 19:15:53 -07:00
Adam Heller
5b9404f698 [EventEngine][iomgr] Re-land: Delete Executor (#39578)
This rolls forward the Executor removal PR, with use-after-free fixes for the iomgr native resolver. See https://github.com/grpc/grpc/pull/39422 for the original landing

Closes #39578

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39578 from drfloob:fix20250515 df648f59a004e723e942773ec2030b14965d2d3c
PiperOrigin-RevId: 761119402
2025-05-20 09:45:21 -07:00
gRPC Team Bot
a3a4448a3a Automated rollback of commit 2911f07b19.
PiperOrigin-RevId: 759169781
2025-05-15 09:03:29 -07:00
Adam Heller
2911f07b19 [EventEngine][iomgr] Delete Executor (#39422)
This removes the last remaining uses of the iomgr Executor, and replaces all references to it in the documentation.

Closes #39422

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39422 from drfloob:rm-executor 3ff8c54df71a009c48279c8442512ef9d98212c6
PiperOrigin-RevId: 758890190
2025-05-14 17:05:42 -07:00
Esun Kim
6aba4ac40f [Core] Added GPR_DISABLE_ABSEIL_SYNC (#39562)
Added temporary `GPR_DISABLE_ABSEIL_SYNC` to have a way to disable `GPR_ABSEIL_SYNC` for those who might have issues on Mac. This will be removed in the near future.

Closes #39562

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39562 from veblush:flag_disable_as 4ed0e378c1f1264dfa5eda8d63c7b2a11cf5838a
PiperOrigin-RevId: 758812301
2025-05-14 13:36:17 -07:00
Yash Tibrewal
94198a4a9c [OpenCensus] Mark OpenCensus and dependent APIs as deprecated (#39554)
OpenCensus was sunsetted in May, 2023 (https://opentelemetry.io/blog/2023/sunsetting-opencensus/), and the C++ OpenCensus repository has been archived (https://github.com/census-instrumentation/opencensus-cpp)/

Closes #39554

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39554 from yashykt:DeprecateOpenCensusPlugin e7dca26d9bf1d3f33083f0d099fe3cdcb3ba86bf
PiperOrigin-RevId: 758363122
2025-05-13 13:56:36 -07:00
Esun Kim
14d36c6e0b [Build] Enabled GPR_ABSEIL_SYNC on Apple (#39446)
Let's try landing this again as we've got a new Apple CI Infra. (Previous attempt: https://github.com/grpc/grpc/pull/23687)

Closes #39446

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39446 from veblush:mac_abseil_sync 907ec64d0376260c2735c7a8a926d9a9c344ba79
PiperOrigin-RevId: 755874354
2025-05-07 08:57:47 -07:00
Craig Tiller
9fb5526cc5 [slice-buffer] Further reduce number of inline elements (#39460)
Closes #39460

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39460 from ctiller:shrunk f2b3246ac94b75953ad01648554ecdf1bfb6fa53
PiperOrigin-RevId: 754083717
2025-05-02 11:59:34 -07:00
Craig Tiller
1742a87145 [json] Adjust FromNumber to accept any arithmetic type (#39350)
Use C++ type traits to refine `FromNumber` to accept any arithmetic type instead of a pre-canned special set.

Allows us to avoid ambiguities on some platforms where (eg) size_t is special in ways that can't be expressed in the current overload scheme.

Closes #39350

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/39350 from ctiller:jst 306ea577e1001d73ad1f7279d8752deca5fb3ef4
PiperOrigin-RevId: 750655367
2025-04-23 11:08:09 -07:00
Craig Tiller
f40bbaa7fc Event Engine write metrics
Sketched out an approach to customizable write metrics we discussed last week

In a nutshell:
- endpoints can advertise a set of metrics they provide (in our discussions we used a Span here, I realized during implementation I'd like wrapped endpoints to be able to extend this set, and so using a vector instead)
- endpoints also supply name and id queries for said metrics
- users of the api can request a set of events to callback on, and a set of metrics they're interested in, and a callback will be made when those events are ready with the set of metrics requested

PiperOrigin-RevId: 748559193
2025-04-16 23:23:35 -07:00