Commit Graph

4354 Commits

Author SHA1 Message Date
Esun Kim 8e78a0a2cf
[Release] Bump version to 1.59.4 (on v1.59.x branch) (#35816)
Change was created by the release automation script. See go/grpc-release
2024-02-05 15:00:53 -08:00
Richard Belleville 35df344f5e
Bump v1.59.x to v1.59.3 (#35003) 2023-11-16 13:47:17 -08:00
Gregory Cooke f1d14f7f0b
[Security - Revocation] Crl backport to 1.59 (#34926)
Backport CRL provider and directory reloader PRs to 1.59

---------

Co-authored-by: gtcooke94 <gtcooke94@users.noreply.github.com>
Co-authored-by: Andrey Ermolov <aermolov@google.com>
Co-authored-by: erm-g <erm-g@users.noreply.github.com>
2023-11-15 11:30:05 -05:00
Richard Belleville 05430a5cfd
[Release] Bump v1.59.x to 1.59.2 (#34815) 2023-10-27 14:57:55 -07:00
Craig Tiller e33af6c7ce
[chttp2] Rollup of fixes for CVE-2023-44487 (#34763)
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Mark D. Roth <roth@google.com>
2023-10-23 13:37:54 -07:00
Xuan Wang 50b02da427
[Fix Python Deadlock] Guard grpc_ssl_credentials_create with nogil (v1.59.x backport) (#34725)
Backport of #34712 to v1.59.x.
---
Fix: https://github.com/grpc/grpc/issues/34672
With some recent changes in core, now `grpc_ssl_credentials_create` is
guarded by `gpr_once_init`. In our current implementation, The thread
got `gpr_once_init` lock might require GIL lock during the execution of
`grpc_ssl_credentials_create`, which might cause a deadlock if another
thread is holding GIL lock and waiting for `gpr_once_init` lock.

This change adds `with nogil` to calls to native function
`grpc_ssl_credentials_create` to make sure GIL is released before
calling `grpc_ssl_credentials_create`.
<!--

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-18 11:52:24 -07:00
Esun Kim 0df9accc5c
[Release] Bump version to 1.59.1 (on v1.59.x branch) (#34620)
Change was created by the release automation script. See go/grpc-release
2023-10-06 16:44:58 -07:00
Richard Belleville 08cc1787de
[Release] Bump v1.59.x version to 1.59.0 (#34534) 2023-09-28 16:08:21 -07:00
Richard Belleville deb0c6257b
[Release] Bump v1.59.x to v1.59.0-pre2 (#34505) 2023-09-27 16:22:17 -07:00
Richard Belleville bb97419977
[Release] Bump 1.59.x version to 1.59.0-pre1 (#34490) 2023-09-26 13:15:41 -07:00
Xuan Wang ffdb58dd5f
[Python 3.12] Support Python 3.12 (#34398)
Support Python 3.12.

### Testing
* Passed all Distribution Tests.
* Also tested locally by installing 3.12 artifact.


<!--

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-09-22 09:57:29 -07:00
AJ Heller 2467562e4b
[EventEngine] Delete OriginalThreadPool, remove work_stealing experiment (#34315)
This has been stable for a bit, everywhere that the EventEngine is
enabled. Going forward, I think the event_engine_{client|listener}
experiments can probably be used to regulate thread-pool-specific
issues.

---------

Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2023-09-15 10:28:11 -07:00
Mark D. Roth 1986007e1e
[round_robin] 4th attempt: delegate to pick_first as per dualstack design (#34337)
Most recent attempt was #34320, reverted in #34335.

The first commit here is a pure revert. The second commit fixes the
outlier_detection unit test to pass both with and without the
experiment.
2023-09-14 08:55:51 -07:00
David Chamberlin 0b8fb5a3c6
[Build] re-enable grpc++_unsecure library without ssl dependencies (#34327)
This is a follow up to https://github.com/grpc/grpc/pull/34103

That pull request explicitly aimed to introduce shared library builds
for Windows (DLLs) while effecting zero material change to the existing
build pipelines. That aspiration meant that the grpc++_unsecure library
had to be effectively excluded from the build (because including it
would have also included a dependency on openssl, which makes no sense
given its purpose)

This PR addresses that by:
* Extracting the single function in grpc_tls_certificate_provider with a
dependency on openssl into a separate compilation unit
* Including that new .cc file into the grpc library
* Including grpc_tls_certificate_provider and one other source file into
grpc_unsecure for the Windows DLL build only.
* Reinstating the grpc++_unsecure library which is a prerequisite for
many tests.
* Regenerating all files affected by the changes in Bazel BUILD that
introduce the new source file.

This change does affect the operation of other build pipelines - I have
confirmed that it does not break the Linux Bazel 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-09-13 16:32:33 -07:00
Mark D. Roth 6534f0a6bf
Revert "[round_robin] third attempt: delegate to pick_first as per dualstack design" (#34335)
Reverts grpc/grpc#34320
2023-09-13 11:14:54 -07:00
Mark D. Roth d713427cec
[round_robin] third attempt: delegate to pick_first as per dualstack design (#34320)
Previous attempt was #34241, reverted in #34317.

The second commit here makes the experiment disablable, so that we can
roll it out slowly internally.
2023-09-12 17:46:31 -07:00
Craig Tiller e6bf7c12cf
Revert "[round_robin] delegate to pick_first as per dualstack design" (#34317)
Reverts grpc/grpc#34241
2023-09-11 19:42:54 -07:00
Mark D. Roth 97571ebf81
[round_robin] delegate to pick_first as per dualstack design (#34241)
Rolls forward the remaining changes from #32692, which were rolled back
in #33718.
2023-09-11 12:09:57 -07:00
Xuan Wang 4dd42478d5
[Python Misc] Remove fetch_build_eggs & Fix run_test (#34270)
* Remove `fetch_build_eggs` since they're deprecated and those deps will
be installed by `setuptools`.
* Fix indentation on `run_test` so we don't miss `native` test cases.

<!--

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-09-07 12:35:28 -07:00
Xuan Wang c7a1336566
[Python 3.12] Deprecate distutil (#34186)
### Background

* `distutils` is deprecated with removal planned for Python 3.12
([pep-0632](https://peps.python.org/pep-0632/)), thus we're trying to
replace all distutils usage with setuptools.
* Please note that user still have access to `distutils` if setuptools
is installed and `SETUPTOOLS_USE_DISTUTILS` is set to `local` (The
default in setuptools, more details can be found [in this
discussion](https://github.com/pypa/setuptools/issues/2806#issuecomment-1193336591)).

### How we decide the replacement

* We're following setuptools [Porting from Distutils
guide](https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html#porting-from-distutils)
when deciding the replacement.

#### Replacement not mentioned in the guide

* Replaced `distutils.utils.get_platform()` with
`sysconfig.get_platform()`.
* Based on the [answer
here](https://stackoverflow.com/questions/71664875/what-is-the-replacement-for-distutils-util-get-platform),
and also checked the document that `sysconfig.get_platform()` is good
enough for our use cases.
* Replaced `DistutilsOptionError` with `OptionError`.
* `setuptools.error` is exporting it as `OptionError` [in the
code](https://github.com/pypa/setuptools/blob/v59.6.0/setuptools/errors.py).
* Upgrade `setuptools` in `test_packages.sh` and changed the version
ping to `59.6.0` in `build_artifact_python.bat`.
* `distutils.errors.*` is not fully re-exported until `59.0.0` (See
[this issue](https://github.com/pypa/setuptools/issues/2698) for more
details).

### Changes not included in this PR

* We're patching some compiler related functions provided by distutils
in our code
([example](ee4efc31c1/src/python/grpcio/_spawn_patch.py (L30))),
but since `setuptools` doesn't have similar interface (See [this issue
for more details](https://github.com/pypa/setuptools/issues/2806)), we
don't have a clear path to replace them yet.


<!--

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-09-06 14:32:30 -07:00
Ben Beasley efc3843fb7
[Test] Do not use importlib find_module API, removed in Python 3.12 (#33506)
This API was [removed in Python
3.12](https://github.com/python/cpython/issues/98040).

Fixes Python 3.12 support in `grpcio` tests.

This is relevant to https://github.com/grpc/grpc/issues/33063.

See also https://github.com/grpc/grpc/pull/33492.

----

I have actually only tested this in a form backported to grpc 1.48.4,
and I am not able to test the change to `bazel/_gevent_test_main.py`
directly. However, the backported form allows me to build grpc 1.48.4
for Fedora Rawhide with Python 3.12, and I believe the version in this
PR to be correct—especially, if CI passes for Python 3.11, I believe
this part of the test code will continue to work in Python 3.12.
2023-09-06 13:13:12 -07:00
Eugene Ostroukhov a5e9feeb04
[HTTP Proxy] Rename source/header and move test (#34221) 2023-09-05 20:50:03 -07:00
Eugene Ostroukhov 4295f0250c
[Interop Test] Update Docker images (#34210)
Co-authored-by: Sergii Tkachenko <hi@sergii.org>
2023-08-31 10:25:21 -07:00
Esun Kim 1a1124903c
[Deps] Upgrade Protobuf and Upb to 24.x (#34123)
On top of https://github.com/grpc/grpc/pull/34120
2023-08-29 10:58:48 -07:00
Craig Tiller b478add7ec
[experiments] Remove unused experiment (#34090)
We added this as an exploratory measure for a customer that thought they
were using open census (this turned out to be emphatically false).
Remove it since it's probably not how we ultimately want to do this, and
wait for something better to come along.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-08-24 23:45:22 -07:00
Xuan Wang 9dda5b5d01
[Python fix-it] Manually set status in case of cygrpc.InternalError (#34148)
* Before change:
* Test hangs
[here](https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi#L250)(Called
from
[here](3b23fe62ca/src/python/grpcio/grpc/aio/_call.py (L261)))
waiting for status.

* After change, we'll manually set status. We're also printing traceback
like the following:
```
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/1576/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests_aio/unit/metadata_test.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/aio/_call.py", line 492, in _writ
e
    await self._cython_call.send_serialized_message(serialized_request)
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi", line 379, in send_serialized_message
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi", line 163, in _send_message
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi", line 160, in _cython.cygrpc._send_message
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi", line 106, in execute_batch
_cython.cygrpc.ExecuteBatchError: Failed grpc_call_start_batch: 11 with grpc_call_error value: 'GRPC_CALL_ERROR_INVALID_MESSAGE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/1576/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests_aio/unit/metadata_test.runfiles/com_github_grpc_grpc/src/python/grpcio_tests/tests_aio/unit/_test_base.py", l
ine 31, in wrapper
    return loop.run_until_complete(f(*args, **kwargs))
  File "/usr/local/google/home/xuanwn/.pyenv/versions/3.10.9/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/1576/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests_aio/unit/metadata_test.runfiles/com_github_grpc_grpc/src/python/grpcio_tests/tests_aio/unit/metadata_test.py"
, line 310, in test_stream_unary
    await call.write(_REQUEST)
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/1576/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests_aio/unit/metadata_test.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/aio/_call.py", line 517, in write
    await self._write(request)
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/1576/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests_aio/unit/metadata_test.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/aio/_call.py", line 495, in _writ
e
    await self._raise_for_status()
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/1576/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests_aio/unit/metadata_test.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/aio/_call.py", line 263, in _rais
e_for_status
    raise _create_rpc_error(
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
        status = StatusCode.INTERNAL
        details = "Internal error from Core"
        debug_error_string = "Failed grpc_call_start_batch: 11 with grpc_call_error value: 'GRPC_CALL_ERROR_INVALID_MESSAGE'"
>

```

<!--

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-08-24 13:04:54 -07:00
Esun Kim a90f30008d
[Release] Bump version to 1.59.0-dev (on master branch) (#34144)
Change was created by the release automation script. See
go/grpc-release.
2023-08-23 15:53:32 -07:00
Esun Kim 650c2ea492
[Deps] Update boringssl 202308211007 (#34115)
Part of gRPC release
2023-08-21 15:26:07 -07:00
Mark D. Roth c0e2fa60f9
[xDS] avoid creating duplicate hierarchical path attribute values (#34106) 2023-08-21 14:23:02 -07:00
AJ Heller 108af0a94f
[EventEngine] Improve lock contention in WorkStealingThreadPool (alternative) (#34065)
Proposed alternative to https://github.com/grpc/grpc/pull/34024.

This version has a simpler, faster busy-count implementation based on a
sharded set of atomic counts: fast increment/decrement operations,
relatively slower summation of total counts (which need to happen much
less frequently).
2023-08-17 17:00:02 -07:00
Jan Tattermusch a8508ec465
[build metadata] Bazel to "other build systems" improvements (#33803)
- Extract build metadata for some external dependencies from bazel
build. This is achieved by letting extract_metadata_from_bazel_xml.py
analyze some external libraries and sources. The logic is basically the
same as for internal libraries, I only needed to teach
extract_metadata_from_bazel_xml.py which external libraries it is
allowed to analyze.
* currently, the list of source files is automatically determined for
`z`, `upb`, `re2` and `gtest` dependencies (at least for the case where
we're building in "embedded" mode - e.g. mostly native extensions for
python, php, ruby etc. - cmake has the ability to replace some of these
dependencies by actual cmake dependency.)
- Eliminate the need for manually written gen_build_yaml.py for some
dependencies.
- Make the info on target dependencies in build_autogenerated.yaml more
accurate and complete. Until now, there were some depdendencies that
were allowed to show up in build_autogenerated.yaml and some that were
being skipped. This made generating the CMakeLists.txt and Makefile
quite confusing (since some dependencies are being explicitly mentioned
and some had to be assumed by the build system).
- Overhaul the Makefile
* the Makefile is currently only used internally (e.g. for ruby and PHP
builds)
* until now, the makefile wasn't really using the info about which
targets depend on what libraries, but it was effectively hardcoding the
depedendency data (by magically "knowing" what is the list of all the
stuff that e.g. "grpc" depends on).
* After the overhaul, the Makefile.template now actually looks at the
library dependencies and uses them when generating the makefile. This
gives a more correct and easier to maintain makefile.
* since csharp is no longer on the master branch, remove all mentions of
"csharp" targets in the Makefile.

Other notable changes:
- make extract_metadata_from_bazel_xml.py capable of resolving workspace
bind() rules (so that it knows the real name of the target that is
referred to as e.g. `//external:xyz`)

TODO:
- [DONE] ~~pkgconfig C++ distribtest~~
- [DONE} ~~update third_party/README to reflect changes in how some deps
get updated now.~~


Planned followups:
- cleanup naming of some targets in build metadata and buildsystem
templates: libssl vs boringssl, ares vs cares etc.
- further cleanup of Makefile
- further cleanup of CMakeLists.txt
- remote the need from manually hardcoding extra metadata for targets in
build_autogenerated.yaml. Either add logic that determines the
properties of targets automatically, or use metadata from bazel BUILD.
2023-08-16 19:13:39 +02:00
Yijie Ma e04128ad1d
[Deps] Update abseil to 20230802 (#33974)
<!--

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-08-11 15:29:24 -07:00
Yusuke Nishioka 4a24d8250f
[Type hints] Fix type hints in aio._interceptors.py (#28770)
As per the title.

<!--

Your pull request will be routed to the following person by default for
triaging.
If you know who should review your pull request, please remove the
mentioning below.

-->

@donnadionne
2023-08-10 12:30:40 -07:00
Sparkling Diva df9ec2b0f0
[Aio] use timeout instead of deadline for intercepted call creation (#33951)
Intercepted call class expect a timeout as parameters but a deadline is
provided instead. Only the UnaryUnary class is correctly created with a
timeout while the others remains with the deadlines. This commit fix the
instanciation of the other ones.




<!--

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-08-09 14:32:33 -07:00
Hannah Shi 239a5fce2d
[ObjC] dns service resolver for cf event engine (#33971)
re-submit of #33233 with refactored tests

1. split ios event engine tests to client tests (require oracle engine)
and unit test
2. disable dns server setup in
[dns_test.cc](https://github.com/grpc/grpc/blob/master/test/core/event_engine/test_suite/tests/dns_test.cc#L127)
for ios test, this is what's caused the revert.
3. disable dns_test in cf_event_engine_test for MacOS
2023-08-04 15:51:42 -07:00
Eugene Ostroukhov 1c39493d96
[Interop test] Install curl (#33982)
Curl is required to install Bazel during the build. This also unifies
all build images to use Python base image.
2023-08-03 14:57:41 -07:00
Eugene Ostroukhov 30c68edfcb
[Interop Test] Rollback image changes (#33979)
Fixes build issues
2023-08-03 20:05:48 +00:00
AJ Heller 48f455a9a0
Revert "[ObjC] dns service resolver for cf event engine" (#33964)
Reverts grpc/grpc#33233. This is failing 100% of builds
https://source.cloud.google.com/results/invocations/248656d3-15ac-4d42-a2f8-6bec5c411e67/targets
2023-08-02 10:08:06 -07:00
Alisha Nanda f7fc3fbed4
[tracing] Add annotation with metadata sizes and limits (#33910)
Only create annotation when call is sampled for cost reasons.

---------

Co-authored-by: ananda1066 <ananda1066@users.noreply.github.com>
2023-08-01 11:06:14 -07:00
Hannah Shi cd85d7edf2
[ObjC] dns service resolver for cf event engine (#33233)
Implement DNS using dns service for iOS.

Current limitation:
1. Using a custom name server is not supported.
2. Only supports `LookupHostname`. `LookupSRV` and `LookupTXT` are not
implemented.
3. Not tested with single stack (ipv4 or ipv6) environment
4. ~Not tested with multiple ip records per stack~ manually tested with
wsj.com
5. Not tested with multiple interface environment
2023-08-01 08:49:05 -07:00
Eugene Ostroukhov c73e743637
[python][interop] Use python:3.9-slim as a baseimage (#33931)
These are officially maintained images with minimal packages needed for running Python
2023-07-31 17:04:22 -07:00
Xuan Wang 82e506c7b2
[python O11Y] Refactor census propagation flow. (#33561)
Refactored OpenCensus context propagation flow, now propagation happens
for each call and context will be automatically propagated from gRPC
server to gRPC client.

We're using `execution_context` in OpenCensus since the context is
related to OpenCensus and it helps wrap `contextVar` for us.

### Testing
* Added a new Bazel test case for context propagation. 

<!--

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-07-28 13:26:13 -07:00
Xuan Wang 96140caba6
[Aio AioRpcError] Allow pickle AioRpcError (#33891)
Fix: #33643.

This change adds `__reduce__` to `AioRpcError` to allow pickle.

### Testing

Added bazel unit test, without this change, test will fail with error:
```
TypeError: AioRpcError.__init__() missing 3 required positional arguments: 'code', 'initial_metadata', and 'trailing_metadata'
```
2023-07-27 12:16:23 -07:00
Xuan Wang 9e5c3652d7
[print backtrace] Print exception backtrace for all exceptions (#33442)
Action item from: https://github.com/grpc/grpc/issues/33364
<!--

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.

-->

### Before change:

* Printable Exception (Only printing exception):
```
ERROR:grpc._server:Exception calling application: Test exception
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2110/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: Test exception
ERROR
```

* Un-Printable Exception (Only printing traceback):
```
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2112/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: <unprintable TestException object>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2112/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 574, in _call_behavior
    details = "Exception calling application: {}".format(
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2112/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 536, in __str__
    return 'Test exception {0}'.format(self.val)
AttributeError: 'TestException' object has no attribute 'val'
ERROR:grpc._server:Calling application raised unprintable Exception!
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2112/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: <unprintable TestException object>
ERROR
```

### After change:

* Printable Exception (Printing both exception and traceback):
```
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2114/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: Test exception
ERROR:grpc._server:Exception calling application: Test exception
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2114/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: Test exception
ERROR
```

* Un-Printable Exception (Printing both exception and traceback):
```
ERROR:grpc._server:['Traceback (most recent call last):\n', '  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2116/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior\n    raise TestException\n', 'grpc._server.TestException: <unprintable TestException object>\n']
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2116/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: <unprintable TestException object>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2116/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 574, in _call_behavior
    details = "Exception calling application: {}".format(
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2116/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 536, in __str__
    return 'Test exception {0}'.format(self.val)
AttributeError: 'TestException' object has no attribute 'val'
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2116/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: <unprintable TestException object>
ERROR:grpc._server:Calling application raised unprintable Exception!
Traceback (most recent call last):
  File "/usr/local/google/home/xuanwn/.cache/bazel/_bazel_xuanwn/da3828576aa39e99a5c826cc2e2e22fb/sandbox/linux-sandbox/2116/execroot/com_github_grpc_grpc/bazel-out/k8-fastbuild/bin/src/python/grpcio_tests/tests/unit/_metadata_test.native.runfiles/com_github_grpc_grpc/src/python/grpcio/grpc/_server.py", line 561, in _call_behavior
    raise TestException
grpc._server.TestException: <unprintable TestException object>
ERROR
```
2023-07-27 12:16:10 -07:00
Alisha Nanda 15bb1267c1
[observability] Update Python calltracer implementation (#33899) 2023-07-27 12:07:11 -07:00
Craig Tiller 3717ff04ba
[chttp2] Split ping policy from transport (#33703)
Why: Cleanup for chttp2_transport ahead of promise conversion - lots of
logic has become interleaved throughout chttp2, so some effort to
isolate logic out is warranted ahead of that conversion.

What: Split configuration and policy tracking for each of ping rate
throttling and abuse detection into their own modules. Add tests for
them.

Incidentally: Split channel args into their own header so that we can
split the policy stuff into separate build targets.

---------

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2023-07-26 09:19:35 -07:00
Richard Belleville 498fc99479
[packaging] Publish xds-protos as part of the standard package pipeline (#33797)
This PR:

- Fixes the xds-protos Python package, which was broken when the `udpa`
submodule was removed
  - This required re-adding the protoc-gen-validate submodule
- Adds non-Bazel tests for xds-protos and all of its dependent packages
- Versions xds-protos the same way as the rest of the Python packages
- Fixes Python 3.11 support in `run_tests.py`, which is necessary for
the testing mentioned above


CC @sergiitk You won't be able to consume this in the interop tests
until it makes it into a release. I'm thinking I'll want to backport
this to the 1.57.x branch to make that happen faster.

CC @drfloob to inform him about the likely backport.
2023-07-25 16:41:02 -07:00
Eugene Ostroukhov 8bdbd96ba8
[Interop] Update docker images (#33847)
This fixes the security issues that were identified.
2023-07-24 16:39:19 -07:00
Vignesh Babu 087b74f739
Revert "Revert "[interop] Add absl dependency to interop server"" #33828 (#33830)
Reverts https://github.com/grpc/grpc/pull/33676

The serve method needs to be called with args. The previous attempt did
not change the signature in commands.py which lead to errors such as
https://screenshot.googleplex.com/6wZVER9ZETMGAmA.

The fix is in
4e211d0291
2023-07-24 12:02:02 -07:00
AJ Heller 42b0d01e68
[Release] Bump version to 1.58.0-dev (on master branch) (#33825)
Change was created by the release automation script. See go/grpc-release
2023-07-24 10:09:08 -07:00