Commit Graph

3261 Commits

Author SHA1 Message Date
Craig Tiller 90a649fd3f [call-v3] Client call implementation (#36724)
Closes #36724

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36724 from ctiller:transport-refs-8 51cf92ab82
PiperOrigin-RevId: 640558652
2024-06-05 09:57:33 -07:00
Mark D. Roth e4daabc8bc [reorg] move ext/gcp/metadata_query.* -> util/gcp_metadata_query.* (#36789)
Also rename the class from `MetadataQuery` to `GcpMetadataQuery`.

Closes #36789

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36789 from markdroth:reorg_gcp_metadata_query d2b84f46be
PiperOrigin-RevId: 639256546
2024-05-31 22:40:20 -07:00
Mark D. Roth 34ac4ee5de [grpc_error] remove unnecessary status attributes (#36523)
The following attributes were completely unused:
- kOffset
- kIndex
- kSize
- kFilename
- kKey
- kValue

The following attributes were added but never programmatically accessed, and I've moved them into the status messages themselves, which is another step toward #22883:
- kErrorNo
- kTsiCode
- kWsaError
- kHttpStatus
- kOsError
- kSyscall
- kTargetAddress
- kRawBytes
- kTsiError

Closes #36523

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36523 from markdroth:grpc_error_attribute_cleanup b289c399fe
PiperOrigin-RevId: 639147583
2024-05-31 14:11:42 -07:00
Craig Tiller 53540ae5d6 [context] Move legacy tracing contexts to arena contexts (#36776)
Closes #36776

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36776 from ctiller:ctx2 8be4cdcf43
PiperOrigin-RevId: 639133808
2024-05-31 13:26:08 -07:00
Xuan Wang f3220d08d2 [Python O11y] Implement CSM observability for Python (#36557)
Implement Python CSM observability.

Design: [go/grpc-python-opentelemetry](http://goto.google.com/grpc-python-opentelemetry)
<!--

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

PiperOrigin-RevId: 639073741
2024-05-31 10:17:57 -07:00
Mark D. Roth 82756e9ce0 Automated rollback of commit fbd8ebe7cd.
PiperOrigin-RevId: 638821486
2024-05-30 16:23:47 -07:00
Xuan Wang 1a96ce7620 [Python AIO] Return EOF from UnaryStreamCall.read() as documented (#36660)
Fix: https://github.com/grpc/grpc/issues/36581

Based on our documentation, we should return `grpc.aio.EOF` to indicate the end of the stream: fb6a57b153/src/python/grpcio/grpc/aio/_base_call.py (L166-L178)

But if the call was intercepted, we're raising `StopAsyncIteration`, This Pr changes the return to match the documentation (Which is also the behavior for non-intercepted call).

Closes #36660

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36660 from XuanWang-Amos:fix_aio_read_return 4b679ba429
PiperOrigin-RevId: 638681673
2024-05-30 09:36:52 -07:00
gRPC Team Bot fbd8ebe7cd Automated rollback of commit db2d775ffc.
PiperOrigin-RevId: 638442984
2024-05-29 16:09:03 -07:00
Craig Tiller 34871fafa3 [call-v3] New client channel implementation (#36723)
Closes #36723

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36723 from ctiller:transport-refs-7 e019b8f5ea
PiperOrigin-RevId: 638424601
2024-05-29 15:06:01 -07:00
Mark D. Roth db2d775ffc [reorg] move src/core/lib/http -> src/core/util/http_client (#36710)
Closes #36710

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36710 from markdroth:reorg_httpcli 6c751e34b2
PiperOrigin-RevId: 638358691
2024-05-29 11:42:19 -07:00
Xuan Wang ecdb5caf83 [BoringSSL] Update third_party/boringssl-with-bazel (#36716)
Change was created by the release automation script. See go/grpc-release.

Closes #36716

PiperOrigin-RevId: 638337588
2024-05-29 10:46:22 -07:00
Mark D. Roth fe817c8ab1 [reorg] move lib/json -> util/json (#36645)
Closes #36645

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36645 from markdroth:reorg_json 5b6434dd44
PiperOrigin-RevId: 636757495
2024-05-23 19:51:49 -07:00
Mark D. Roth 6c08d36c3b [reorg] move telemetry code to src/core/telemetry (#36644)
Closes #36644

PiperOrigin-RevId: 636702732
2024-05-23 15:54:07 -07:00
Xuan Wang 990a422b1b [Python Server] Remove abstractmethod notation for add_registered_method_handlers (#36684)
Remove `@abc.abstractmethod` so we don't break backward compatibility.

Fix: https://github.com/grpc/grpc/issues/36683

<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36684 from XuanWang-Amos:remove_abstractmethod_for_registered_method f748fa6e7a
PiperOrigin-RevId: 636186951
2024-05-22 09:08:24 -07:00
Mark D. Roth 58a4b9c922 [reorg] move src/core/lib/gpr -> src/core/util (#36543)
Closes #36543

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36543 from markdroth:reorg_util_gpr ba84e186be
PiperOrigin-RevId: 634113744
2024-05-15 16:32:20 -07:00
Oskar Bunyan 05ae7fb926 Maintain a strong reference to rpc_tasks.
Only a weakref is kept in the loop. See python docs on creating tasks.
https://docs.python.org/3/library/asyncio-task.html#creating-tasks

This fixes an issue with request hangs when tasks were being garbage collected.

PiperOrigin-RevId: 634035959
2024-05-15 12:18:09 -07:00
Craig Tiller 0ecee5ad3f [call-v3] Server path (#36509)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36509 from ctiller:transport-refs-3 2771a2b0e1
PiperOrigin-RevId: 633240374
2024-05-13 09:45:09 -07:00
Yash Tibrewal 87b71907d6 [Release] Bump version to 1.65.0-dev (on master branch) (#36544)
Change was created by the release automation script. See go/grpc-release.

Closes #36544

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36544 from yashykt:bump_dev_version_202405061956 69ee5c869e
PiperOrigin-RevId: 631187829
2024-05-06 14:41:36 -07:00
Mark D. Roth 32e03171e7 [reorg] move xds code to src/core/xds (#36521)
Also do some cleanup in CODEOWNERS.

Closes #36521

PiperOrigin-RevId: 631137895
2024-05-06 11:57:32 -07:00
Rushaan Gandhi 6d527a63e4 [Asyncio] Semantic task names for RPC tasks (#36422)
Formatted the task name after handling

Close: https://github.com/grpc/grpc/issues/35829

Closes #36422

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36422 from rushaan105gandhi:new-contribution 82120279c2
PiperOrigin-RevId: 630115057
2024-05-02 10:57:20 -07:00
Xuan Wang 811bb258d8 [Python Otel] Use registered method at server side (#36371)
Add registered method change to sync stack server.

## Note
* We're keeping both generic and registered handler in generated stubs (`*_pb2_grpc.py`) because registered method flow is not implemented in aysncio yet, since the stub is used for both sync and asyncio, we can't remove generic method flow until we fully implement the registered method flow in asyncio.

<!--

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

PiperOrigin-RevId: 629842051
2024-05-01 14:43:15 -07:00
Mark D. Roth 1e5fc3df8b [reorg] move server code to src/core/server (#36475)
Closes #36475

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36475 from markdroth:reorg_server 30edc04c0f
PiperOrigin-RevId: 629776917
2024-05-01 11:16:02 -07:00
Craig Tiller e614dafd89 [woah] Remove deadline filter (#36477)
Also begin to eliminate `CallContext` in favor of just exposing `Call` - ultimately there's not really a need to introduce two types here, so I'm going to wind that idea back over a few PRs.

I've avoided making this an experiment as the changes required were quite structural.

Closes #36477

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36477 from ctiller:deadline-time 9856eeebe6
PiperOrigin-RevId: 629599230
2024-04-30 19:45:22 -07:00
Yash Tibrewal a0bee78a28 [BoringSSL] Update third_party/boringssl-with-bazel (#36435)
Change was created by the release automation script. See go/grpc-release.

Closes #36435

PiperOrigin-RevId: 629574967
2024-04-30 17:28:00 -07:00
Mark D. Roth 6e981d7460 [reorg] move handshaker code to src/core/handshaker (#36375)
Closes #36375

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36375 from markdroth:reorg_handshaker d1ed49f4df
PiperOrigin-RevId: 629497065
2024-04-30 12:42:01 -07:00
nipil 125ad4ba26
[python/systemd] allow compiling systemd support into python builds (#36037)
Add GRPC_PYTHON_BUILD_WITH_SYSTEMD environment variable to setup.py

The variable sets the required compile time define and adds the required
link time library to the build process
2024-04-30 10:50:26 -07:00
Tanvi Jagtap f68f8e8fa3 [grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT (#36466)
[grpc][Gpr_To_Absl_Logging] Migrating from gpr to absl logging GPR_ASSERT
Replacing GPR_ASSERT with absl CHECK.
These changes have been made using string replacement and regex.
Will not be replacing all instances of CHECK with CHECK_EQ , CHECK_NE etc because there are too many callsites. Only ones which are doable using very simple regex with least chance of failure will be replaced.
Given that we have 5000+ 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 #36466

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36466 from tanvi-jagtap:tjagtap_src_core_lob_event_engine d101d5f701
PiperOrigin-RevId: 629105415
2024-04-29 10:15:57 -07:00
Craig Tiller d52779da52 [call-v3] Interception chain (#36414)
Introduce the interception chain type.
Also introduces the real call-v3 call spine based atop CallFilters.

Closes #36414

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36414 from ctiller:interception-chain 90c8e96973
PiperOrigin-RevId: 627784183
2024-04-24 11:03:13 -07:00
Mark D. Roth 08f56b3a74 [reorg] move channelz code to src/core/channelz (#36380)
Closes #36380

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36380 from markdroth:reorg_channelz f186e53f70
PiperOrigin-RevId: 626447939
2024-04-19 13:05:23 -07:00
AJ Heller 1a8b22f2de [build] Restrict visibility for creating core credentials types. (#36216)
Closes #36216

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36216 from drfloob:conceal-core-cred-creation a44a299273
PiperOrigin-RevId: 625425746
2024-04-17 01:21:29 +00:00
Yijie Ma cd30592193 [release] Bump dev version 202404101721 (#36333)
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36333 from yijiem:bump_dev_version_202404101721 0a7cc5b4b7
PiperOrigin-RevId: 623878150
2024-04-11 11:04:35 -07:00
Esun Kim 34a7e76359 [Deps] Rollfoward Protobuf upgrade to v26.1 (#36323)
This reverts commit 78b9d84fd3.

Closes #36323

PiperOrigin-RevId: 623547891
2024-04-10 11:07:26 -07:00
Anthonios Partheniou ef5073fb16 [Fix Python Deadlock] Guard grpc_google_default_credentials_create with nogil (#36266)
This fix is similar to https://github.com/grpc/grpc/pull/34712 but for `grpc_google_default_credentials_create` rather than `grpc_ssl_credentials_create`

Fixes https://github.com/grpc/grpc/issues/36265
Fixes https://github.com/googleapis/python-bigtable/issues/949

Closes #36266

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36266 from parthea:repro-issue-34672 d736f6f080
PiperOrigin-RevId: 623291826
2024-04-09 15:08:39 -07:00
Xuan Wang 73b0ac2067 [Python Version] Drop support for Python 3.7 (#34450)
### NOTE
* We shouldn't merge this PR until GCP cloud functions drops support for Python 3.7 ([Currently scheduled for GCF](https://cloud.google.com/functions/docs/runtime-support#python))

As part of supporting Python 3.12, we're now officially drop support for Python 3.7.

This PR:

* Changed supported Python version from 3.7 to 3.8 in README.
* Replaced distribution test image from `debian:buster` to `debian:bullseye` since the default Python version in buster is 3.7.

<!--

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

PiperOrigin-RevId: 622899511
2024-04-08 11:17:51 -07:00
Xuan Wang 6cbc7ad63d [Python Aio] Change aio Metadata inheritance (#36214)
Fix: https://github.com/grpc/grpc/issues/26498
<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36214 from XuanWang-Amos:fix_aio_Metadata_class 90329a2bdf
PiperOrigin-RevId: 622898840
2024-04-08 11:08:16 -07:00
Esun Kim 78b9d84fd3 [Dep] Rollback Protobuf upgrade to v25.1 (#36247)
This is for gRPC Python that has an issue with Protobuf Python v26

Closes #36247

PiperOrigin-RevId: 621629528
2024-04-03 13:56:36 -07:00
Mark D. Roth 0aebe1c7b6 [authz] get endpoint local/peer addresses via a handshaker (#36237)
This paves the way for removing `GetEndpoint()` from the transport API, which is a prereq for removing `grpc_endpoint_shutdown()`.

Closes #36237

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36237 from markdroth:endpoint_filter_cleanup_rbac 46a41400e0
PiperOrigin-RevId: 621537397
2024-04-03 08:55:15 -07:00
Craig Tiller e78ec82a2c [call-v3] Remove CallFactory (#36226)
This was a concept that I thought we'd need, but as work has continued it's clear that the right api is CallDestination (or variants thereof)

Closes #36226

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36226 from ctiller:call_factory c30a893f3a
PiperOrigin-RevId: 621255162
2024-04-02 12:11:11 -07:00
Vojtěch Boček d9badb171a [Documentation] fix asyncio Server and Channel stop() method documentation (#35946)
The stop/cancel methods actually wait if a grace period is specified, and do not "return immediately":

* 5227db884d/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi (L1060-L1063)
* 5227db884d/src/python/grpcio/grpc/aio/_channel.py (L444)
* 5227db884d/src/python/grpcio/grpc/_server.py (L1253)

Closes #35946

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35946 from Tasssadar:fix_grpc_stop_docs 1bafaa1eeb
PiperOrigin-RevId: 621230612
2024-04-02 10:56:19 -07:00
Atri Bhattacharya 4bea12353c [python] Cython 3 compatibility: declare functions noexcept. (#35995)
In Cython 3, cdef functions that really will not raise exceptions must be declared as `noexcept`. Fixed by this commit.

Update requirements to `cython >= 3.0` in requirements*.txt and setup.py.

Fixes issue #33918.

<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35995 from badshah400:master b3277bac15
PiperOrigin-RevId: 621214091
2024-04-02 10:08:13 -07:00
Craig Tiller adf6c7b644 [idle] Remove v3 channel idle filter experiment (#36213)
It looks like we're settling on moving this functionality into the channel itself - so removing the filter makes sense (especially since it had some significant bugs)

Closes #36213

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36213 from ctiller:x-ex 3040dcec95
PiperOrigin-RevId: 620996358
2024-04-01 17:15:27 -07:00
Esun Kim 03312884dc [Deps] Upgraded protobuf to v26.1 (#35796)
This is to upgrade Protobuf to v26.1 along with upb, and utf8_range.

Closes #35796

PiperOrigin-RevId: 620259696
2024-03-29 09:19:06 -07:00
Mark D. Roth e715261ac6 [slice] remove absl_base64 experiment (#36178)
Closes #36178

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36178 from markdroth:b64_remove 0139e3bce8
PiperOrigin-RevId: 619288082
2024-03-26 13:16:27 -07:00
Craig Tiller ca478bd429 [experiments] Remove some, extend some (#36166)
Remove rolled out experiments v3_compression_filter, v3_server_auth_filter; Extend WIP v3_channel_idle_filter for a bit, and extend work_serializer_clears_time_cache until OSS issues with work_serializer_dispatch are resolved.

Closes #36166

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36166 from ctiller:updat3 2c7223f63b
PiperOrigin-RevId: 619057925
2024-03-25 21:35:03 -07:00
Xuan Wang c910004328 [Python Stub] Add version check to stubs generated by grpcio_tools (#35906)
The stubs generated by grpcio_tools should always be used with [the same or higher version of grpcio](https://github.com/grpc/grpc/blob/master/tools/distrib/python/grpcio_tools/setup.py#L313), this change will add a run time check for this requirement inside the generated stubs and therefor enforce this requirement.

Please note for now we're just printing a warning for incorrect usage, we'll **change it to an error** soon.

Example warning message:
```
/usr/local/google/home/xuanwn/workspace/misc/grpc/examples/python/helloworld/helloworld_pb2_grpc.py:21: RuntimeWarning: The grpc package installed is at version 1.60.1, but the generated code in helloworld_pb2_grpc.py depends on grpcio>=1.63.0.dev0. Please upgrade your grpc module to grpcio>=1.63.0.dev0 or downgrade your generated code using grpcio-tools<=1.60.1. This warning will become an error in 1.64.0, scheduled for release on May 14,2024.
```
<!--

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

PiperOrigin-RevId: 615659471
2024-03-13 22:47:01 -07:00
Tanvi Jagtap 2c49416713 [grpc][Gpr_To_Absl_Logging] Using absl from within gpr logging (#36108)
![Config_Vars_Absl (1)](https://github.com/grpc/grpc/assets/139093547/04d9b75c-dd1c-42ee-81a3-d20e2bbd5672)

<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36108 from tanvi-jagtap:tjagtap_config_vars c48a3524f0
PiperOrigin-RevId: 615652000
2024-03-13 22:04:47 -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
Esun Kim b78f64569a [CI] Updated by review (#36083)
Updated by review & Added missing import.

Closes #36083

PiperOrigin-RevId: 614017839
2024-03-08 12:49:57 -08:00
Xuan Wang 9ba8bb5dd2 Revert "[AbortError] And and check AbortError while abort" (#36076)
This reverts commit 675dcccd5e.

<!--

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36076 from XuanWang-Amos:roll_back_AbortError 1db7c39903
PiperOrigin-RevId: 613739975
2024-03-07 16:37:04 -08:00
Xuan Wang 675dcccd5e [AbortError] Reapply "[AbortError] And and check AbortError while abort" (#34525)
Reverts grpc/grpc#34515

This PR reapplies AbortError change as the previous one was reverted.

This change was mentioned in this gRFC: [L105: Python Add New Error Types](https://github.com/grpc/proposal/blob/master/L105-python-expose-new-error-types.md)

Closes #34525

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/34525 from grpc:revert-34515-revert-33969-checkAbortError ce63ab1d6a
PiperOrigin-RevId: 613718295
2024-03-07 15:15:15 -08:00