Taragolis commented on code in PR #29014:
URL: https://github.com/apache/airflow/pull/29014#discussion_r1073586586
##########
airflow/providers/dbt/cloud/hooks/dbt.py:
##########
@@ -125,6 +128,34 @@ class DbtCloudJobRunException(AirflowException):
"""An exception that indicates a job run failed to complete."""
+T = TypeVar("T", bound=Any)
+
+
+def provide_account_id(func: T) -> T:
+ """
+ Decorator which provides a fallback value for ``account_id``. If the
``account_id`` is None or not passed
+ to the decorated function, the value will be taken from the configured dbt
Cloud Airflow Connection.
+ """
+ function_signature = signature(func)
Review Comment:
The problem with this wrapper (as well as other same decorators which
already exists in community providers) that every time we access to method
which decorated by this function we need to lookup for connection in Secrets
Backend (if configured), Environment Variables and Airflow Database.
Is any way to make it cashable? Something like that:
https://github.com/apache/airflow/pull/28716
##########
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:
Well is this provide changes which break users pipelines who do not use
`triggerer` in their installation and as well as users of MWAA (`triggerer` not
available) and Cloud Composer (`triggerer` in preview)?
--
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]