Commit Graph

6435 Commits

Author SHA1 Message Date
Eugene Ostroukhov 4e735be35a [xds] Fallback implementation (#36145)
As per [gRFC A71](https://github.com/grpc/proposal/blob/master/A71-xds-fallback.md).

Closes #36145

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36145 from eugeneo:fallback-review 4871c0b316
PiperOrigin-RevId: 623211613
2024-04-09 10:38:01 -07:00
Craig Tiller b0cf42d86e [clang-format] Remove requirement that port_platform.h is at the top (#36281)
Closes #36281

PiperOrigin-RevId: 623176865
2024-04-09 08:58:34 -07:00
AJ Heller 798399b984 Automated rollback of commit 7c57fb70e9.
PiperOrigin-RevId: 622990471
2024-04-08 17:03:32 -07:00
Yash Tibrewal 70839a9b19 [OTel C++] Add experimental optional locality label available to client per-attempt metrics (#36254)
As per https://github.com/grpc/proposal/pull/419, the experimental optional label `grpc.lb.locality` is added to the follow per-call metrics -
* grpc.client.attempt.duration
* grpc.client.attempt.sent_total_compressed_message_size
* grpc.client.attempt.rcvd_total_compressed_message_size

Closes #36254

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36254 from yashykt:OTelOptionalLabelsOnPerCall c5390c99a1
PiperOrigin-RevId: 622973959
2024-04-08 15:52:59 -07:00
AJ Heller 7c57fb70e9 [surface] Add an API to inject connected endpoints into servers (#35957)
Closes #35957

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35957 from drfloob:endpoint-infusion abdb9939c5
PiperOrigin-RevId: 622939183
2024-04-08 13:42:57 -07:00
Tanvi Jagtap ddb785674c [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36223)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging - GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK

Will not be replacing CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites.

This could be done using Cider-V once these changes are submitted if we want to clean up later. Given that we have 4000+ instances of GPR_ASSERT to edit, Doing it manually is too much work for both the author and reviewer.

<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36223 from tanvi-jagtap:assert_grpclb 205ba1d023
PiperOrigin-RevId: 622378411
2024-04-05 23:14:29 -07:00
Yijie Ma d37726298b [OpenTelemetry] Implement async gauges (#36182)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36182 from yijiem:grpc-metrics-async-gauge 8614485f3d
PiperOrigin-RevId: 622182710
2024-04-05 08:14:44 -07:00
AJ Heller f238e5399c [security] Reland: Refactor credentials types to remove special handling for insecure creds (#36242)
See #36176. The only difference is a temporary shim for Secure credentials types, which was already discussed and approved separately.

Closes #36242

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36242 from drfloob:reland/36176 f07bebe289
PiperOrigin-RevId: 621879911
2024-04-04 09:20:02 -07:00
Yash Tibrewal 952a2421f9 [OTel C++] Add API to set channel scope filter (#36189)
Also addressing a TODO from previous PRs where `authority` is not being populated in the `ChannelScope`.

Closes #36189

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36189 from yashykt:OTelChannelScope e76f9ce0ca
PiperOrigin-RevId: 621231764
2024-04-02 11:06:03 -07:00
AJ Heller da43a61322 Automated rollback of commit 822311c0d9.
PiperOrigin-RevId: 621025232
2024-04-01 19:51:52 -07:00
AJ Heller 822311c0d9 [security] Refactor credentials types to remove special handling for insecure creds (#36176)
Forked from #35957

This PR refactors the credentials types to remove Secure and Insecure Channel and Call credentials types. We standardize on a `c_creds()` accessor method for all credentials types, which can now be treated uniformly. This notably removes special-case handling of insecure credentials.

The special code-paths for insecure creds are no longer necessary in the wake of #25586.

Closes #36176

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36176 from drfloob:fork/35957/creds-API fd64d59c23
PiperOrigin-RevId: 621008166
2024-04-01 18:12:59 -07:00
Alexander Polcyn 1abd28eb3b Log c++ interop "soak" results at INFO instead of DEBUG
PiperOrigin-RevId: 620955008
2024-04-01 14:34:25 -07:00
Craig Tiller 26df942eb4 [build] Stop compiling every test.cc file for every config (#36197)
Instead, build a library and re-use that across compilations.

This still invokes a link step per target, and we'll want to deal with that at some point too, but at least this makes some progress to not being as wasteful with our compilation resources.

Additionally: remove bm_pollset -- it was having some problems compiling, and we really don't need it anymore.

Closes #36197

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36197 from ctiller:maintain-this-shite 9955026e23
PiperOrigin-RevId: 620946543
2024-04-01 14:04:25 -07:00
Craig Tiller 8b8f43aecf [metadata] Remove arena from `grpc_metadata_batch` constructor (#36118)
Internally, use `std::vector` instead of `ChunkedVector` to hold extra metadatum.

I'm not totally convinced this is the right move, so it's going to be a try it and monitor for a month or so thing... I might roll back if performance is actually affected (but I think we'll see some wins and losses and overall about a wash).

Closes #36118

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36118 from ctiller:YUPYUPYUP 68e0acd0a2
PiperOrigin-RevId: 620902195
2024-04-01 11:23:54 -07:00
apolcyn d1287ad07a [build] create xds_end2end_test_lib visibility tag (#36187)
As title

Closes #36187

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36187 from apolcyn:vis_tag 6ce3930e3f
PiperOrigin-RevId: 619955425
2024-03-28 17:36:49 +00:00
Yash Tibrewal 1312ff0625 [OTel C++] Add APIs to enable/disable metrics (#36183)
Closes #36183

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36183 from yashykt:OTelEnableDisableMetrics 948abe7235
PiperOrigin-RevId: 619696880
2024-03-28 17:35:14 +00:00
Yash Tibrewal 95c4f32b23 [RegisteredMethod] Remove experiment (#36181)
Closes #36181

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36181 from yashykt:RemoveRegisteredMethodLookupInTransport 3709bfa1cf
PiperOrigin-RevId: 619695276
2024-03-28 17:34:39 +00:00
AJ Heller 3d82c522fa [EventEngine] Refactor ServerCallbackCall to use EventEngine::Run (#36126)
This removes two Executor::Run dependencies, and requires that all ServerCallbackCall implementations implement the new `RunAsync` method. There's one other known other implementation of ServerCallbackCall that will need to be updated.

We could also support an "inefficient" path that uses the default engine (not implemented here), for all subclasses that do not want to update. As far as anyone is aware, the ServerCallbackCall class was never intended to be subclassed externally.

Closes #36126

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36126 from drfloob:server-callback-on-ee 6242a78a3f
PiperOrigin-RevId: 619621598
2024-03-28 17:34:00 +00:00
Yijie Ma c54c69dcdd [Metrics] New OpenTelemetry Plugin Implementation of Stats Plugin (#36070)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36070 from yijiem:grpc-metrics 72653727b1
PiperOrigin-RevId: 618529035
2024-03-23 19:37:26 -07:00
Yash Tibrewal a1535ae615 [CSM] Cleanup and test Size() on MeshLabelsIterable (#35769)
Adding testing for `Size()` on `MeshLabelsIterable` as promised on https://github.com/grpc/grpc/pull/35371

This method doesn't get used the OTel C++ library at present so it was untested earlier, and bugs in its implementation were noticed later. To avoid that issue in the future, adding manual testing of this method.

Changes -
* Moved `MeshLabelsIterable` to the header to be able to test its Size method directly. Also had to move around some internals to be able to do so.
* Replaced `absl::variant<grpc_core::Slice, StructPb> metadata_` from decoding the metadata lazily to just decoding it in the constructor. I don't remember the original thinking behind this. Maybe I wanted the decoding to happen lazily, but there doesn't seem to be much gain from doing it lazily, we instead have to deal with the overhead of `variant`.

Closes #35769

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35769 from yashykt:CsmMeshLabelsIterableSizeTesting ec9033b742
PiperOrigin-RevId: 617901839
2024-03-21 11:06:08 -07:00
Mark D. Roth 733e904491 [XdsClient] implement non-per-call metrics (#36020)
As per gRFC A78 (https://github.com/grpc/proposal/pull/419).

Closes #36020

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36020 from markdroth:non_per_call_metrics_xds c1d9b464bf
PiperOrigin-RevId: 617320495
2024-03-19 16:00:32 -07:00
Gregory Cooke c68e6c27ca [Security Tests - Crl Provider] Fix inconsistent directory related tests (#36122)
There were some failures in the Crl Directory related tests after https://github.com/grpc/grpc/pull/36031

This came down to https://github.com/grpc/grpc/pull/36031 adding some CRLs with bad qualities (invalid content/signatures, overriding issuer names) to the `test_creds/crl_data/crls` directory, which is used in the directory reloading tests. The tests began failing on some platforms because they were picking up these bad crls which were failing various checks, but the test was designed to assume that `test_creds/crl_data/crls` was a valid and good directory.
This PR moves the bad CRLs to their own directory to prevent this accidental mash-up of test data. It also adds debug logging to our custom verification stack.

Closes #36122

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36122 from gtcooke94:crl_fix 508dd1370d
PiperOrigin-RevId: 616280898
2024-03-15 17:00:57 -07:00
Yash Tibrewal 1ce894c977 [OTel] Add CI support for tests via CMake (#36087)
Earlier, the tests just had bazel support. With CMake support added in #36063, we can also add CI CMake support for the tests. A major benefit of this is that we also get coverage for the various platforms that we test from our portability test suite.

Closes #36087

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36087 from yashykt:OTelCISupport b28fbe02e5
PiperOrigin-RevId: 615543685
2024-03-13 14:28:41 -07:00
Vignesh Babu 9ed686902e [chttp2-server] Handle error cases correctly when limiting number of accepted connections (#36101)
Closes #36101

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36101 from Vignesh2208:server-fix 41d6992b5c
PiperOrigin-RevId: 615480491
2024-03-13 11:12:21 -07:00
Mark D. Roth 390fef0590 [RR and WRR] clean up dualstack experiments (#35135)
Closes #35135

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35135 from markdroth:dualstack_rr_wrr_cleanup 438b29df5c
PiperOrigin-RevId: 615208297
2024-03-12 16:26:41 -07:00
Eugene Ostroukhov 57ff0b890f [xds] Support for multiple servers in the bootstrap.json (#36021)
Closes #36021

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36021 from eugeneo:tasks/multiple-servers-bootstrap 8ebf7e1c06
PiperOrigin-RevId: 615150672
2024-03-12 13:24:08 -07:00
Vignesh Babu 7533328075 [server] Allow configuring max incoming connections at the server (#36088)
Closes #36088

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36088 from Vignesh2208:server-fix e62a8f7ae7
PiperOrigin-RevId: 614729878
2024-03-11 11:17:34 -07:00
Yash Tibrewal 3032b5c48d [OTel C++] Add CMake build support (#36063)
Changes -
* Add CMake build support to `grpcpp_otel_plugin`. Currently, we are only supporting the `find_package CONFIG` method for depending on `opentelemetry-cpp`.
* Since, `grpcpp_otel_plugin` is an extension of gRPC, it will not be built by default. To enable building of this target, a new CMake option `gRPC_BUILD_GRPCPP_OTEL_PLUGIN` is being added.
* Also add `CMakeLists.txt` to the otel example.

The `otel_plugin_test` can also be built through cmake but, for the CI to work, there are some additional changes. Those will be made in an upcoming PR.

Closes #36063

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36063 from yashykt:OTelCMakeSupport 3bc783823b
PiperOrigin-RevId: 613734473
2024-03-07 16:12:10 -08:00
Alexander Polcyn 419a070078 Allow configuring server_notify_client_when_started field in xds e2e test lib
While we're here, also change the Echo service handler to mutate clients before handling the RPC, mainly so that it can be reasoned about in cases involving client cancellation.

PiperOrigin-RevId: 613029541
2024-03-05 17:57:46 -08:00
AJ Heller 25ef96c4ad [test] Enable callback benchmarks (#36055)
Closes #36055

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36055 from drfloob:enable-callback-benchmarks 42283a52c9
PiperOrigin-RevId: 612975697
2024-03-05 14:47:25 -08:00
Alexander Polcyn 6f6f0df2ba Make TestServiceSignaller more generically useful
There are tests in another change I'm working on for which we need to do things like:

1) waiting for N RPCs to concurrently pile up on a server

2) doing 1) multiple times sequentially on the same server

PiperOrigin-RevId: 612934305
2024-03-05 12:40:05 -08:00
Mark D. Roth db9ca10b35 [xDS] add optional locality label to per-call metrics (#36049)
Closes #36049

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36049 from markdroth:xds_locality_label_on_per_call_metrics 9c5aeb7fb1
PiperOrigin-RevId: 612648213
2024-03-04 17:43:49 -08:00
Craig Tiller 427c8a89e9 [chaotic-good] Add a microbenchmark for ping pong round trips (#36050)
also:
- remove tail recursion from promise endpoint read completion (actually overflowed stack!)
- remove retry filter from benchmark - we probably don't want this long term, but for now nobody else is using this benchmark and our use case doesn't use grpc retries so.... good enough

Closes #36050

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36050 from ctiller:cgbm 65b1c26767
PiperOrigin-RevId: 612577071
2024-03-04 14:07:28 -08:00
Mark D. Roth c43f1a63b0 [RLS] implement non-per-call metrics (#36001)
Closes #36001

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36001 from markdroth:non_per_call_metrics_rls b713980f21
PiperOrigin-RevId: 612532005
2024-03-04 11:58:31 -08:00
Mark D. Roth 0213523907 [build] move channel out of grpc_base (#35924)
This adds the following new targets:
- `channel`: A virtual interface for a channel.
- `legacy_channel`: A channel implementation that supports the filter stack and call v2.
- `channel_create`: A standalone function to create a channel.
- `server_interface`: A base class with a few accessor methods used in surface/call.cc.
- `server`: The actual server implementation.
- `api_trace`, `call_tracer`, `server_call_tracer_filter`, `call_finalization`: These were split out of `grpc_base` to avoid various dependency problems.
- `compression`: This is a combination of the previously existing `compression_internal` target and the compression code that was part of `grpc_base`.

Closes #35924

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35924 from markdroth:channel_interface 94a7fffddb
PiperOrigin-RevId: 612512438
2024-03-04 11:07:17 -08:00
Mark D. Roth 40577dd585 [WRR] implement non-per-call metrics (#35977)
As per gRFC A78 (https://github.com/grpc/proposal/pull/419).

Note that these new metrics are populated only if the `wrr_delegate_to_pick_first` experiment is enabled, which is the case by default.

Closes #35977

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35977 from markdroth:non_per_call_metrics_wrr 7acea32fc4
PiperOrigin-RevId: 610760874
2024-02-27 08:32:09 -08:00
Eugene Ostroukhov 70af2c2fda [xds] xDS client per data plane target (#35730)
Closes #35730

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35730 from eugeneo:tasks/multiple-xds-clients 30b459658e
PiperOrigin-RevId: 610511488
2024-02-26 13:38:21 -08:00
AJ Heller 6c29a8720e [test] Remove passthru_endpiont and its microbenchmarks (#35986)
Closes #35986

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35986 from drfloob:rm-passthru-endpoint 12c491f7f6
PiperOrigin-RevId: 609800868
2024-02-23 12:13:24 -08:00
Yijie Ma 9db40fa845 [EventEngine] Enable the EventEngine DNS Resolver on Posix (#35573)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35573 from yijiem:enable-oss-ee-dns-posix-real 1df91d1d84
PiperOrigin-RevId: 609193851
2024-02-21 18:35:54 -08:00
Mark D. Roth cfcbb0a535 [build] move parts of the `grpc_client_channel` BUILD target out into their own targets (#35879)
This breaks the following pieces out of the `grpc_client_channel` BUILD target:
- backend_metric_parser
- oob_backend_metric
- child_policy_handler
- backup_poller
- service_config_channel_arg_filter
- client_channel_channelz
- client_channel_internal_header
- subchannel_connector
- subchannel_pool_interface
- config_selector
- client_channel_service_config_parser
- retry_service_config_parser
- retry_throttle

The code left in the `grpc_client_channel` target will need more work to pull apart.

Closes #35879

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35879 from markdroth:client_channel_build_split f388a37edc
PiperOrigin-RevId: 608806548
2024-02-20 18:06:37 -08:00
AJ Heller b6a961fa8e [EventEngine] Refactor WritesPerRpcTest to EventEngine (#35763)
Closes #35763

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35763 from drfloob:eeify-writes-per-rpc ebb79f7dd6
PiperOrigin-RevId: 608719485
2024-02-20 13:41:21 -08:00
apolcyn b855423359 [testing] Add StopListening helper and BidiStream handler to XDS e2e test lib (#35861)
As title. Pulling these additions out from a larger change.

Related: cl/563857636

Closes #35861

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35861 from apolcyn:xds_test_changes a67f64d93c
PiperOrigin-RevId: 607728140
2024-02-16 10:25:59 -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 17d9e20ff1 [slice] use absl base64 APIs instead of slice base64 APIs (#35851)
Closes #35851

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35851 from markdroth:base64 6caf83d3da
PiperOrigin-RevId: 606759013
2024-02-13 15:05:50 -08:00
Esun Kim 98a96c5068 [Protobuf] Absorb protobuf::MultiFileErrorCollector change 2 (#35898)
Additional touch on top of https://github.com/grpc/grpc/pull/35870

Closes #35898

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35898 from veblush:protobuf-sv 3b8410b6f6
PiperOrigin-RevId: 606699149
2024-02-13 11:56:17 -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
Yash Tibrewal 2999332d64 [CSM] De-experimentalize CsmObservability API (#35836)
Closes #35836

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35836 from yashykt:DeexperimentalizeCsmObs 1711e6d9b0
PiperOrigin-RevId: 605650394
2024-02-09 09:28:18 -08:00
Yash Tibrewal 8f2245d0a7 [CSM] Disable metrics recording when CsmObservability goes out of scope (#35835)
As discussed, this change adds scoping to `CsmObservability` such that when that object goes out of scope, new channels and servers don't record metrics. In the documentation, I've talked about how existing channels/servers are going to continue to record metrics but i've left room for us to change that behavior in the future.

The current way of doing this is through a global bool since there can only be one plugin right now, but we'll change this to use the global stats plugin registry in the future.

Closes #35835

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35835 from yashykt:DisableCsmObsOnScope 33a7c2f7bc
PiperOrigin-RevId: 605468117
2024-02-08 17:07:25 -08:00
Mark D. Roth 21cb320080 [reorg] move service config code to src/core/service_config (#35843)
Closes #35843

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35843 from markdroth:client_channel_reorg4 0c50ada6f9
PiperOrigin-RevId: 605466874
2024-02-08 16:58:20 -08:00
Mark D. Roth f22c954ef5 [reorg] move client channel code to src/core/client_channel (#35827)
Also rename client_channel.{h,cc} -> client_channel_filter.{h,cc}.

Closes #35827

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35827 from markdroth:client_channel_reorg3 449bff563f
PiperOrigin-RevId: 605006293
2024-02-07 09:23:26 -08:00