kaxil commented on code in PR #69914:
URL: https://github.com/apache/airflow/pull/69914#discussion_r3605779196
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -377,6 +391,18 @@ def __init__(
log_formatter: Callable[[str, str], str] | None = None,
**kwargs,
) -> None:
+ if "reattach_on_restart" in kwargs:
Review Comment:
Pulling `reattach_on_restart` out of the named signature into `**kwargs`
breaks DAG-level `default_args={"reattach_on_restart": ...}`. `apply_defaults`
only forwards `default_args` keys that match a declared `__init__` parameter
(the `for arg in sig_cache.parameters` loop in task-sdk `bases/operator.py`),
so a `**kwargs`-only key isn't in that set, gets dropped, and the task then
silently falls back to `durable=True`.
I verified this against task-sdk: the same param declared as a named arg
gets `default_args` applied, but read from `**kwargs` it's ignored. A direct
`KubernetesPodOperator(reattach_on_restart=False)` still works, so only the
`default_args` path regresses, which dents the "existing configurations map
onto durable with zero behavior change" promise.
Keeping `reattach_on_restart` as a real (deprecated) named param, still
emitting the warning, would cover both paths.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]