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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
