shubham4315 opened a new issue, #47201:
URL: https://github.com/apache/airflow/issues/47201

   ### Apache Airflow Provider(s)
   
   sftp
   
   ### Versions of Apache Airflow Providers
   
   The latest version of apache-airflow-providers-sftp (5.1.0) has encountered 
an issue due to the removal of the close_conn() function in a recent 
commit.(https://github.com/apache/airflow/commit/fbd19da9208a282a9d208bb3be2294b61fe11449#diff-d12bfdf9541f6eaf52829b1040a95cc70d8e91a78d3eebe2771232d8ba5d7888L102-L106)
   
   
![Image](https://github.com/user-attachments/assets/761deb02-c734-4d4d-b6f6-babd3949ccff)
   
   The SFTP sensor continues to invoke the close_conn() function, resulting in 
an 
error.(https://github.com/apache/airflow/blob/main/providers/sftp/src/airflow/providers/sftp/sensors/sftp.py#L132)
   
   PS:
   I have just downgraded the package to version 5.0.0, and it is functioning 
properly.
   
   ### Apache Airflow version
   
   2.9.1
   
   ### Operating System
   
   linux
   
   ### Deployment
   
   Google Cloud Composer
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   _No response_
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   Install apache-airflow-providers-sftp 5.1.0
   
   `
   
   from airflow.models import DAG
   from airflow.providers.sftp.sensors.sftp import SFTPSensor
   from airflow.operators.empty import EmptyOperator
   from airflow.providers.sftp.operators.sftp import SFTPOperator
   
   
   with DAG(
       "airflow_file_trigger_poc",
       schedule_interval=None
   ) as dag:
       
       start_task = EmptyOperator(
           task_id="start-task"
       )
       
       wait_for_file = SFTPSensor(
           sftp_conn_id="XYZ_SFTP",
           path="feed/test.csv",
           task_id="check-for-file",
           poke_interval=10
       )
       
       end_task = EmptyOperator(
           task_id="end-task"
       )
       
       start_task >> wait_for_file >> end_task
   
   `
   
   If you run this, you will find the error. 
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]

Reply via email to