Closed joellabes closed 2 years ago
@joellabes This is a sly one, and I believe it boils down to: The dbt-rpc server doesn't support --fail-fast
.
Within dbt Core, not counting the RPC server, the --fail-fast
, -x
flag/setting is indeed supported for dbt test
and dbt build
as well as dbt run
. Starting in v1, "fail fast" has even been upgraded to a "global config," meaning it can be set for all commands as:
dbt --fail-fast <subcommand>
DBT_FAIL_FAST=True|False
# profiles.yml
config:
fail_fast: true|false
But I'm realizing that --fail-fast
has never really been supported for dbt-rpc
. That means that it's not currently supported in the dbt Cloud IDE, which is at issue in the linked slack thread.
For the time being, I'm going to transfer this issue to the dbt-rpc
repo, mostly to document this as a known limitation. I think it's unlikely we invest the resources to fixing it there, however. The good news is, I believe the new dbt Server will be architected in a way that it will be able to support --fail-fast
for all tasks.
Thanks @jtcohen6! I'll open an equivalent docs issue to get that info onto build and test as well
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.
Is there an existing feature request for this?
Describe the Feature
--fail-fast
cancels adbt run
if any model has an issue. This flag should also be supported fordbt test
(I thought it already was, and told a community member to use this).It's as relevant for a failing test in a CI environment to cancel a run.
Describe alternatives you've considered
I don't think there is an alternative right now
Who will this benefit?
CI users who want a failing test to cancel the rest of the run
Are you interested in contributing this feature?
Yeah go on!
Anything else?
dbt build
- I'm guessing that right now,--fail-fast
would apply when the model was built, but not when the tests were run. If that's true, this change should also fail a test that happens in abuild
context.