-
Notifications
You must be signed in to change notification settings - Fork 16.4k
SFTP hook to prefer the SSH paramiko key over the key file path #18988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
|
Could you address the review comment in the original PR? Namely https://github.com/apache/airflow/pull/16338/files#r649058789 |
Done! |
uranusjr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming CI passes.
|
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
This reverts commit e610576.
Remove the link to pysftp. SFTP Connection's private_key is the key content, while pysftp's private_key is a file path. Readers should look at the documentation for SFTP Connection for argument definitions
Since private_key is now the actual private key content, and key_file is not the path to the private key file
|
Awesome work, congrats on your first merged pull request! |
Related issue: #16323
The SFTP hook does not allow for a SSH private key string to be used, only a private key file path. As it is based on the SSH hook, which does allow for a private key string to be used, a small change could align these two hooks.
This change first checks if a paramiko object is present after the SSH hook has been initialised, and the prefers that rather than the ssh key file path.
This PR replaces stale PR #16338