testkube
testkube copied to clipboard
Pass context from requests to clients calls
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
Is this related with graceful shutdown ? @dejanzele
@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...