From fd66a6aae4a68964e2110dcd18d0a04693d92e7c Mon Sep 17 00:00:00 2001 From: "Shanmugapriya.C" Date: Wed, 10 Jun 2026 19:15:08 +0530 Subject: [PATCH 1/2] Fixed job status for CANCELED --- dbt/adapters/dremio/api/cursor.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dbt/adapters/dremio/api/cursor.py b/dbt/adapters/dremio/api/cursor.py index 99946aef..e7524fda 100644 --- a/dbt/adapters/dremio/api/cursor.py +++ b/dbt/adapters/dremio/api/cursor.py @@ -115,7 +115,7 @@ def _initialize(self): def _populate_rowcount(self): if self.closed: raise Exception("CursorClosed") - # keep checking job status until status is one of COMPLETE, CANCELLED or FAILED + # keep checking job status until status is one of COMPLETED, CANCELED or FAILED # map job results to AdapterResponse job_id = self._job_id @@ -132,7 +132,14 @@ def _populate_rowcount(self): error_message = job_status_response["errorMessage"] raise Exception(f"ERROR: {error_message}") - if job_status_state == "CANCELLED": + if job_status_state in ("CANCELED", "CANCELLED"): + cancellation_reason = job_status_response.get( + "cancellationReason" + ) + if cancellation_reason: + raise Exception( + f"Job was cancelled: {cancellation_reason}" + ) raise Exception("Job was cancelled") if job_status_state == "COMPLETED": From 400f1fece5085b43b1d4e33c6949a102e7bdbf74 Mon Sep 17 00:00:00 2001 From: "Shanmugapriya.C" Date: Wed, 10 Jun 2026 19:15:09 +0530 Subject: [PATCH 2/2] Fix infinite hang on cancelled Dremio jobs by handling the CANCELED job state (single L) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef72d365..e7403ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed CI MinIO client installation by following download redirects. - Suppressed Dremio Cloud folder-creation errors when a folder already exists. - Avoided creating existing folders during schema setup. +- Fix infinite hang on cancelled Dremio jobs by handling the CANCELED job state (single L) # dbt-dremio v1.10.0