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
executor: fix context-cancellation leaks, local copy bugs, drop dead options
- sshRun: buffer the done channel so the command goroutine can exit
after a ctx-cancel return instead of blocking forever (goroutine leak).
- sftpUpload/sftpDownload: build the sftp client over an ssh session we
hold (newSftpSession), and on ctx-cancel close that session to abort
the in-flight transfer from outside the sftp mutex, then drain the copy
goroutine before returning. newSftpSession drains the session stderr
pipe in a goroutine (RequestSubsystem never starts the copy that
Session.Stderr would use, so unread stderr would stall the channel).
The cancel drain is bounded by a grace timeout so an app-level wedge
cannot hang the deploy; a transport-level wedge is left to a follow-up.
- sftpDownload now downloads into a temp file in the destination dir and
renames over the destination only on success, so a canceled or failed
download no longer truncates or destroys an existing local file (newly
reachable now that a download actually aborts mid-copy).
- Local.Upload: multi-file glob + mkdir creates the destination directory
itself, and honors context cancellation between files.
- Local.Download: pass the caller context through.
- Connector.String: cap the private-key slice with min().
- Remove dead options never read by any executor: Checksum from
UpDownOpts and SyncOpts, and Force from SyncOpts, plus the config
sync 'force' field (undocumented no-op) and its schema entry. Behavior
change: under strict YAML a playbook that set 'sync: {force: true}'
will now fail to parse.
0 commit comments