-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
Description
Apache Airflow Provider(s)
sftp
Versions of Apache Airflow Providers
apache-airflow-providers-sftp==2.2.0
Apache Airflow version
2.2.2 (latest released)
Operating System
Ubuntu 20.04.3 LTS
Deployment
Docker-Compose
Deployment details
No response
What happened
When instantiating an SFTPHook in order to create a connection to an sftp server, I noticed that if I was passing the parameter ssh_conn_id, the hook was trying to connect to localhost, whereas if I am passing ftp_conn_id, I obtain the desired connection.
airflow/airflow/providers/sftp/hooks/sftp.py
Lines 67 to 69 in 35be8bd
| def __init__(self, ftp_conn_id: str = 'sftp_default', *args, **kwargs) -> None: | |
| kwargs['ssh_conn_id'] = ftp_conn_id | |
| super().__init__(*args, **kwargs) |
What you expected to happen
I would expect to be able to instantiate an sftp conection using the parameter ssh_conn_id instead of ftp_conn_id.
How to reproduce
No response
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct