-
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
Make skip_exit_code configurable in BashOperator #14963
Conversation
The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason. |
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.
No concerns from me, especially since this has not been released yet.
lgtm.... the other option would be to make it configurable i.e. an operator parameter maybe this would be best, actually .... and if |
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 master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
I'll rework this to have a configurable skip exit code, good idea. |
Concerning which exit code to use as the default, coincidentally I just got exit code 100 while building docs.... This page suggest best to use something <= 125: https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html Did some googling and found no usages of 99.... I'm sure there are other uncommonly used ones to be found |
01344c9
to
cc114bb
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've made one suggestion for parameterizing test but looks good to me otherwise :)
63dbdce
to
2df76e9
Compare
2df76e9
to
d0313cc
Compare
The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason. |
Exit code 127 is used when a command is not found and we don't want to skip those tasks. Exit code 99 was arbitrarily chosen, however, most importantly it isn't used as a standard exit code: https://tldp.org/LDP/abs/html/exitcodes.html This also allows users to provide their own `skip_exit_code` if they want to use a different exit code than the default 99.
Co-authored-by: Daniel Standish <15932138+dstandish@users.noreply.github.com>
d0313cc
to
76a3d34
Compare
Exit code 127 is used when a command is not found and we don't want to
skip those tasks. Exit code 100 was arbitrarily chosen, however, most
importantly it isn't used as a standard exit code:
https://tldp.org/LDP/abs/html/exitcodes.html