Skip to content

v0.11.1

Choose a tag to compare

@snonux snonux released this 17 Sep 05:42
· 505 commits to main since this release

Release v0.11.1

Overview

This is a small patch release focused on improving the robustness of gonf's remote binary synchronization. When gonf automatically syncs a newer binary to remote hosts during a push operation, it now correctly handles SSH port configurations specified via extra SSH options, preventing failures on non-standard port setups.

Bug Fixes

Fixed SCP port flag when pushing to remotes using ssh -p

What was fixed: When gonf needed to sync a newer binary to a remote host (which happens automatically when the remote's plan schema version doesn't support the current push protocol), it used scp under the hood. If you had configured a custom SSH port via ExtraSSH options (e.g., []string{"-p", "2222"}), gonf was passing that flag through verbatim to scp. However, scp interprets -p as "preserve modification times," not as a port specifier — the correct flag is -P.

This meant binary sync could fail silently or behave unexpectedly when your SSH connection used a non-standard port specified through extra options rather than the dedicated Port field.

Why it matters: Users who route SSH traffic through jump hosts, firewalls, or load balancers on non-default ports will now have reliable automatic binary synchronization. The fix translates ssh -p PORT (and scp -P PORT) found in ExtraSSH into the proper scp -P PORT flag, while leaving other SSH options (like -o StrictHostKeyChecking=yes) untouched.

No migration required. This fix is transparent — existing configurations that worked before continue to work, and configurations that relied on ExtraSSH for port specification now work correctly for the binary-sync path.

Technical Details

  • Extracted SCP argument construction into a dedicated scpArgv helper function for clarity and testability
  • Added unit tests verifying the port flag translation logic
  • The fix handles both -p (SSH convention) and -P (SCP convention) in ExtraSSH, taking the first valid port found and merging it with the Port field (the Port field takes precedence if both are set)