-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
area:providerskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yetprovider:sftp
Description
Apache Airflow Provider(s)
sftp
Versions of Apache Airflow Providers
apache-airflow-providers-sftp 5.1.0
Apache Airflow version
2.10.4+astro.1
Operating System
Astronomer Runtime 12.6.0
Deployment
Astronomer
Deployment details
No response
What happened
We have python operator code that expects SFTPHook.get_conn() to return a paramiko.SFTPClient instance.
In 5.1.0 this code was changed to return Generator[SFTPClient] instead. This is causing this existing code to fail:
conn = sftpHook.get_conn()
conn.listdir_attr(remoteRootDir)
with this error:
AttributeError: '_GeneratorContextManager' object has no attribute 'listdir_attr'
Reverting to version 5.0.0 allows the code to run as before.
What you think should happen instead
Breaking changes should be documented in the changelog.
How to reproduce
conn = sftpHook.get_conn()
conn.listdir_attr(remoteRootDir)
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
vivek-meka
Metadata
Metadata
Assignees
Labels
area:providerskind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yetprovider:sftp