testkube icon indicating copy to clipboard operation
testkube copied to clipboard

Pass context from requests to clients calls

Open exu opened this issue 3 years ago • 2 comments

Why should it be implemented? Currently request when cancelled will not affect execution.

Describe the improvement Pass context from fibers c.Context() to clients who use contexts on the end

exu avatar Sep 01 '21 11:09 exu

Is this related with graceful shutdown ? @dejanzele

TheBrunoLopes avatar Sep 16 '22 10:09 TheBrunoLopes

@TheBrunoLopes

Yes, and it is also related with good Golang practices. If we pass the context everywhere and handle it correctly (ie. listening for ctx.Done()), then we could gracefully shutdown/terminate any resource we created, ie. HTTP/gRPC server, close goroutines which do not need to rougely run in the background... Also we could add timeouts or cancellations to contexts, handle SIGTEM/SIGKILL with contexts...

dejanzele avatar Sep 16 '22 11:09 dejanzele