@@ -96,16 +96,21 @@ class TaskDecoratorCollection:
96
96
multiple_outputs : bool | None = None ,
97
97
# 'python_callable', 'op_args' and 'op_kwargs' since they are filled by
98
98
# _PythonVirtualenvDecoratedOperator.
99
+ python_callable : Callable ,
100
+ op_args : Collection [Any ] | None = None ,
101
+ op_kwargs : Mapping [str , Any ] | None = None ,
99
102
requirements : None | Iterable [str ] | str = None ,
100
103
python_version : None | str | int | float = None ,
101
104
serializer : Literal ["pickle" , "cloudpickle" , "dill" ] | None = None ,
102
105
system_site_packages : bool = True ,
103
106
templates_dict : Mapping [str , Any ] | None = None ,
107
+ templates_exts : list [str ] | None = None ,
104
108
pip_install_options : list [str ] | None = None ,
109
+ expect_airflow : bool = True ,
105
110
skip_on_exit_code : int | Container [int ] | None = None ,
106
111
index_urls : None | Collection [str ] | str = None ,
107
112
venv_cache_path : None | str = None ,
108
- show_return_value_in_logs : bool = True ,
113
+ string_args : Iterable [ str ] | None = None ,
109
114
env_vars : dict [str , str ] | None = None ,
110
115
inherit_env : bool = True ,
111
116
** kwargs ,
@@ -218,18 +223,24 @@ class TaskDecoratorCollection:
218
223
self ,
219
224
* ,
220
225
multiple_outputs : bool | None = None ,
221
- # 'python_callable', 'op_args' and 'op_kwargs' since they are filled by
222
- # _PythonVirtualenvDecoratedOperator.
226
+ python_callable : Callable ,
223
227
requirements : None | Iterable [str ] | str = None ,
228
+ op_args : Collection [Any ] | None = None ,
229
+ op_kwargs : Mapping [str , Any ] | None = None ,
230
+ string_args : Iterable [str ] | None = None ,
224
231
python_version : None | str | int | float = None ,
225
232
serializer : Literal ["pickle" , "cloudpickle" , "dill" ] | None = None ,
226
233
system_site_packages : bool = True ,
227
234
templates_dict : Mapping [str , Any ] | None = None ,
235
+ templates_exts : list [str ] | None = None ,
228
236
pip_install_options : list [str ] | None = None ,
229
237
skip_on_exit_code : int | Container [int ] | None = None ,
230
238
index_urls : None | Collection [str ] | str = None ,
231
239
venv_cache_path : None | str = None ,
240
+ expect_airflow : bool = True ,
232
241
show_return_value_in_logs : bool = True ,
242
+ env_vars : dict [str , str ] | None = None ,
243
+ inherit_env : bool = True ,
233
244
** kwargs ,
234
245
) -> TaskDecorator :
235
246
"""Create a decorator to wrap the decorated callable into a BranchPythonVirtualenvOperator.
@@ -507,6 +518,7 @@ class TaskDecoratorCollection:
507
518
image : str | None = None ,
508
519
name : str | None = None ,
509
520
random_name_suffix : bool = ...,
521
+ cmds : list [str ] | None = None ,
510
522
arguments : list [str ] | None = None ,
511
523
ports : list [k8s .V1ContainerPort ] | None = None ,
512
524
volume_mounts : list [k8s .V1VolumeMount ] | None = None ,
@@ -520,6 +532,7 @@ class TaskDecoratorCollection:
520
532
reattach_on_restart : bool = ...,
521
533
startup_timeout_seconds : int = ...,
522
534
startup_check_interval_seconds : int = ...,
535
+ schedule_timeout_seconds : int | None = None ,
523
536
get_logs : bool = True ,
524
537
container_logs : Iterable [str ] | str | Literal [True ] = ...,
525
538
image_pull_policy : str | None = None ,
@@ -530,6 +543,7 @@ class TaskDecoratorCollection:
530
543
node_selector : dict | None = None ,
531
544
image_pull_secrets : list [k8s .V1LocalObjectReference ] | None = None ,
532
545
service_account_name : str | None = None ,
546
+ automount_service_account_token : bool | None = None ,
533
547
hostnetwork : bool = False ,
534
548
host_aliases : list [k8s .V1HostAlias ] | None = None ,
535
549
tolerations : list [k8s .V1Toleration ] | None = None ,
@@ -553,13 +567,19 @@ class TaskDecoratorCollection:
553
567
skip_on_exit_code : int | Container [int ] | None = None ,
554
568
base_container_name : str | None = None ,
555
569
base_container_status_polling_interval : float = ...,
570
+ init_container_logs : Iterable [str ] | str | Literal [True ] | None = None ,
556
571
deferrable : bool = ...,
557
572
poll_interval : float = ...,
558
573
log_pod_spec_on_failure : bool = ...,
559
574
on_finish_action : str = ...,
575
+ is_delete_operator_pod : None | bool = None ,
560
576
termination_message_policy : str = ...,
561
577
active_deadline_seconds : int | None = None ,
578
+ callbacks : (
579
+ list [type [KubernetesPodOperatorCallback ]] | type [KubernetesPodOperatorCallback ] | None
580
+ ) = None ,
562
581
progress_callback : Callable [[str ], None ] | None = None ,
582
+ logging_interval : int | None = None ,
563
583
** kwargs ,
564
584
) -> TaskDecorator :
565
585
"""Create a decorator to convert a callable to a Kubernetes Pod task.
@@ -849,6 +869,8 @@ class TaskDecoratorCollection:
849
869
mode : str = ...,
850
870
exponential_backoff : bool = False ,
851
871
max_wait : timedelta | float | None = None ,
872
+ silent_fail : bool = False ,
873
+ never_fail : bool = False ,
852
874
** kwargs ,
853
875
) -> TaskDecorator :
854
876
"""
@@ -873,6 +895,13 @@ class TaskDecoratorCollection:
873
895
:param exponential_backoff: allow progressive longer waits between
874
896
pokes by using exponential backoff algorithm
875
897
:param max_wait: maximum wait interval between pokes, can be ``timedelta`` or ``float`` seconds
898
+ :param silent_fail: If true, and poke method raises an exception different from
899
+ AirflowSensorTimeout, AirflowTaskTimeout, AirflowSkipException
900
+ and AirflowFailException, the sensor will log the error and continue
901
+ its execution. Otherwise, the sensor task fails, and it can be retried
902
+ based on the provided `retries` parameter.
903
+ :param never_fail: If true, and poke method raises an exception, sensor will be skipped.
904
+ Mutually exclusive with soft_fail.
876
905
"""
877
906
@overload
878
907
def sensor (self , python_callable : Callable [FParams , FReturn ] | None = None ) -> Task [FParams , FReturn ]: ...
0 commit comments