Skip to content

fix: [AI-7435] accept dbt 2.0 reused run status in run_results v6 parser#106

Open
Sourabhchrs93 wants to merge 1 commit into
mainfrom
fix/ai-7435-run-results-reused-status
Open

fix: [AI-7435] accept dbt 2.0 reused run status in run_results v6 parser#106
Sourabhchrs93 wants to merge 1 commit into
mainfrom
fix/ai-7435-run-results-reused-status

Conversation

@Sourabhchrs93

@Sourabhchrs93 Sourabhchrs93 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes AI-7435. dbt 2.0 emits status="reused" for unchanged models. The run_results v6 Status enum only knew success/error/skipped/partial_success, so Result validation raised ValidationError and the ingestion worker silently dropped the entire run_results.json — run status/timing never persisted, while the UI still showed a clean successful sync.

Confirmed against the currently-released 0.2.3: parsing a result with status="reused" raises ValidationError (3 errors for Result). DocuSign hit this on every run while on dbt 2.0.

Changes

  • Add reused to run_results_v6.Status; make it a str, Enum.
  • Add Status._missing_ so future unknown dbt statuses surface as real members instead of failing validation (forward-compatibility).
  • Reorder Result.status union to Union[Status1, Status2, Status] so the now-permissive run Status is tried last, keeping test/freshness statuses (pass/fail/warn/runtime error) resolving via the strict Status1/Status2 enums.
  • Regression tests: reused, known statuses, unknown-future status, test/freshness statuses, and full-file parse_run_results.
  • Version bump 0.3.1 → 0.3.2 (0.3.1 already released without this fix).

Testing

tests/test_vendor/test_run_results_v6.py .....  5 passed

Follow-up (not in this PR)

  • Release/publish altimate-datapilot-cli 0.3.2.
  • altimate-backend: poetry update altimate-datapilot-cli to move the lock 0.3.1 → 0.3.2 (pin ^0.3.1 already admits it), then deploy.
  • Backfill DocuSign invocations dropped while on 0.2.x.

🤖 Generated with Claude Code

…arser

dbt 2.0 emits `status="reused"` for unchanged models. The `run_results` v6
`Status` enum only knew `success`/`error`/`skipped`/`partial_success`, so
`Result` validation raised `ValidationError` and the ingestion worker silently
dropped the entire `run_results.json` — run status/timing never persisted while
the UI still showed a clean successful sync.

- Add `reused` to `Status` and make it a `str, Enum`.
- Add `Status._missing_` so future unknown dbt statuses surface as real members
  instead of failing validation (forward-compatibility).
- Reorder `Result.status` union to `Union[Status1, Status2, Status]` so the now
  permissive run `Status` is tried last, keeping test/freshness statuses
  (`pass`/`fail`/`warn`/`runtime error`) resolving via the strict enums.
- Add regression tests covering `reused`, known statuses, unknown-future status,
  test/freshness statuses, and full-file `parse_run_results`.
- Bump version to `0.3.2` (`0.3.1` already released without this fix).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread setup.py
setup(
name="altimate-datapilot-cli",
version="0.3.1",
version="0.3.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Version bump is incomplete — docs/conf.py and .bumpversion.cfg still report 0.3.1.

.bumpversion.cfg coordinates the version across three files (setup.py, docs/conf.py, src/datapilot/__init__.py). This PR updated setup.py and __init__.py to 0.3.2 but left docs/conf.py at version = release = "0.3.1" and .bumpversion.cfg at current_version = 0.3.1.

Consequences:

  • Sphinx docs will publish showing 0.3.1 while the package ships 0.3.2.
  • The next bumpversion run will fail: its search = version="{current_version}" pattern (0.3.1) no longer matches setup.py (now 0.3.2), raising VersionNotFoundError.

Use bumpversion patch (which updates all three files plus current_version and commits/tags), or bump all three files together so the version stays coordinated.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
setup.py 16 Version bumped to 0.3.2 in setup.py and __init__.py only; docs/conf.py and .bumpversion.cfg still report 0.3.1, breaking the coordinated bumpversion release workflow.
Files Reviewed (4 files)
  • setup.py - 1 issue (incomplete version bump)
  • src/datapilot/__init__.py - no issues
  • src/vendor/dbt_artifacts_parser/parsers/run_results/run_results_v6.py - no issues
  • tests/test_vendor/test_run_results_v6.py - no issues

The core fix is correct and well-covered: adding reused to Status and the _missing_ forward-compatibility hook, plus reordering Result.status to Union[Status1, Status2, Status], properly resolves the dbt 2.0 status="reused" ValidationError that was silently dropping run_results.json. All five regression tests pass and downstream .value access is preserved for known, unknown, and test/freshness statuses.

Fix these issues in Kilo Cloud


Reviewed by glm-5.2 · Input: 48.9K · Output: 18.8K · Cached: 479.6K

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

Successfully merging this pull request may close these issues.

1 participant