grpc/src/python
Xuan Wang 5452017fa4
[Async ExecuteBatchError Issue] Log instead of raise ExecuteBatchError in Aysncio server (#32551)
### Description
When invoking a RPC, sometimes operations in core will fail which result
in an `ExecuteBatchError`, currently we [simply raise this
error](https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi#L705),
and left this Exception unhandled in event loop with error message `Task
exception was never retrieved`.

### Changes included
This PR changes the behavior to log the `ExecuteBatchError` instead of
raising it.

This shouldn't change existing behavior because even without this
change, the exception will simply left on event loop.

### Testing

Tested by manually `set_expection` in [this
future](https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi#L84),
verified that error was logged correctly and no exception was left in
event loop, sample log:

```
ERROR:grpc._cython.cygrpc:ExecuteBatchError raised in core by servicer method [/grpc.testing.TestService/UnaryCall]
Traceback (most recent call last):
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi", line 682, in _cython.cygrpc._handle_exceptions
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi", line 802, in _handle_rpc
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi", line 547, in _handle_unary_unary_rpc
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi", line 452, in _finish_handler_with_unary_response
  File "src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi", line 106, in execute_wrong_batch
_cython.cygrpc.ExecuteBatchError: Failed "execute_batch_including_SendInitialMetadataOperation": (<_cython.cygrpc.SendInitialMetadataOperation object at 0x7fa86d936ca0>, <_cython.cygrpc.SendMessageOperation object at 0x7fa86cf48cb0>, <_cython.cygrpc.SendStatusFromServerOperation object at 0x7fa86cf4c110>)
```
2023-04-05 15:23:59 -07:00
..
grpcio [Async ExecuteBatchError Issue] Log instead of raise ExecuteBatchError in Aysncio server (#32551) 2023-04-05 15:23:59 -07:00
grpcio_admin [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
grpcio_channelz [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
grpcio_csds [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
grpcio_health_checking [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
grpcio_reflection [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
grpcio_status [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
grpcio_testing [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
grpcio_tests [Release process] Bump version to 1.55.0-dev (on master branch) (#32743) 2023-03-29 11:03:07 -07:00
.gitignore Format code 2018-10-31 11:47:13 -07:00