pulumi-command
pulumi-command copied to clipboard
Fix panic on remote connection errors
There was a panic in remote.dialWithRetry() on the context cancellation, e.g. when the timeout specified by pulumi.Timeouts() passed to remote.NewCommand() exceeded.
retry.Until() when the context is cancelled returns: ok = false, data = nil, err = nil; so if we try to cast data to T, we get panic:
interface conversion: interface {} is nil, not T
We can cast data to T in remote.dialWithRetry(), not only when err returned from retry.Until() is nil, but also when ok is true.