dbt-labs / dbt-labs/docs.getdbt.com

[Core] Adapter support for query cancellation affects behavior of `--fail-fast`

Open
#5,411 0 comments 0 reactions 0 assignees View on GitHub
content dbt Core size: medium
Dominant language
JavaScript
Stars
215
Forks
1.2k
Avg merge
1d 15h
Merged PRs (30d)
130

Description

### Link to the page(s) on docs.getdbt.com requiring updates

https://docs.getdbt.com/reference/global-configs/failing-fast

### Tell us more about this update

The docs currently say:

> Supply the `-x` or `--fail-fast` flag to dbt run to make dbt exit immediately if a single resource fails to build. If other models are in-progress when the first model fails, then dbt will terminate the connections for these still-running models.

But this is only true if the adapter supports query cancellation.

So we should update our docs to soften the language and explain how it will behave differently depending on the capabilities of the dbt adapter that is being used.

### An example

For example, dbt-postgres behaves as currently described in the docs and cancels any queries that are running concurrently:

image

But dbt-duckdb allows any concurrently running query to finish (rather than cancelling them):

image

dbt-duckdb gives this specific warning when `--fail-fast` is specified and there is an exception:

```
The duckdb adapter does not support query cancellation. Some queries may still be running!
```

### Reviewers/Stakeholders/SMEs

.

### Related GitHub issues

https://github.com/dbt-labs/dbt-core/issues/10057

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.