-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Conversation
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. |
3093e54
to
54b6d15
Compare
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> Co-authored-by: Kaxil Naik <kaxilnaik@apache.org>
54b6d15
to
54939b4
Compare
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. |
sorry to nudge but what else should be done before the merge? thanks. |
Thank you! |
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 aparamiko.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?