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

The dbt-py exit code is 0 even when dbt errors #36

Closed
Bilbottom opened this issue Oct 11, 2024 · 0 comments
Closed

The dbt-py exit code is 0 even when dbt errors #36

Bilbottom opened this issue Oct 11, 2024 · 0 comments

Comments

@Bilbottom
Copy link
Owner

Note

This bug was identified by @alexmaras in #34.

Summary (bug)

The dbt-py command returns an exit code of 0 even if dbt hits some errors.

Minimal example

Change the content of tests/integration/jaffle-shop/models/example.sql to:

-- depends_on: {{ ref("missing-model") }}

...and then run the compile command to see an exit code of 2 for dbt but an exit code of 0 for dbt-py:

dbt compile --project-dir tests/integration/jaffle-shop --profiles-dir tests/integration/jaffle-shop
DBT_PY_PACKAGE_ROOT="tests.integration.jaffle-shop.dbt_py_test" DBT_PY_PACKAGE_NAME="custom_py" dbt-py compile --project-dir tests/integration/jaffle-shop --profiles-dir tests/integration/jaffle-shop

image

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

No branches or pull requests

1 participant