Skip to content

Concurrent SFTP directory transfers drop the parent hook's connection overrides #73585

Description

@potiuk

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions