Commit Graph

2479 Commits

Author SHA1 Message Date
Mark D. Roth 179e0f952f [build] move parts of the `grpc_base` BUILD target out into their own targets (#35846)
This breaks the following pieces out of the `grpc_base` BUILD target:
- channelz
- call_trace
- dynamic_annotations
- call_combiner
- resource_quota_api
- iomgr

More work is still needed to pull apart the remaining parts of `grpc_base`.

Closes #35846

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35846 from markdroth:client_channel_build_dep_cycle_fix f1a9b6c2b2
PiperOrigin-RevId: 608680098
2024-02-20 11:36:46 -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
Craig Tiller c75d5c9878 [chaotic-good] Credential implementation (#35884)
Closes #35884

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35884 from ctiller:noodling dbba5d5578
PiperOrigin-RevId: 606362603
2024-02-12 14:21:08 -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
Yash Tibrewal 387c894117 [CSM] Remove experimental CSM PluginOption API in favor of CsmObservability API (#35812)
Also update interop tests to use `CsmObservability` API

Closes #35812

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35812 from yashykt:UpdateCsmInterop dc99764aea
PiperOrigin-RevId: 604726881
2024-02-06 12:20:23 -08:00
Mark D. Roth 148f59c15a [reorg] move LB policy code to src/core/load_balancing (#35786)
This new directory combines code from the following locations:
- src/core/ext/filters/client_channel/lb_policy
- src/core/lib/load_balancing

Closes #35786

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35786 from markdroth:client_channel_resolver_reorg 98554efb98
PiperOrigin-RevId: 604351832
2024-02-05 10:05:35 -08:00
Yash Tibrewal 20e5e0cb29 [CSM] Modify CsmObservability to CsmOpenTelemetryPluginOption internally (#35803)
Changes -
* `CsmObservability` API will now use the `CsmOpenTelemetryPluginOption` internally. After this change, `CsmObservability` will enable observability for all channels and servers. (Earlier, `CsmObservability` only enabled observability for CSM-enabled channels and servers.) CSM labels will still be added just for CSM-enabled channels and servers.
* Also, we no longer need the ability to set `LabelInjector` on the `OpenTelemetryPluginBuilder` directly. Instead, we always use `PluginOption` to inject the `LabelInjector`. This simplifies the code as well.

Note that `SetTargetSelector` and `SetServerSelector` APIs on the `OpenTelemetryPluginBuilderImpl` are not being deleted yet since we might need them shortly. This is also why `OpenTelemetryPluginBuilderImpl` is not being deleted right now.

Closes #35803

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35803 from yashykt:CsmO11yApisUsePluginOption cf3d65900d
PiperOrigin-RevId: 604323898
2024-02-05 08:21:58 -08:00
Eugene Ostroukhov 8ea3b417cc [csds] Make grpc_dump_xds_configs return ClientStatusResponse (#35612)
Closes #35612

PiperOrigin-RevId: 602443727
2024-01-29 11:14:23 -08:00
Yash Tibrewal 76c45b98d1 [otel] Return absl::Status as a return from BuildAndRegisterGlobal (#35659)
Just to be future-proof, I'm amending the `void` return status of `BuildAndRegisterGlobal` in `OpenTelemetryPluginBuilder` to absl::Status.

This will be backported to 1.61 as well.

Closes #35659

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35659 from yashykt:UpdateOtelApiToAddStatus 07d3f41b8a
PiperOrigin-RevId: 601458408
2024-01-25 08:40:16 -08:00
Yash Tibrewal 984daf98d7 [CSM o11y] Re-experimentalize CSM OTel Plugin Option (#35660)
We are no longer sure about this API, so re-experimentalizing it.

This PR will be backported to 1.61 as well.

Closes #35660

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35660 from yashykt:ReexperimentalizeCsmPluginOption 4f114a54d9
PiperOrigin-RevId: 601378856
2024-01-25 01:57:24 -08:00
Yijie Ma 16b71d91d8 [CSM O11Y] Fix issue when CSM optional labels are present in server metrics (#35633)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35633 from yijiem:labels-injector-patch 6876243943
PiperOrigin-RevId: 600931754
2024-01-23 15:55:49 -08:00
David Chamberlin 5b724c09c5 [tls] Add copy constructor for TlsCredentialsOptions (#35499)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35499 from dawidcha:cred_opts_copy_constr 330165930f
PiperOrigin-RevId: 599977221
2024-01-19 17:21:50 -08:00
Yash Tibrewal 8231340aef [CSM] Add support for GCE resources (#35371)
Add support for GCE resources in CSM Observability.

Additionally, fix a bug where we were not adding the remote workload's canonical service label for unknown resource types.

Also, if zone and region are both specified, zone takes precedence.

Closes #35371

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35371 from yashykt:GceSupportToCsm e3064d8c3c
PiperOrigin-RevId: 597989825
2024-01-12 16:30:16 -08:00
ericsalo a6823b6e97 Fix deprecation warnings from upb (#35510)
Replace "upb:collections" with "upb:message"
Replace "upb/collections" with "upb/message"
Replace "upb:upb" with "upb:mem" and/or "upb:base"
Replace "upb/upb.hpp" with "upb/mem/arena.hpp" and/or "upb/base/status.hpp"

Closes #35510

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35510 from ericsalo:master 112392a050
PiperOrigin-RevId: 597872730
2024-01-12 10:15:56 -08:00
Yash Tibrewal c5a8e5af64 [OTel] Add back server_selector that got deleted by a merge fiasco (#35532)
It looks like this ended up getting deleted in https://github.com/grpc/grpc/pull/34350 probably when merging.

Also, the `Init` method in the otel test library is getting unwieldy. I'm going to send out a follow-up PR to convert this into a builder instead.

Closes #35532

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35532 from yashykt:OTelPluginBuilderFix 372bf26338
PiperOrigin-RevId: 597846622
2024-01-12 08:33:17 -08:00
Yash Tibrewal acc1ad1b2b [CSM] De-experimentalize CSM OTel Plugin Option (#35526)
Closes #35526

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35526 from yashykt:DeexperimentalizeCsmPluginOption 441eccb857
PiperOrigin-RevId: 597675383
2024-01-11 15:55:26 -08:00
Yijie Ma 77ad5a786e [CSM O11Y] CSM Service Label Plumbing from LB Policies to CallAttemptTracer (#35210)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35210 from yijiem:csm-service-label 6a6a7d1774
PiperOrigin-RevId: 597641393
2024-01-11 13:37:44 -08:00
Yash Tibrewal d2cc24f189 [OTel] De-experimentalize API (#35509)
Closes #35509

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35509 from yashykt:DeeexperimentalizeOTelPlugin f5edf94f2c
PiperOrigin-RevId: 597613307
2024-01-11 11:44:57 -08:00
Craig Tiller d8d67f3e91 [transport] Move some pieces out of grpc_base (#35497)
Closes #35497

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35497 from ctiller:chippity 66fce33280
PiperOrigin-RevId: 597315580
2024-01-10 11:56:59 -08:00
Craig Tiller 2794078c48 [transport] Split metadata_batch into its own target (#35496)
(Required recursively splitting some other targets too)

Gets us closer to eliminating `grpc_base`, and (more importantly) sets up some pieces of transport to be split out so I can rebuild them in coming months.

Closes #35496

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35496 from ctiller:chipchip 5319fb925d
PiperOrigin-RevId: 597304996
2024-01-10 11:21:15 -08:00
Yash Tibrewal 5888738c5a [OTel] Add a PluginOption API (#35434)
Closes #35434

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35434 from yashykt:OTelPluginOption 1db870bed4
PiperOrigin-RevId: 596966190
2024-01-09 18:28:43 +00:00
Craig Tiller 2694f87c23 [channel] Remove test only feature (#35465)
It's not clear to me that this one unit test of very marginal importance warrants 8 bytes per channel.

Closes #35465

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35465 from ctiller:we-dont-need-this-really e7ee62ccb2
PiperOrigin-RevId: 596091614
2024-01-05 15:03:33 -08:00
Yash Tibrewal c12a5645f7 [OTel] Experimental API for metrics (#35348)
Provide a public experimental API and bazel compatible build target for OpenTelemetry metrics.

Details -
* New `OpenTelemetryPluginBuilder` class that provides the API specified in https://github.com/grpc/proposal/blob/master/A66-otel-stats.md
* The existing `grpc::internal::OpenTelemetryPluginBuilder` class is moved to `grpc::internal::OpenTelemetryPluginBuilderImpl` for disambiguation.
* Renamed `OTel` in some instances to `OpenTelemetry` for consistency.

Closes #35348

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35348 from yashykt:OTelPublicApi e32328825e
PiperOrigin-RevId: 594271246
2023-12-28 09:45:29 -08:00
Eugene Ostroukhov 85cede5967 [Build] Fix proto includes (#35345)
Closes #35345

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35345 from eugeneo:tasks/compile-protos 8b5b1ba826
PiperOrigin-RevId: 592253519
2023-12-19 09:09:56 -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
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
Eugene Ostroukhov 1a086609d7 [server] Fix typo in the class name (#35216)
Closes #35216

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35216 from eugeneo:tasks/typo-aync d9f58bc130
PiperOrigin-RevId: 588146516
2023-12-05 12:01:57 -08:00
Adam Cozzette 016ed921ce
[deps] Upgrade protobuf version to v25.0 (#34513)
This commit upgrades gRPC to protobuf v25.0 and makes some fixes to
account for upb changes. One major change is that upb has been merged
into the protobuf repo, so we can now drop the separate `@upb`
dependency. Another is that `.upb.c` files no longer exist and there are
new `.upb_minitable.h` and `.upb_minitable.c` files. The longer
filenames exceeded a Windows restriction, so to work around that I
renamed the `upb-generated` directory to just `upb-gen`, and likewise
for `upbdefs-generated`.
2023-11-10 00:11:09 -08:00
Matthew Stevenson 07985907f2
[tls] Fix ownership bugs in TlsCredentialsOptions and grpc_tls_credentials_options. (#34758)
Currently it is very easy to use the `TlsCredentialsOptions` in such a
way that it produces a memory leak. For example, the code block
```
{
  TlsCredentialsOptions options;
}
```
produces a memory leak. This PR fixes up the ownership bugs in this
class and its `grpc_tls_credentials_options`, the C-core analogue.
2023-10-27 08:09:04 -07:00
Yash Tibrewal 2bc23f1138
[xds] C++ XdsServerBuilder Remove src/... header dependency from public header (#34790) 2023-10-25 11:31:07 -07:00
Yousuk Seung e3ff5f4166
[tracing] Add TcpTracer and HttpAnnotation (#34592)
Add TcpTracer interface for TCP instrumentation. It takes no gRPC
dependencies for use in external TCP implementations. Also add
HttpAnnotation for HTTP transport instrumentation using CallTracer.




<!--

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-20 16:04:16 -07:00
Esun Kim b08b07f611
[Doc] Updated gRPC C++ supported platform (#34747)
- Added ARM64 to MacOS to be clear about the recent Apple Silicon
support.
- Removed x86 from MacOS as x86 is no longer used for Apple.
- Changed ARM to ARM64 for Linux as Foundational-cxx-support only
support ARM64 although gRPC is still working on ARM32.
2023-10-19 15:41:53 -07:00
Gregory Cooke 9969d820b5
[TLS - Revocation] Crl Provider (#34715)
This reverts commit 7af5efcfd3.
2023-10-19 11:33:41 -07:00
Craig Tiller c19e5dcd6b
[build] Remove linkage of logging_filter -> otel (#34729)
Reverse dependency edge, so instead of saying `logging_filter _after_
otel`, instead say `otel _before_ logging_filter` - since this doesn't
inadvertently bring otel into builds where it's unnecessary.

Required moving filter class definitions into the header - which mirrors
all other filters, so I think this is fine.
Also required removing the bespoke visibility rules on logging_filter -
which also seems relatively fine (the defaults limit to grpc usage, and
it's hard to see a firm requirement for tighter visibility that that).
2023-10-18 12:31:38 -07:00
Craig Tiller 7dd5b1c756
[cleanup] Re-delete accidentally re-added file (#34727) 2023-10-18 11:49:33 -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
Yash Tibrewal 5fd09c1aff
[CSM C++] Fix behavior when peer does not send metadata (#34692)
@stanley-cheung noticed a bug where CSM labels were not being added on
metrics if the peer was not also CSM Observability enabled.

This PR fixes the behavior to add in the local labels in this case, as
well as add the remote workload type label with the value of unknown.
2023-10-16 18:13:36 -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
Yash Tibrewal 7a97b35d9b
[CSM] Google Cloud C++ libraries now allow bazel layering checks (#34664)
With the latest cloud C++ release - 
1) The opentelemetry bazel target is no longer experimental.
2) layering checks now work with bazel
2023-10-11 17:14:59 -07:00
Yijie Ma bae0c705aa
[Deps] Update to Clang-16 (#34492)
<!--

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-11 16:26:32 -07:00
Eugene Ostroukhov 3ed72c0c60
[reflection] Add v1 reflection (#34599) 2023-10-06 11:40:31 -07:00
Craig Tiller 3b0916fc0a
Revert "[reflection] Add v1 reflection" (#34594)
Reverts grpc/grpc#34535
2023-10-04 19:06:58 -07:00
Eugene Ostroukhov 5817f0f6c1
[reflection] Add v1 reflection (#34535) 2023-10-04 11:09:59 -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