pulumi-command icon indicating copy to clipboard operation
pulumi-command copied to clipboard

Fix panic on remote connection errors

Open waketheashes opened this issue 1 year ago • 1 comments

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.

waketheashes avatar Sep 05 '24 17:09 waketheashes