SFTPHook.store_directory_concurrently() and retrieve_directory_concurrently() build one hook per worker as:
SFTPHook(ssh_conn_id=self.ssh_conn_id, no_host_key_check=self.no_host_key_check)
Since #73419 the workers inherit no_host_key_check, but every other constructor override on the parent hook is still discarded — remote_host, port, username, password, key_file, proxy settings, timeouts — so the workers fall back to whatever the connection defines. With an explicit remote_host, for example, the directory is listed on that host but the workers transfer against the connection's original host.
Expected: worker hooks are built with the parent's effective connection settings.
Regression test: patch worker-hook construction, configure a parent SFTPHook with a remote_host (and port/username) different from the connection, run a concurrent transfer, and assert every worker hook receives the parent's effective values.
Pre-existing; surfaced during review of #73419 and deliberately left out of that PR's scope.
Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting
SFTPHook.store_directory_concurrently()andretrieve_directory_concurrently()build one hook per worker as:Since #73419 the workers inherit
no_host_key_check, but every other constructor override on the parent hook is still discarded —remote_host,port,username,password,key_file, proxy settings, timeouts — so the workers fall back to whatever the connection defines. With an explicitremote_host, for example, the directory is listed on that host but the workers transfer against the connection's original host.Expected: worker hooks are built with the parent's effective connection settings.
Regression test: patch worker-hook construction, configure a parent
SFTPHookwith aremote_host(and port/username) different from the connection, run a concurrent transfer, and assert every worker hook receives the parent's effective values.Pre-existing; surfaced during review of #73419 and deliberately left out of that PR's scope.
Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting