You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "SEPURI-SAI-KRISHNA (via GitHub)" <gi...@apache.org> on 2026/10/04 17:34:14 UTC

[PR] Apply hook_params to deferred dbt Cloud job runs [airflow]

SEPURI-SAI-KRISHNA opened a new pull request, #74199:
URL: https://github.com/apache/airflow/pull/74199

   `DbtCloudRunJobOperator` accepts `hook_params`, documented as "Extra arguments passed to the DbtCloudHook constructor", and applies them on the worker: its `hook` property is `DbtCloudHook(self.dbt_cloud_conn_id, **self.hook_params)`. When the operator defers, it did not pass them to `DbtCloudRunJobTrigger`, so the triggerer built its hook as `DbtCloudHook(self.conn_id)` with the defaults. A configured `retry_limit` or `retry_delay` applied before the task deferred and was silently ignored afterwards.
   
   The trigger has needed no change: it already accepts `hook_params`, keeps it across serialization, and uses it when it builds the hook. `DbtCloudJobRunSensor` already passes it, since #57242 added `hook_params` to the sensor to align it with the operators in this provider. That left the operator's own deferred path as the one call site still dropping it, which is what this changes.
   
   **Tests**
   
   A new test asserts the trigger receives the operator's `hook_params`. It fails without the one-line change.
   
   It is worth being explicit that this also **modifies an existing test**. `test_execute_deferrable_does_not_pass_execution_timeout_to_defer` pins the trigger's complete keyword set with `assert_called_once_with`, so adding an argument necessarily changes it. The edit adds `hook_params={}`, which is what the operator's default produces. That test also fails against the unpatched operator, so the assertion is pinned to the new behaviour rather than relaxed to accommodate it.
   
   Also run: the full `providers/dbt/cloud` suite (288 passed) and mypy.
   
   **On a changelog entry**
   
   I have not added one. The parameter was always documented as reaching the hook, so this makes the documented behaviour true rather than changing a contract, and a reviewer on a sibling PR of mine noted that a changelog entry for this kind of bugfix is debatable. Happy to add one if you would rather have it.
   
   No existing issue; opening the PR directly rather than filing one first.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes - Claude Code (Opus 5)
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Apply hook_params to deferred dbt Cloud job runs [airflow]

Posted by "josh-fell (via GitHub)" <gi...@apache.org>.
josh-fell merged PR #74199:
URL: https://github.com/apache/airflow/pull/74199


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org