Skip to content

Commit 7a52449

Browse files
cancel job on timeout (#1355)
1 parent 17c9488 commit 7a52449

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Update bigquery job handling to invoke job.cancel on timeout
3+
time: 2025-10-20T16:51:54.73086-07:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "1355"

dbt-bigquery/src/dbt/adapters/bigquery/connections.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,10 @@ def _query_and_results(
613613
iterator = query_job.result(max_results=limit)
614614
except TimeoutError:
615615
exc = f"Operation did not complete within the designated timeout of {timeout} seconds."
616+
try:
617+
query_job.cancel()
618+
except Exception as e:
619+
logger.debug(f"Error cancelling query job: {e}")
616620
raise TimeoutError(exc)
617621

618622
fire_event(
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Update bigquery job handling to invoke job.cancel on timeout
3+
time: 2025-10-20T16:51:54.73086-07:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "1355"

0 commit comments

Comments
 (0)