-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Allow setting specific cwd for BashOperator #17751
Conversation
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
@uranusjr This is the first time that I create the PR to airflow. |
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.
This should avoid the need to add cwd to the dictionary. I think more people are familiar with the term working directory (it’s also easier to Google this term if they aren’t).
@uranusjr I'm a little confused about this issue. I have committed the |
Yes I need to re-approve. But first place rebase to |
aefb086
to
cf32ed1
Compare
@uranusjr I rebase to main already. I followed the doc I hope what I did is correct. |
cf32ed1
to
f79711d
Compare
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.
I think this is good to go if CI passes.
@uranusjr But it failed again. 😅 |
@uranusjr I found that the test |
trigger CI |
trigger CI |
Looks like All tests are passing except that one, so this is good to go IMO. |
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
f7edd32
to
dce4e40
Compare
As the test bug is fixed in the PR: #17916 |
cwd
in BashOperator
Awesome work, congrats on your first merged pull request! |
For this change, the
BashOperator
allows the user to specify the command folder.As if the user wants to execute a command in the amount folder which contains lots of project scripts, he can just specify the bash_cwd to the folder and he doesn't need to switch the folder manually.
I did the pre-commit check and added the unit-test for the changes.
If I miss other necessary works for creating the PR, please let me know.
Thanks a lot.