Commit Graph

1952 Commits

Author SHA1 Message Date
Yijie Ma fb4c043803 [Metrics] gRPC Non-Per-Call Metrics framework implementation (#35871)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35871 from yijiem:grpc-metrics 86ebe484ae
PiperOrigin-RevId: 609533796
2024-02-22 16:17:01 -08:00
Craig Tiller cf79445171 [chaotic-good] Fix channel creation (#35907)
Closes #35907

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35907 from ctiller:cucumber+carrot 185f65afb8
PiperOrigin-RevId: 607462304
2024-02-15 14:49:38 -08:00
Mark D. Roth 41606054c2 [load_file] remove grpc_load_file() in favor of grpc_core::LoadFile() (#35857)
Closes #35857

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35857 from markdroth:highlander 7b7d95aaa9
PiperOrigin-RevId: 605742734
2024-02-09 15:16:24 -08:00
Craig Tiller d1cb0c0874 [chaotic-good] Bring up core e2e tests (#35663)
Closes #35663

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35663 from ctiller:shush-e2e 0c1f82ed71
PiperOrigin-RevId: 605717663
2024-02-09 13:34:46 -08:00
Craig Tiller 576c37192c [cmake] build fix (#35661)
A fuzzer changed name, and we don't support building fuzzers with cmake.

Closes #35661

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35661 from ctiller:cmakey 9750b4c4ed
PiperOrigin-RevId: 601295049
2024-01-24 18:23:00 -08:00
Craig Tiller 870a66d9a0 [chaotic-good] Connection setup & test suites (#35650)
Closes #35650

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35650 from ctiller:shush-tsan fd55ea1be3
PiperOrigin-RevId: 601221780
2024-01-24 13:46:08 -08:00
Craig Tiller 1751f1043e [transport] Add a transport test suite for promise based transports (#35476)
Implemented for inproc & chaotic-good

Closes #35476

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35476 from ctiller:v3-svall 5358538d54
PiperOrigin-RevId: 599701775
2024-01-18 20:09:21 -08:00
Craig Tiller 98472179fb [promises] Add an observer type (#35552)
We've got a few situations coming up with promises that will want a "broadcast new value to everywhere" situation.

Closes #35552

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35552 from ctiller:obs 30fd697ae3
PiperOrigin-RevId: 599609399
2024-01-18 13:35:49 -08:00
Craig Tiller 584c0c0c98 [call-v3] Filter executor (#35533)
A call execution environment for the V3 runtime.

The `CallFilters` class will ultimately be a (private) member of `CallSpine`, and the `StackBuilder` component will be used by a channel when all of the filters it needs are known to allow the call spine to start processing a call.

This is accompanied by a reasonably extensive test suite.

I expect to fine tune semantics, implementation, and tests over the coming weeks/months as we iterate to bring up the rest of the pieces.

Closes #35533

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35533 from ctiller:filters 689c7b527b
PiperOrigin-RevId: 599220150
2024-01-17 10:39:37 -08:00
Craig Tiller c77ba326e9 [gprpp] Implement down_cast - a debug-time checked down cast (#35548)
Closes #35548

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35548 from ctiller:down_cast cd7501dadd
PiperOrigin-RevId: 599176414
2024-01-17 08:09:02 -08:00
Craig Tiller 9f6789e2b2 [chttp2] Rework settings management to be a c++ type (#35449)
Closes #35449

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35449 from ctiller:h2-settings f67e542a8b
PiperOrigin-RevId: 597970333
2024-01-12 15:21:05 -08:00
Craig Tiller 6cfa2e9edb [chaotic-good] Disable cmake tests - these are not interesting (#35486)
Closes #35486

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35486 from ctiller:phooey 310a5cc762
PiperOrigin-RevId: 597007485
2024-01-09 12:27:25 -08:00
Eugene Ostroukhov e73b76a7da [Test] Fix bug in waiting for the Orca OOB report (#35467)
Make sure there is no unnecessary delays when there are multiple reports in the queue.

This change also adds a test for the custom LB policy.

Closes #35467

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35467 from eugeneo:tasks/orca-test-timeout-316026521 4aab50a118
PiperOrigin-RevId: 597007131
2024-01-09 12:21:45 -08:00
Craig Tiller 86522af60d [chaotic-good] Client & server transport (#35400)
Adapts work from https://github.com/grpc/grpc/pull/34728 and previous changes from @nanahpang, implements new v3 filter/transport interface, and brings up the core of the chaotic good transport.

The next change will bring a more complete test suite (for this and inproc).

Closes #35400

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35400 from ctiller:v3-server 737ca5431a
PiperOrigin-RevId: 596621152
2024-01-08 09:46:16 -08:00
Craig Tiller a100e90f97 [chttp2] Remove a bunch of mostly-rolled-out experiments (#35426)
- `memory_pressure_controller` finally - allows deletion of pid_controller throughout the codebase
- `overload_protection` - one of the http2 rapid reset mitigations
- `red_max_concurrent_streams` - another http2 rapid reset mitigation

Closes #35426

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35426 from ctiller:new-years-cleanse 4651672e7e
PiperOrigin-RevId: 595205029
2024-01-02 14:07:55 -08:00
Craig Tiller 75e5ebcb14 [promises] Add a switch primitive (#35424)
Remove the old `switch` library - this used to be an implementation detail of `Seq`, `TrySeq` - but has become unused.

Add a new user facing primitive `Switch` that fills a similar role to `switch` in C++ - selecting a promise to execute based on a primitive discriminator - much like `If` allows selection based on a boolean discriminator now.

A future change will optimize this to actually lower the `Switch` into an actual `switch` statement, but for right now I want to get the functionality in.

Closes #35424

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35424 from ctiller:switchy 5308a914c6
PiperOrigin-RevId: 595140965
2024-01-02 09:59:38 -08:00
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 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
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 f11c010e51 [promises] Add awaitable spawn to Party (#34744)
Add a variant of `Spawn` that returns a promise that can be awaited by another activity.
This allows us to simply implement complex cross-activity synchronization.

(necessary building block for #34740)

Also adds an inter-activity latch as a building block to test this work.

Closes #34744

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34744 from ctiller:ninteen-ninety-nine 19074b255f
PiperOrigin-RevId: 582450643
2023-11-14 14:59:54 -08:00
Craig Tiller dc41f42073
[promises] Add some status-like types for TrySeq (#34906)
`StatusFlag` acts like a status, but is just a boolean (we don't want to
accidentally treat a boolean as something that indicates failure in case
it's not)

Similarly `ValueOrFailure` looks like `StatusOr` but reduces the failure
space to one value.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-11-10 09:14:44 -08:00
Craig Tiller 3964acc806
[promises] Add an intra-activity mutex type (#34824)
Modeled after mutexes in the Rust ecosystem: the mutex owns the data
provided, and acquisition of the mutex returns a handle with which to
manipulate that data.

This fits in nicely with the execution environment we've established
whereby we may want to pass the lock from lambda to lambda for some
time.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-11-08 16:41:26 -08:00
nanahpang 1e15d00ec4
[chaotic-good] Add client transport error handling. (#34611)
This is a follow-up PR of #34191, which handles the error condition of
endpoints failed to write/read in chaotic-good client transport.

This PR needs to be merged after #34191.

<!--

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.

-->
2023-11-08 14:42:20 -08:00
Vignesh Babu 77e9fe49aa
Revert "[security] Support a list of SSL ECs" (#34900)
Breaks internal tests
2023-11-08 14:05:02 -08:00
Yijie Ma d3828ebfbd
[Fork] Add ObjectGroupForkHandler fork-handling system (#33733)
<!--

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.

-->

---------

Co-authored-by: Bradley Hess <bdhess@google.com>
Co-authored-by: AJ Heller <hork@google.com>
2023-11-07 17:48:13 -08:00
Luwei Ge eaa72802a0
[security] Support a list of SSL ECs (#34867)
Addresses #23235
2023-11-03 14:17:28 -07:00
Gregory Cooke 0d4e1ef5df
[Security - Revocation] Crl Directory Watcher Implementation (#34749)
This adds the directory reloader implementation of the CrlProvider. This
will periodically reload CRL files in a directory per [gRFC
A69](https://github.com/grpc/proposal/pull/382)

Included in this is the following:
* A public API to create the `DirectoryReloaderCrlProvider`
* A basic directory interface in gprpp and platform specific impls for
getting the list of files in a directory (unfortunately prior C++17,
there is no std::filesystem, so we have to have platform specific impls)
* The implementation of `DirectoryReloaderCrlProvider` takes an
event_engine and a directory interface. This allows us to test using the
fuzzing event engine for time mocking, and to implement a test directory
interface so we avoid having to make temporary directories and files in
the tests. This is notably not in `include`, and the
`CreateDirectoryReloaderCrlProvider` is the only way to construct one
from the public API, so we don't expose the event engine and directory
details to the user.

---------

Co-authored-by: gtcooke94 <gtcooke94@users.noreply.github.com>
2023-11-03 20:48:05 +00:00
Matthew Stevenson 52f9e011f3
[tls] Allow skipping server cert verification when no default roots are present. (#34859)
This PR fixes a bug identified in #29667, where the TLS channel
credentials still require a trust bundle even if the user has explicitly
opted to not verify the server certificate. This PR is based on #29810.
2023-11-03 10:23:10 -07:00
Stanley Cheung fb5a3fad57
[PSM Interop] Exclude PSM interop test target from being built by cmake (#34836)
We added the `:grpcpp_csm_observability` dependency to the
`test/cpp/interop:xds_interop_<client|server>` target in
https://github.com/grpc/grpc/pull/34832, but those targets cannot be
built by cmake.

Cmake error:
https://source.cloud.google.com/results/invocations/5e30e5f6-684b-4103-b831-b154cb9ad712/targets/%2F%2Ftools%2Fbazelify_tests%2Ftest:runtests_cpp_linux_dbg_build_only/log

So we are trying to see if we can exclude those 2 targets from being
built by cmake
2023-10-31 20:16:17 -07:00
AJ Heller 6f0feaa43f
[test] Delete stranded event test (#34784)
This was a regression test for epollex, which was deleted. It
consistently takes 9 to 12 minutes to run.
2023-10-24 11:23:47 -07:00
Yash Tibrewal 77824d8093
[chttp2] Fix outgoing data stats (#34693)
Earlier, the grpc message-length prefix for outgoing data messages was
incorrectly being counted towards `data_bytes` instead of
`framing_bytes`. This PR fixes it.

Note that the incoming stats collection properly attributes the grpc
message-length prefix to `framing_bytes`.

This change will affect all stats plugins (OpenCensus and OpenTelemetry)
that make use of this information for metrics.
2023-10-23 17:04:48 -07:00
Craig Tiller 8f14e37b11
Revert "[chaotic-good] Add chaotic good client transport read (roll-forward)" (#34761)
Reverts grpc/grpc#34657
2023-10-20 08:19:56 -07:00
nanahpang a78145514d
[chaotic-good] Add chaotic good client transport read (roll-forward) (#34657)
Roll forward #34191, which is reverted due to error `2023-10-09
22:01:18,569 FAILED: cmake/build/client_transport_test
--gtest_filter=ClientTransportTest.AddMultipleStreams
GRPC_POLL_STRATEGY=none` (Removed uses_event_engine=False,
uses_polling=False in test build).

<!--

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.

-->
2023-10-19 18:01:49 -07:00
Gregory Cooke 9969d820b5
[TLS - Revocation] Crl Provider (#34715)
This reverts commit 7af5efcfd3.
2023-10-19 11:33:41 -07:00
apolcyn 7af5efcfd3
Revert "[TLS - Revocation] Crl Provider (#33786)" (#34713)
This reverts commit 0f0396ae92.
2023-10-17 13:53:36 -07:00
Craig Tiller 975184f04b
[channel-stack] Make ordering explicit (#32852)
Ditch the old priority scheme for ordering filters, instead explicitly
mark up before/after constraints.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-10-17 13:52:58 -07:00
Gregory Cooke 0f0396ae92
[TLS - Revocation] Crl Provider (#33786)
The basic APIs for the CRL Reloading features.
This adds external types to represent CRL Providers, CRLs, and
CertificateInfo.
Internally we will use `CrlImpl` - this layer is needed to hide OpenSSL
details from the user.

GRFC - https://github.com/grpc/proposal/pull/382

Things Done
* Add external API for `CrlProvider`, `Crl`, `CertInfo` (`CertInfo` is
used during CRL lookup rather than passing the entire certificate).
* Add code paths in `ssl_transport_security` to utilize CRL providers
* Add `StaticCrlProvider`
* Refactor `crl_ssl_transport_security_test.cc` so it is more extensible
and can be used with providers
2023-10-17 13:03:52 -04:00
Craig Tiller bfb98d89ec
[testing] Add a test of server handling of calls that expired in the request matcher (#34679)
Also expand core_end2end_test suite to allow testing of server
registered methods

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-10-13 13:44:53 -07:00
Craig Tiller 7c59c09f43
[chttp2] Bound write sizes based on observed write performance (#34665)
Instead of fixing a target size for writes, try to adapt it a little to
observed bandwidth.

The initial algorithm tries to get large writes within 100-1000ms
maximum delay - this range probably wants to be tuned, but let's see.

The hope here is that on slow connections we can not back buffer so much
and so when we need to send a ping-ack it's possible without great
delay.
2023-10-12 16:48:55 -07:00
Craig Tiller c9df0ca470
[cpp] Reland removal of channel_filter code (#34598)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-10-12 09:44:11 -07:00
Mark D. Roth be1cf357ba
[FuzzingEventEngine] fix TickForDuration() bug and add test (#34633)
The `TickForDuration()` method was using `grpc_core::Timestamp::Now()`
to get the current time, but that was not in sync with the `now_` value
inside the Fuzzing EE itself, with the result that after two subsequent
250ms increments, timers were not being properly fired. I've added a
test that demonstrates this failure without the fix.
2023-10-11 08:25:57 -07:00
Craig Tiller 6a49e953a4
[chttp2] Experiments for rst_stream pushback (#34642)
Experiment 1: On RST_STREAM: reduce MAX_CONCURRENT_STREAMS for one round
trip.
Experiment 2: If a settings frame is outstanding with a lower
MAX_CONCURRENT_STREAMS than is configured, and we receive a new incoming
stream that would exceed the new cap, randomly reject it.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-10-10 19:21:41 -07:00
Craig Tiller 98c7e8fb12
Revert "[chaotic-good] Initial change of chaotic-good client-read path." (#34649)
Reverts grpc/grpc#34191
2023-10-10 12:29:04 -07:00
nanahpang ce75ec23a1
[chaotic-good] Initial change of chaotic-good client-read path. (#34191)
This is the initial change of chaotic-good client transport read path,
which is a following PR of the client transport write path at #33876.
There's a pending work of handling endpoint failures in the transport.
It will be added after we have the inter-activity pipe with close
function.
<!--

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.

-->
2023-10-09 14:09:54 -07:00
Mark D. Roth 01907a7767
[ring_hash] add test and make some minor fixes and improvements (#34610)
- Fixes support for the same address being present more than once in the
address list, which was accidentally broken in #34244.
- Change the call attribute to encode the hash as an integer instead of
a string.
2023-10-09 10:32:59 -07:00
Mark D. Roth 36b70504e5
[outlier detection] support multiple addresses per endpoint (#34526) 2023-10-04 16:25:23 -07:00
Craig Tiller 7b17e4aa92
Revert "[cpp] Remove legacy channel filter C++ wrapper" (#34541)
Reverts grpc/grpc#34522
2023-09-28 22:29:53 -07:00
Craig Tiller 727c92a15c
[cpp] Remove legacy channel filter C++ wrapper (#34522)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-28 20:59:56 -07:00
Craig Tiller a17f08b49d
[chttp2] Continue refactoring towards promises (#34437)
Isolate ping callback tracking to its own file.
Also takes the opportunity to simplify keepalive code by applying the
ping timeout to all pings.
Adds an experiment to allow multiple pings outstanding too (this was
originally an accidental behavior change of the work, but one that I
think may be useful going forward).

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-09-28 13:14:05 -07:00
Gregory Cooke 8d62fc2b0b
[Test] Add concurrent test for session reuse (#34293)
Add a test that runs concurrent requests using session caching.
2023-09-14 14:43:43 -04:00