kaxil opened a new pull request, #64225: URL: https://github.com/apache/airflow/pull/64225
## Summary `SSHHook` (sync) defaults `no_host_key_check=True`, but `SSHHookAsync` defaults to `False` when the option is not explicitly set in connection extras. This mismatch causes `SSHRemoteJobOperator` to submit jobs successfully (worker uses the sync hook) while the triggerer fails to poll for completion (uses the async hook), leaving the task stuck in "deferred" state indefinitely. The fix aligns `SSHHookAsync` with `SSHHook` by defaulting `no_host_key_check` to `True` when not configured. ## How to reproduce 1. Create an SSH connection without setting `no_host_key_check` in extras 2. Run an `SSHRemoteJobOperator` DAG 3. The job submits and the task defers, but the triggerer logs: `"Host key is not trusted for host <ip>"` 4. The task stays in deferred/running state forever ## What changed `providers/ssh/src/airflow/providers/ssh/hooks/ssh.py` line 601: ```python # Before -- async hook defaults to False (differs from sync hook) no_host_key_check = str(nhkc_raw).lower() == "true" if nhkc_raw is not None else False # After -- matches sync hook default of True no_host_key_check = str(nhkc_raw).lower() == "true" if nhkc_raw is not None else True ``` -- 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]
