dabla commented on code in PR #75271:
URL: https://github.com/apache/airflow/pull/75271#discussion_r4348414443
##########
providers/common/compat/src/airflow/providers/common/compat/_resumable_job_mixin.py:
##########
@@ -32,18 +32,16 @@
if TYPE_CHECKING:
from airflow.sdk.definitions.context import Context
-# Tells "durable left at its default" apart from an explicit
durable=True/False, so only an explicit
-# value warns that it has no effect here.
-_DURABLE_UNSET: Any = object()
-
class ResumableJobMixin:
"""Airflow < 3.3 stand-in: no ``task_state_store`` to resume from, so
every try submits a new job."""
external_id_key: str = "remote_job_id"
- def __init__(self, *, durable: bool = _DURABLE_UNSET, **kwargs: Any) ->
None:
- if durable is not _DURABLE_UNSET:
+ def __init__(self, *, durable: bool | None = None, **kwargs: Any) -> None:
Review Comment:
Good catch, done in bff269b564: `test_durable_left_at_default_does_not_warn`
now runs with `durable` left out and with `durable=None`, so warning on an
explicit `None` again fails both cases.
--
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]