Skip to content
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

dbt build: Correct non-fast-failing behavior to match other tasks such as run #3598

Closed
Tracked by #3452
iknox-fa opened this issue Jul 20, 2021 · 1 comment · Fixed by #3608
Closed
Tracked by #3452

dbt build: Correct non-fast-failing behavior to match other tasks such as run #3598

iknox-fa opened this issue Jul 20, 2021 · 1 comment · Fixed by #3608
Milestone

Comments

@iknox-fa
Copy link
Contributor

iknox-fa commented Jul 20, 2021

dbt build is exiting earlier than it should when faced with a broken project. This leads to an inconsistent user experience, and an incomplete process artifacts (run_results.json). Work done to correct this seemed to lead into larger discussions about the expected behavior of the fail-fast flag.

References:

@jtcohen6
Copy link
Contributor

dbt build is exiting earlier than it should when faced with a broken project

It seems to exit as soon as it encounters any runtime error, including SQL errors when running models—so not a broken project per se. That means its logging output looks different from all other tasks, and it never writes run_results.json. Not good!

Sometimes that "instant exit on error" is a feature, not a bug—it should only be when the -x, --fail-fast flag is passed. Incidentally, dbt build --fail-fast seems to work just fine (and differently!) when it encounters an error. (Today, --fail-fast errors for all commands prevent writing the result artifact. Is that good as a general rule? Fair question: #3600.)

What's surprising to me is how/why dbt build has different behavior from standard-issue tasks like dbt run and dbt snapshot, when I figure it inherits so much of its behavior from the base tasks.

@jtcohen6 jtcohen6 added this to the 0.20.1 milestone Jul 21, 2021
@jtcohen6 jtcohen6 changed the title Correct non-fast-failing behavior to match other tasks such as run dbt build: Correct non-fast-failing behavior to match other tasks such as run Jul 21, 2021
@jtcohen6 jtcohen6 modified the milestones: 0.20.1, Oh-Twenty-One Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants