Commit Graph

16379 Commits

Author SHA1 Message Date
Craig Tiller 8448d499e2 [promises] Add `AllOk` combinator (#35304)
`AllOk` runs a set of promises concurrently, and like `TryJoin` waits for them all to succeed or one to fail.
Unlike `TryJoin` it returns a single unified status of the composition, so cannot handle member promises that might return `StatusOr` or the like.

Closes #35304

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35304 from ctiller:all-review 30f5f809c6
PiperOrigin-RevId: 591031189
2023-12-14 13:21:35 -08:00
Yijie Ma 90cdff5a3c [EventEngine] Returns error instead of assertion when hostname is empty (#35306)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35306 from yijiem:dns-empty-hostname 9c7f67c27a
PiperOrigin-RevId: 591028370
2023-12-14 13:03:55 -08:00
Craig Tiller b455726401 [call-v3] Convert server auth filter (#35299)
Closes #35299

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35299 from ctiller:v3-server-auth 32c3ee4821
PiperOrigin-RevId: 591000230
2023-12-14 11:22:42 -08:00
AJ Heller a0cab8318d [EventEngine] Replace Executor with EE::Run in Client Reactor (#35295)
Closes #35295

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35295 from drfloob:client-callback-reactor-ee de095c7f5c
PiperOrigin-RevId: 590983428
2023-12-14 10:41:56 -08:00
Craig Tiller def3288d93 [call-v3] Add some initialization support for the new call architecture (#35301)
Closes #35301

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35301 from ctiller:init-call-review a2022cc485
PiperOrigin-RevId: 590982608
2023-12-14 10:32:58 -08:00
Craig Tiller 96ac691531 [promises] poll_cast improvements (#35302)
Make it possible to `poll_cast<>` from a normal non-poll type to a Poll<T>

Closes #35302

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35302 from ctiller:poll-review 216916e7c3
PiperOrigin-RevId: 590979951
2023-12-14 10:23:37 -08:00
ericsalo 3b1b2cabdc [upb] stop calling hazzers for repeated fields (#35275)
The upb gencode is being changed to no longer generate _has_() functions for repeated fields as they are redundant and really only intended for scalar fields with presence. So instead of calling foo_has_bar(msg), one now calls foo_bar(msg, &size) to get the number of elements in the repeated field.

Closes #35275

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35275 from ericsalo:master 90db1ffe0e
PiperOrigin-RevId: 590948259
2023-12-14 08:55:21 -08:00
Craig Tiller 4e666c740b Internal change
PiperOrigin-RevId: 590780731
2023-12-13 20:06:30 -08:00
Craig Tiller d00582bd82 Fix fuzzer bug b/309756937 (#35279)
Built on #35278, which should be landed first

Always fail parsing when `grpclb_client_stats` is included in headers -- it's a meaningless value and the only reason to include it would be some sort of attack.

Closes #35279

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35279 from ctiller:fuzz-309756937 545448c4de
PiperOrigin-RevId: 590745978
2023-12-14 03:44:03 +00:00
Tanvi Jagtap 8019903a44 Internal configuration cleanup
PiperOrigin-RevId: 590528536
2023-12-14 03:42:30 +00:00
Craig Tiller a04188b29f [inproc] Promise based inproc transport (#35281)
Closes #35281

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35281 from ctiller:cg-inproc 3fe1bce51b
PiperOrigin-RevId: 590425232
2023-12-12 20:08:30 -08:00
Craig Tiller 75686ed19d [channel-args] Optimize channel args to string (#35286)
One of the more major CPU sinks for b/311358095

Closes #35286

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35286 from ctiller:fuzz-311358095 ad4278937f
PiperOrigin-RevId: 590247206
2023-12-12 10:13:23 -08:00
Craig Tiller 9118cb1a55 Fix fuzzer bug b/309716763 (#35278)
Also cleanup a little so we're not copying redundant frame headers everywhere.

Closes #35278

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35278 from ctiller:fuzz-309716763 52589ff422
PiperOrigin-RevId: 590042072
2023-12-11 20:21:36 -08:00
Craig Tiller ff63ad9413 [call-v3] Convert message compression filter (#35269)
Closes #35269

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35269 from ctiller:cg-compress 0304821f07
PiperOrigin-RevId: 590010564
2023-12-11 17:58:00 -08:00
Craig Tiller a7e90045db [promises] Fix fuzzer found uncancelable call bug in client promise code (#34909)
Closes #34909

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34909 from ctiller:lambda-mcfly 92f759d763
PiperOrigin-RevId: 589989462
2023-12-11 16:35:55 -08:00
Craig Tiller b63a21b419 [inproc] Call out requirements for inproc transport experiment (#35267)
Closes #35267

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35267 from ctiller:cg-experiment-requires 242a3cd21a
PiperOrigin-RevId: 589932835
2023-12-11 13:38:45 -08:00
Craig Tiller 57dacad8c7 [call-v3] Idle/max-age filters (#35270)
Closes #35270

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35270 from ctiller:cg-idle 5312003ca6
PiperOrigin-RevId: 589913523
2023-12-11 12:45:34 -08:00
Gregory Cooke a5c71e132e [Security - TLS] DirectoryReloaderCrlProvider construction time bug fix (#35247)
The `DirectoryReloaderProvider` currently segfaults on construction if grpc_init() is not called before construction. This is because when creating the `DirectoryReloaderCrlProvider` we [call GetDefaultEventEngine](a58f3f2df5/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc (L152)), and getting the default event engine requires that `grpc_init` is called.

This PR adds a test that catches the segfault and adds `grpc_init` and `grpc_shutdown` to the ctor and dtor of `DirectoryReloaderCrlProvider` so that the test passes.

Closes #35247

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35247 from gtcooke94:crl_provider_init_fix 25f3dc7f27
PiperOrigin-RevId: 589885254
2023-12-11 11:25:49 -08:00
Luwei Ge dd12460018 [tls] Add set min/max TLS version APIs to TLS credentials APIs. (#34861)
Address #28382. This is a recreation of #31368 except e2e tests are not handled here (yet).

Closes #34861

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34861 from rockspore:tls_version f9a1215ac1
PiperOrigin-RevId: 589847110
2023-12-11 09:27:44 -08:00
Craig Tiller 71367424d6 [call-v3] Make call traces show useful information (#35262)
Closes #35262

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35262 from ctiller:cg-call-trace 16ea4c8807
PiperOrigin-RevId: 589637737
2023-12-10 14:44:02 -08:00
Craig Tiller 2fde70a6be [call-v3] Generic forwarder from a CallHandler to a CallInterceptor (#35256)
Closes #35256

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35256 from ctiller:cg-fwd-call cdaae8bccd
PiperOrigin-RevId: 589278551
2023-12-08 16:56:33 -08:00
Yijie Ma 86d90f54b0 [EventEngine] Skip `dns_resolver_cooldown_test` for `event_engine_dns` experiment (#35251)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35251 from yijiem:fix-dns-resolver-cooldown-test 857835200a
PiperOrigin-RevId: 589159895
2023-12-08 09:47:36 -08:00
Vignesh Babu f0d7df79da [EventEngine] Add virtual a MakeSlice method into MemoryAllocatorImpl and move its default implementation to GrpcMemoryAllocatorImpl
PiperOrigin-RevId: 589155443
2023-12-08 09:32:41 -08:00
Craig Tiller 257efc0375 [call-v3] Add a hook to deadline filter (#35252)
Still need to figure a better long term strategy here, but this 'works for now'

Closes #35252

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35252 from ctiller:cg-deadline a413955afc
PiperOrigin-RevId: 588980941
2023-12-07 19:26:01 -08:00
Alisha Nanda 8cfce72868 [server] Remove per-channel registered methods map (#35231)
https://github.com/grpc/grpc/pull/34286 was split into two parts - the first part was submitted in https://github.com/grpc/grpc/pull/34612, to move to absl::flat_hash_map for per-channel registered methods map, and this is the second part to remove the per-channel map and switch to using per-server.

Closes #35231

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35231 from ananda1066:remove_rm2 6b154545bf
PiperOrigin-RevId: 588928459
2023-12-07 15:34:36 -08:00
Craig Tiller 22537cb193 [call-v3] Convert server-call-tracer filter (#35249)
Closes #35249

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35249 from ctiller:cg-server-call-tracer ad52acb64f
PiperOrigin-RevId: 588885615
2023-12-07 13:19:51 -08:00
Craig Tiller 5f92a67f94 [call-v3] Convert message size filter to new API (#35233)
Closes #35233

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35233 from ctiller:cg-msg-size cce51d8bd5
PiperOrigin-RevId: 588793125
2023-12-07 08:05:20 -08:00
Craig Tiller 6c816a4f99 [call-v3] Re-add accidentally deleted comment (#35235)
Closes #35235

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35235 from ctiller:cg-fix-comment2 5abebaaadb
PiperOrigin-RevId: 588544922
2023-12-06 14:33:43 -08:00
Yijie Ma 1abfc97502 [EventEngine] Posix NativeDNSResolver implementation (#35153)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35153 from yijiem:native_dns_resolver a4107f7d81
PiperOrigin-RevId: 588543137
2023-12-06 14:25:38 -08:00
Anirudh Ramachandra a58f3f2df5 [core] Add support for RefIfNonZero in InternallyRefCounted. (#34869)
The support already exists in RefCounted and DualRefcounted, so expose similar API for InternallyRefCounted class

Closes #34869

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34869 from anicr7:orphanable_ref_if_nonzero f57c64dc62
PiperOrigin-RevId: 588514955
2023-12-06 13:01:20 -08:00
Mark D. Roth 626bf5351b [experiments] extend a bunch of experiments for a few months (#35230)
Closes #35230

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35230 from markdroth:experiments_extend ea733a4840
PiperOrigin-RevId: 588514902
2023-12-06 12:53:01 -08:00
Craig Tiller 295b665a18 [call-v3] Add CallInitiator, CallHandler wrappers around CallSpine (#35223)
Closes #35223

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35223 from ctiller:cg-initiator 78826d99c5
PiperOrigin-RevId: 588481455
2023-12-06 10:59:47 -08:00
Mark D. Roth e497eed251 [XdsCertificateProvider] clean up some cruft (#35227)
- Remove old-style channel args utility methods, which are unused.
- Change `ChannelArgsCompare()` to delegate to the `Compare()` method.

Closes #35227

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35227 from markdroth:xds_cert_provider_cleanup 57dc0c0757
PiperOrigin-RevId: 588440245
2023-12-06 08:49:17 -08:00
Craig Tiller e8d9f222f5 [server] Make SetRegisteredMethodOnMetadata a method, not a static member fn (#35221)
As part of the call-v3 work I'll be making a call to this code via a different path shortly, and separating the C-style callback piece out helps that work

Closes #35221

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35221 from ctiller:cg-registered-method 4b6d80ee7f
PiperOrigin-RevId: 588200784
2023-12-05 15:08:18 -08:00
Craig Tiller 2fa8018d2a [call-v3] Introduce some cancellation helpers to CallSpine (#35212)
These will be used in upcoming changes to allow easy spawning of promises into parties that properly cancel out things when those promises fail.

Closes #35212

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35212 from ctiller:cg-cancel-nicely 32fc7aa09a
PiperOrigin-RevId: 588130225
2023-12-05 11:13:23 -08:00
Craig Tiller 9eadf42dbf [promises] Add an API to access new style filters (#35200)
Will be used during this transition time to run 5-pipe style filters somewhat more natively. Once everything is getting closer to 5-pipes, we'll drop this method and have the channel stack understand how to create an interception-map that can be reused per-call, instead of creating the interception-map every time a call is created.

Closes #35200

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35200 from ctiller:cg-channel-filter-api 2fc11dd273
PiperOrigin-RevId: 587940947
2023-12-04 22:12:37 -08:00
Craig Tiller 01fb4a0fe4 [experiments] Clean up some rolled out experiments (#35195)
Closes #35195

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35195 from ctiller:cleanup-cleanup 1f22298ac9
PiperOrigin-RevId: 587857022
2023-12-04 15:17:42 -08:00
ericsalo 16fb6bf640 [upb] Update "upb::SymbolTable" to "upb::DefPool" (#35208)
The old name has been deprecated for a while so this should be safe. Also update variable names accordingly.

<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35208 from ericsalo:master 80beea4920
PiperOrigin-RevId: 587845096
2023-12-04 14:40:14 -08:00
Craig Tiller 501b895736 [fuzzing-heck] Fix a bug that comes up with promises + work serializer dispatch (#35196)
b/310341170

I'm kind of proud of our testing for finding this

Closes #35196

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35196 from ctiller:fuzz-no 28c95606f9
PiperOrigin-RevId: 587798657
2023-12-04 12:06:19 -08:00
Craig Tiller 7047cc17a8 [promises] Migrate http server filter to new API (#35197)
Closes #35197

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35197 from ctiller:cg-http-svr cdde418a81
PiperOrigin-RevId: 587178983
2023-12-01 18:01:48 -08:00
Craig Tiller addd18b186 [channel-args] Enforce const-correctness for RefCounted<const T> values (#35199)
Closes #35199

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35199 from ctiller:refcount a3f856858a
PiperOrigin-RevId: 587178819
2023-12-01 17:54:09 -08:00
Mark D. Roth 1d4ecf6629 [RefCounted] allow RefCounted<> to work for const types (#35188)
Closes #35188

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35188 from markdroth:ref_counted_const e2dc753b6b
PiperOrigin-RevId: 587081377
2023-12-01 12:14:53 -08:00
Vignesh Babu 84678829af [EventEngine] Add public methods to allow EventEngine Endpoints to support optional Extensions.
PiperOrigin-RevId: 587071965
2023-12-01 11:43:08 -08:00
Craig Tiller 49f7ee96d1 [promises] Convert http-client filter to v3 filter API (#35189)
Also start building a temporary wrapping layer so that the new style filters can execute as promise filters directly.

Closes #35189

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35189 from ctiller:cg-http-cli dbd73e8aca
PiperOrigin-RevId: 587060881
2023-12-01 11:09:06 -08:00
Craig Tiller e481f6acc5 [promises] Generate a better error message for a common mistake (#35191)
Closes #35191

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35191 from ctiller:cg-promise-like-fix 0683ffe169
PiperOrigin-RevId: 587026178
2023-12-01 09:07:10 -08:00
Craig Tiller e348d65bc7 [promises] Add some niceties for StatusFlag, ValueOrFailure
PiperOrigin-RevId: 586804010
2023-11-30 15:25:33 -08:00
AJ Heller be4d2a6d8b [core] Ensure ChannelArgs::SetObject only allows conforming shared_ptr<T> classes (#35008)
ChannelArgs shared_ptr only supports types that extend `enable_shared_from_this`. `args.SetObject<shared_ptr<X>>(x)` with a non-comforming type X will now fail with something like:

```
./src/core/lib/channel/channel_args.h:453:12: error: no matching member function for call to 'Set'
    return Set(ChannelArgNameTraits<T>::ChannelArgName(), std::move(p));
           ^~~
test/core/channel/channel_args_test.cc:352:32: note: in instantiation of function template specialization 'grpc_core::ChannelArgs::SetObject<X>' requested here
  grpc_core::ChannelArgs b = a.SetObject(x);
                               ^
..
```

Closes #35008

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35008 from drfloob:channel-args-cant-set-unsupported-shared-ptr-type dc93f27ac7
PiperOrigin-RevId: 586766674
2023-11-30 13:17:27 -08:00
Mark D. Roth f9e56a9467 [TLS certificate provider] remove pollset_set from cert provider API (#35013)
We have no cert providers today that actually use iomgr polling, so this API is not actually used anywhere.  And even if we wanted to add a cert provider that did use iomgr polling, I don't think it would work correctly, because we are plumbing the pollset_set linkage only for XdsCredentials, not for normal TlsCredentials.

Closes #35013

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35013 from markdroth:cert_provider_remove_pollset_set 383cd02ffb
PiperOrigin-RevId: 586743891
2023-11-30 11:53:54 -08:00
Mark D. Roth f356ef47e6 [experiments] extend expiration of happy eyeballs experiment (#35181)
Closes #35181

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35181 from markdroth:happy_eyeballs_experiment_expiration 5da6d05f61
PiperOrigin-RevId: 586709581
2023-11-30 10:09:20 -08:00
aeitzman 79c9a67dee [core/security] Adding metrics header to sts request for external account credentials (#34661)
Closes #34661

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34661 from aeitzman:metrics 9f53992ed4
PiperOrigin-RevId: 585796526
2023-11-27 16:48:36 -08:00