8000 Automation Condition ignores assets if only tests are added in dbt · Issue #29708 · dagster-io/dagster · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Automation Condition ignores assets if only tests are added in dbt #29708

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

Closed
addynaik opened this issue May 1, 2025 · 0 comments · Fixed by #29753
Closed

Automation Condition ignores assets if only tests are added in dbt #29708

addynaik opened this issue May 1, 20 8000 25 · 0 comments · Fixed by #29753
Labels
type: bug Something isn't working

Comments

@addynaik
Copy link
addynaik commented May 1, 2025

What's the issue?

We have a translator that injects automation condition to all assets in dbt. the translator looks like this -

class CustomDbtTranslator(DagsterDbtTranslator):
    def get_automation_condition(self, dbt_resource_props):
        return AutomationCondition.eager()

Our code base has a few models in dbt but the models file has no data_tests for any column. There is a separate test in the test folder lets call it - assert_identifier_type_valid. when we use the translator with dagster_dbt_translator it only shows assert_identifier_type_valid in the automation condition target.

If I delete the test, all the assets are shows in automation target. Also - if i add atleast one model definition with one data_test for any one column. that also seems to fix this problem

What did you expect to happen?

All the assets in dbt AND the test should be included in the target. typically it shows something like * and code_location:"project".

How to reproduce?

  • create a custom translator with eager automation condition
  • add a few dbt assets
  • add dbt_assets to dagster using the custom translator
  • add one test in tests folder

Dagster version

dagster, version 1.10.12

Deployment type

Other Docker-based deployment

Deployment details

AWS ECS - but the issue is reproducable in local dev

Additional information

No response

Message from the maintainers

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

@addynaik addynaik added the type: bug Something isn't working label May 1, 2025
OwenKephart added a commit that referenced this issue May 5, 2025
…e asset check exists in a code location (#29753)

## Summary & Motivation

Fixes: #29708

Previously, the logic for this UI would the following in cases where
there were multiple assets defined and a single check:

![Screenshot 2025-05-02 at
8.14.41 AM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/cTPQ7oSxo9qxXgkzpnaK/ccf1e344-d0e3-4df1-a934-8f5af43059da.png)

The previous logic first checked if there was exactly one asset defined,
and if that was not the case (and exactly one check was defined), then
it would render in the "single check" style. This means that if there
were multiple assets and one check, we'd get the "single check" case,
which is not what we want.

## How I Tested These Changes

## Changelog

[ui] Fixed an issue which could cause the "Target" field of
AutomationConditionSensorDefinitions to render incorrectly when exactly
one asset check was defined in a code location.
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
1 participant
0