Surface dbt Cloud failure details in Airflow task logs - #70171
Open
br413 wants to merge 4 commits into
Open
Conversation
Log run status, status messages, and failed run steps when a dbt Cloud job run reaches ERROR or CANCELLED in the hook, operator, and sensor. Closes apache#46923
2 tasks
- Mock log_job_run_failure_details in deferrable operator failure test - Expect extra get_job_run call when logging ERROR/CANCELLED runs - Fix sensor test account_id assertion; add newsfragment; ruff format
Author
|
Rebased onto latest \main\ and fixed CI (5136e5d + 8a7a4bc): mock failure logging in deferrable operator test, expect the extra \get_job_run\ fetch on ERROR/CANCELLED paths, fix sensor \�ccount_id\ assertion, add newsfragment, ruff-format. Ready for another CI run when you have a moment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
log_job_run_failure_detailstoDbtCloudHookto fetch run steps and log status, messages, and failed step detailswait_for_job_run_status,DbtCloudRunJobOperator, andDbtCloudJobRunSensorbefore raising on ERROR/CANCELLEDCloses #46923
Test plan
pytest providers/dbt/cloud/tests/unit/dbt/cloud/hooks/test_dbt.py -k log_job_run_failurepytest providers/dbt/cloud/tests/unit/dbt/cloud/sensors/test_dbt.py -k poke_with_exception