kaxil commented on code in PR #29014:
URL: https://github.com/apache/airflow/pull/29014#discussion_r1073723719
##########
airflow/providers/dbt/cloud/operators/dbt.py:
##########
@@ -91,8 +96,17 @@ def __init__(
timeout: int = 60 * 60 * 24 * 7,
check_interval: int = 60,
additional_run_config: dict[str, Any] | None = None,
+ deferrable: bool = False,
**kwargs,
) -> None:
+ # TODO: Remove once deprecated
+ if wait_for_termination:
+ warnings.warn(
+ "Argument `wait_for_termination` will be deprecated and
removed "
+ "in a future release. Please use `deferrable` instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
Review Comment:
Yea, we don't need to remove `wait_for_termination`. It should just signify
whether to submit and forget or submit and (poll or defer).
1. When `wait_for_termination=True` and `deferrable=False`, we submit and
"poll" on the worker
2. When `wait_for_termination=True` and `deferrable=True`, we submit and
"defer" using Triggerer
3. When `wait_for_termination=False` and `deferrable=False`, we only submit
4. When `wait_for_termination=False` and `deferrable=True`, we only submit
and no deferrable takes place <--- this is where we should warn saying
"Deferrable=True" does not have any effect as `wait_for_termination=False`
--
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]