Commit b741857
Raise on unexpected terminal dbt Cloud job run states (#61300)
DbtCloudHook.wait_for_job_run_status previously returned False when a job run
reached a terminal failure state (ERROR or CANCELLED), which could allow Airflow
tasks to succeed silently when dbt Cloud jobs failed.
This change updates the helper to raise DbtCloudJobRunException when a job run
reaches an unexpected terminal state before the expected status is reached,
ensuring task failure semantics correctly reflect external job failures.
Call sites are updated accordingly, and on_kill now guards against propagated
exceptions since cancellation confirmation is best-effort and should not affect task
termination behavior.
Co-authored-by: Sameer Mesiah <smesiah971@gmail.com>1 parent 352feb2 commit b741857
File tree
4 files changed
+35
-15
lines changed- providers/dbt/cloud
- src/airflow/providers/dbt/cloud
- hooks
- operators
- tests/unit/dbt/cloud
- hooks
- operators
4 files changed
+35
-15
lines changedLines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | | - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
801 | 803 | | |
802 | 804 | | |
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
806 | 808 | | |
807 | | - | |
808 | 809 | | |
809 | 810 | | |
810 | 811 | | |
811 | | - | |
812 | | - | |
813 | | - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
814 | 826 | | |
815 | 827 | | |
816 | 828 | | |
| |||
820 | 832 | | |
821 | 833 | | |
822 | 834 | | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | 835 | | |
828 | 836 | | |
829 | 837 | | |
| |||
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
| 259 | + | |
| 260 | + | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
262 | 267 | | |
263 | 268 | | |
264 | 269 | | |
| |||
268 | 273 | | |
269 | 274 | | |
270 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
271 | 283 | | |
272 | 284 | | |
273 | 285 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
908 | | - | |
| 907 | + | |
| 908 | + | |
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| |||
943 | 943 | | |
944 | 944 | | |
945 | 945 | | |
946 | | - | |
| 946 | + | |
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
0 commit comments