Skip to content
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

Delay the creation of ssh proxy until get_conn() #20474

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

derkuci
Copy link
Contributor

@derkuci derkuci commented Dec 22, 2021

We recently upgraded from Airflow 1.9 to 2.2.2 (to be more precise, we are still in the process of upgrading, dealing with various issues related to the upgrade). I like the change that the newly refactored SSHHook initializes most of the parameters in __init__, making customization easier. However, there is one "heavy" operation related to SSH proxy which I wonder might be better off moving back to where it will be used.

I noticed that for every 30+ seconds (min_file_process_interval=30), during the run of DAGFileProcessor, a bunch of SSH processes would be launched. This is because a paramiko.ProxyCommand is ran for any connection used in tasks, as long as that connection has a "ProxyCommand" in the .ssh/config file. This seems too much (also heavy) to me.

I wonder if a change in the spirit of the attached pull request is acceptable or not?

@github-actions
Copy link

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.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Dec 24, 2021
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Kaxil Naik <kaxilnaik@apache.org>
@derkuci
Copy link
Contributor Author

derkuci commented Dec 24, 2021

I rebased and squashed the changes, expecting that's a required step (let me know if it's not the case). Please let me know if there are more things to do before the merge. Thanks.

@derkuci
Copy link
Contributor Author

derkuci commented Jan 5, 2022

sorry to nudge but what else should be done before the merge? thanks.

@potiuk potiuk merged commit 129b4d2 into apache:main Jan 9, 2022
@derkuci
Copy link
Contributor Author

derkuci commented Jan 11, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants