-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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 operator's execution_timeout configurable #22389
make operator's execution_timeout configurable #22389
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)
|
Since it is possible to provide a None |
Thanks for the comment, could you provide more details on your suggestion with an example use case? The default behavior is already Are you suggesting that the string "None" should also be handled? If so, It would be great to hear what is the difference between "empty string" and "None" is, based on use cases. Additionally, how can we achieve that without explicitly checking if the given string is equal to "None". Also |
07da0fc
to
b28d49c
Compare
cf91704
to
59b82c3
Compare
Hi @ashb @eladkal @uranusjr @SamWheating I've addressed all the comments above, could you please review them again? |
59b82c3
to
2fcfcd7
Compare
@sagmansercan you have to fix the failing |
2fcfcd7
to
be3b7fd
Compare
Thank you for warning @Bowrna, seems like it is related to the black version and fixed in #22598 I will try rebasing and see the result after that because it has not resulted from my changes |
By this commit, execution_timeout attribute of the operators is now configurable globally via airflow.cfg. * The default value is still `None`. Users are expected to define a positive integer value to be passed into timedelta object to set timeout in terms of seconds by default, via configuration. * If the key is missing or is set to a non-positive value, then it is considered as `None`. * Added `gettimedelta` method to be used in abstractoperator to get timedelta or None type object. The method raises exception for the values that are not convertible to integer and/or the values too large to be converted to C int. * Sample config cases are added into unit tests. Closes apache#18578
* By this commit, error raises for the values <= 0 instead of using fallback value * Updated unit tests
To be more clear to the user, added relevant error message into to AirflowConfigException.
This parameter specifies the tasks' execution timeout, so all configuration and variable names are now contains `task` in it.
fixed the description of default_task_execution_timeout based on the recent changes
Before this commit, gettimedelta method was preventing user to provide non-positive values. Now it is totally up to users to provide a sensible value for this configuration
be3b7fd
to
7f30f25
Compare
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. |
Awesome work, congrats on your first merged pull request! |
This PR aims to make the execution_timeout attribute to be configurable globally via airflow.cfg.
None
. Users are expected todefine an integer value to be passed into timedelta object
to set the timeout in terms of seconds by default, via configuration.
gettimedelta
method in configuration to be used in abstractoperatorto get timedelta or None type object. The method raises exceptions
for the values that are;
Closes #18578