fix(dbt): correctly treat dbt-fusion test status pass as successful in asset checks (#33512)#33518
Open
vidiyala99 wants to merge 3 commits into
Open
fix(dbt): correctly treat dbt-fusion test status pass as successful in asset checks (#33512)#33518vidiyala99 wants to merge 3 commits into
vidiyala99 wants to merge 3 commits into
Conversation
Contributor
Greptile SummaryFixed a bug where dbt-fusion tests were incorrectly marked as failed in asset checks. The Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| python_modules/libraries/dagster-dbt/dagster_dbt/core/dbt_cli_event.py | Updated _get_check_passed() to accept both "success" and "pass" statuses, fixing incorrect failure reporting for dbt-fusion tests |
Last reviewed commit: 7e69fad
86a9dfa to
3a8fc97
Compare
3a8fc97 to
63fb7f2
Compare
63fb7f2 to
25ea440
Compare
Contributor
Author
|
@OwenKephart mind taking a look when you have a chance? This is a small dagster-dbt / dbt-fusion fix with regression tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
Fixes #33512
When using
dbt-fusion(dbt CLI v2.x) withdagster-dbt, dbt tests that successfully complete are incorrectly reported as failed asset checks (passed=False) in the Dagster UI.This happens because
DbtFusionCliEventMessage._get_check_passed()currently determines success using a strict comparison againstNodeStatus.Success("success"). While model executions emit"success", dbt tests indbt-fusionemit a"pass"status.Since
"pass" != "success", all successful test nodes are incorrectly marked as failed.This PR updates
_get_check_passed()to treat both:NodeStatus.Success("success") andTestStatus.Pass("pass")as successful outcomes when evaluating asset checks.
Impact
DbtCoreCliEventMessage, which already handlesTestStatus.PasscorrectlyHow I Tested These Changes
DbtCoreCliEventMessagepipeline to confirm thatTestStatus.Passis treated as a success case.dbt-fusionNodeFinishedJSON payloads for:"pass"(test success)"fail"(test failure)"success"(model execution)msg._get_check_passed()now evaluates to:Truefor"pass"Falsefor"fail"Truefor"success"