You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "namanjain24-sudo (via GitHub)" <gi...@apache.org> on 2026/09/23 06:48:57 UTC

[PR] Fix SFTPHookAsync letting a connection's known_hosts extra override an explicit constructor path [airflow]

namanjain24-sudo opened a new pull request, #73593:
URL: https://github.com/apache/airflow/pull/73593

   `_parse_extras()` decided whether to take `known_hosts` from the connection's extra by comparing the already-expanded `self.known_hosts` against the literal, un-expanded `"~/.ssh/known_hosts"` default. Since `__init__` always runs `known_hosts` through `os.path.expanduser()`, the two values can never be equal, so the comparison was always true: a connection-level `known_hosts` extra silently replaced even a path passed explicitly to the constructor.
   
   `SSHHookAsync` gets this right elsewhere in the same file, by expanding the default before comparing and only falling back to the extra when the constructor was left at that default. This applies the same pattern to `SFTPHookAsync`.
   
   closes: #73584
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Sonnet 5)
   
   Generated-by: Claude Code (Sonnet 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix SFTPHookAsync letting a connection's known_hosts extra override an explicit constructor path [airflow]

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 merged PR #73593:
URL: https://github.com/apache/airflow/pull/73593


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org