Skip to content

Commit

Permalink
Ensure KeyboardInterrupts/SystemExits get handled in call_runner
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Nov 15, 2024
1 parent 69df6a2 commit 2c37abc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/dbt/task/runnable.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ def call_runner(self, runner: BaseRunner) -> RunResult:
)
try:
result = runner.run_with_hooks(self.manifest)
except (KeyboardInterrupt, SystemExit) as exe:
result = None
thread_exception: Union[KeyboardInterrupt, SystemExit, Exception] = exe
raise

Check warning on line 238 in core/dbt/task/runnable.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/task/runnable.py#L235-L238

Added lines #L235 - L238 were not covered by tests
except Exception as e:
result = None

Check warning on line 240 in core/dbt/task/runnable.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/task/runnable.py#L240

Added line #L240 was not covered by tests
thread_exception = e
Expand Down

0 comments on commit 2c37abc

Please sign in to comment.