You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
While reviewing #89 I thought about how to set a timeout on the rollout commands. Go provides a CommandContext that is designed to allow you to cancel a command via a context cancel. See https://golang.org/pkg/os/exec/#CommandContext
The provided context is used to kill the process (by calling os.Process.Kill) if the context becomes done before the command completes on its own.
We should update func (et ExecTask) Execute() (ExecResult, error) to accept a context so that the caller can set a timeout and explicitly control the max length of a command.
I thought about how to set a timeout on the rollout commands
^ this is part of kubectl
--timeout=0s: The length of time to wait before ending watch, zero means never. Any other values should contain a
corresponding time unit (e.g. 1s, 2m, 3h).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
While reviewing #89 I thought about how to set a timeout on the rollout commands. Go provides a
CommandContext
that is designed to allow you to cancel a command via a context cancel. See https://golang.org/pkg/os/exec/#CommandContextWe should update
func (et ExecTask) Execute() (ExecResult, error)
to accept a context so that the caller can set a timeout and explicitly control the max length of a command.Expected Behaviour
Methods like
certManagerReady()
should look likePossible Solution
contetxt.Background()
exec.CommandContext
instead ofexec.Command
Execute
to send at least a nil contextThe text was updated successfully, but these errors were encountered: