potiuk commented on PR #73419: URL: https://github.com/apache/airflow/pull/73419#issuecomment-5786077963
Addressed the second round in `a57753ee30`: - **Deferrable `SFTPOperator` keeps the hook's opt-out.** `SFTPHookAsync` gains a `no_host_key_check` constructor argument (same precedence and conflict rule as `SSHHook`), `SFTPTransferTrigger` carries it (serialized), and the operator passes its hook's effective value when deferring. `SFTPHookAsync._get_conn` now parses extras unconditionally, so the override also applies to connections without extras. The regression test is your suggested shape: supplied `SFTPHook(..., no_host_key_check=True)` → `TaskDeferred` → the trigger's async hook connects with `known_hosts=None`. - **Effective host in the inline `known_hosts` entry.** Both async hooks now use `self.host or conn.host`, matching what `asyncssh.connect()` targets; tests cover the override case on each hook. - **Bare base64 `host_key`.** Normalized to `ssh-rsa <key>` in both async hooks, consistent with the sync hook. The parametrized SFTP test now uses a valid bare RSA key and asserts the three-field entry. - **Docs wording.** "accepting unknown host keys without requiring a known-hosts entry" in both connection docs. - **Test doubles.** The three async SSH tests use real `Connection` objects. The two pre-existing issues you flagged separately are tracked in #73584 (`SFTPHookAsync` `known_hosts` precedence) and #73585 (concurrent worker hooks dropping overrides). `breeze testing providers-tests --test-type "Providers[ssh,sftp]"`: 471 passed, 7 skipped. PTAL. --- Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
