-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make operator's execution_timeout configurable (#22389)
* make operator's execution_timeout configurable 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 #18578 * raise error for non-positive execution_timeout * By this commit, error raises for the values <= 0 instead of using fallback value * Updated unit tests * include OverflowError error message in exception To be more clear to the user, added relevant error message into to AirflowConfigException. * rename default_execution_timeout This parameter specifies the tasks' execution timeout, so all configuration and variable names are now contains `task` in it. * update `version_added` for execution_timeout * update execution_timeout description fixed the description of default_task_execution_timeout based on the recent changes * update inline comment for non-positive value check * update `gettimedelta` docstring * allow non-positive values in gettimedelta 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 Co-authored-by: sercan.sagman <sercan.sagman@inventanalytics.com>
- Loading branch information
1 parent
4201e6e
commit a111a79
Showing
6 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters