amoghrajesh commented on code in PR #69914:
URL: https://github.com/apache/airflow/pull/69914#discussion_r3593952334
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -377,6 +389,18 @@ def __init__(
log_formatter: Callable[[str, str], str] | None = None,
**kwargs,
) -> None:
+ if "reattach_on_restart" in kwargs:
+ # Dropped from the named signature entirely so the warning fires
on any explicit use,
+ # `True` or `False`.
+ reattach_on_restart = kwargs.pop("reattach_on_restart")
+ if AIRFLOW_V_3_3_PLUS:
+ warnings.warn(
+ "`reattach_on_restart` is deprecated and will be removed
in a future release. "
+ "Use `durable` instead.",
+ AirflowProviderDeprecationWarning,
+ stacklevel=2,
+ )
+ durable = reattach_on_restart
Review Comment:
That is already handled - `self.reattach_on_restart = durable` always
mirrors durable's value regardless of Airflow version (3.3+ or not), and code
paths for reattach block is gated purely on `self.reattach_on_restart`, not any
version check.
On versions < 3.3, `_get_pod_from_task_state_store` returns None immediately
since `task_state_store` isn't in context at all, so it falls straight to
`find_pod()` mechanism (current). So `durable=True` or `durable=False` on old
Airflow already behaves exactly like `reattach_on_restart=True/False` did.
--
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]