-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] raise execution errors for runnable tasks #8237
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Fixes | ||
body: Ensure runtime errors are raised for graph runnable tasks (compile, show, run, | ||
etc) | ||
time: 2023-07-28T11:56:20.863718-04:00 | ||
custom: | ||
Author: michelleark | ||
Issue: "8166" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
import dbt.semver | ||
import dbt.config | ||
import dbt.exceptions | ||
from dbt.contracts.results import RunStatus | ||
|
||
from dbt.tests.util import check_relations_equal, run_dbt, run_dbt_and_capture | ||
|
||
|
@@ -208,9 +207,8 @@ def models(self): | |
|
||
def test_missing_dependency(self, project): | ||
# dbt should raise a runtime exception | ||
res = run_dbt(["compile"], expect_pass=False) | ||
assert len(res) == 1 | ||
assert res[0].status == RunStatus.Error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reverts the changes made here: https://github.com/dbt-labs/dbt-core/pull/8066/files#diff-4f5f78d9b3b6f6eda81916de152b5c17b9d1ef14e40b7a2031c4d10f601d6474L210-L211 On closer inspection, I'm not sure why this test was modified, it is a change in behaviour for non fail-fast functionality. |
||
with pytest.raises(dbt.exceptions.DbtRuntimeError): | ||
run_dbt(["compile"]) | ||
|
||
|
||
class TestSimpleDependencyWithSchema(BaseDependencyTest): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question, do we want to always do
pool.close() , pool.join()
before join? If yes, based on the document that finally will be executed beforebreak, return, continue
, should we consider just write it asThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That may be a very sound thing to do, but I think the safest path forward to ensure the regression (and any others that may be lingering) are fixed is to go back to the state before this change: https://github.com/dbt-labs/dbt-core/pull/8066/files#diff-f01af78b7eaa1bacc301afa75eea4c7cdbe03064b3913bc2ce3f6bf01d0bc125R383-R386, where there was no
finally