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

Dagster DBT w/ DBT >=1.9 Breaks With Unit Tests Due to Enabled Attribute #27077

Closed
cwe5590 opened this issue Jan 13, 2025 · 1 comment
Closed
Labels
type: bug Something isn't working

Comments

@cwe5590
Copy link

cwe5590 commented Jan 13, 2025

What's the issue?

In DBT 1.9 dagster-dbt seems to break if a project contains unit tests. This seems to happen because of the addition of enabled attribute to the unit test config: https://github.com/dbt-labs/dbt-core/pull/10831/files#diff-b4756f21e0fa65b77bb36828994d3a758360b5acd05bbb9526b5bfe399194617L176.

This unit_test.config looks like it needs to be of type <class 'dagster_dbt.utils.select_unique_ids_from_manifest.._DictShim'> instead of a dict to allow for dot access.

.venv/lib/python3.12/site-packages/dbt/graph/selector.py:178: in _is_graph_member
    return unit_test.config.enabled
E   AttributeError: 'dict' object has no attribute 'enabled'

DBT representation:

unit_test.business_intelligence.[OBFUSCTATED].test_is_[OBFUSCTATED]:UnitTestConfig(_extra={}, tags=[], meta={}, enabled=True)

Representation of unit test from a manifest loaded from file via dbt_assets:

unit_test.business_intelligence.[OBFUSCTATED].test_is_[OBFUSCTATED]:  {'tags': [], 'meta': {}, 'enabled': True}

What did you expect to happen?

No errors to occur

How to reproduce?

Add unit tests to a dbt project and load via manifest file using the dbt_assets decorator

Dagster version

1.9.8

Deployment type

None

Deployment details

No response

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@cwe5590 cwe5590 added the type: bug Something isn't working label Jan 13, 2025
@garethbrickman
Copy link
Contributor

Duplicates #27007

@garethbrickman garethbrickman closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants