For the client, the deadline set in the ctx only affects the grpc-timeout header sent to the server. It does not affect how requests time out on the client-side. Currently if the deadline is larger than the hard-coded 5s timeout, the request will timeout too soon. Also if the deadline is shorter than 5s, but the server does not reply according to the deadline, it will take 5s for the request to time out.
I think it would make sense for the deadline to affect the local timeouts as well, and not only the grpc-timeout header.
For the client, the deadline set in the ctx only affects the grpc-timeout header sent to the server. It does not affect how requests time out on the client-side. Currently if the deadline is larger than the hard-coded 5s timeout, the request will timeout too soon. Also if the deadline is shorter than 5s, but the server does not reply according to the deadline, it will take 5s for the request to time out.
I think it would make sense for the deadline to affect the local timeouts as well, and not only the grpc-timeout header.