GRPCRoute conformance tests failing with client connection is closing
#3122
Labels
kind/bug
Categorizes issue or PR as related to a bug.
client connection is closing
#3122
What happened:
Our GRPCRoute conformance tests are failing running against the main branch with
RPC finished with error: rpc error: code = Canceled desc = grpc: the client connection is closing
These are running and working successfully against v1.1.0.
What you expected to happen:
The requests are not cancelled and the tests pass
How to reproduce it (as minimally and precisely as possible):
Run the conformance test suite against any implementation using the default GRPC client
Anything else we need to know?:
As far as I can tell, this is happening as a result of #3095.
As part of the changes introduced in this PR, we are sharing one client between all requests instead of instantiating a new client for every GRPC request. However, each request is still calling
defer c.Close()
which means the client connection will be closed when this function returns even if another request is using the connection. Additionally, each call tosendRPC
sets the connection specific to the call being made, and will reset the current connection if present. Because the tests run in parallel, this is causing conflicts and race conditions.Example conformance test run with the failures: https://github.com/nginxinc/nginx-gateway-fabric/actions/runs/9312728851/job/25634135132
The text was updated successfully, but these errors were encountered: