Skip to content

chore(track): include the installed dbt version in the command event - #1552

Merged
gcko merged 1 commit into
mainfrom
feature/drc-4578-track-dbt-version
Sep 16, 2026
Merged

gcko merged 1 commit into
mainfrom
feature/drc-4578-track-dbt-version

Conversation

@wcchang1115

@wcchang1115 wcchang1115 commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?

chore

What this PR does / why we need it:

Recce OSS does not start when dbt v2 is the only dbt in the environment. dbt v2 ships the warehouse drivers inside a Rust binary and drops the Python modules that the dbt adapter imports.

We cannot tell how common this is. A run that fails on the missing dbt modules looks the same as a run on a machine with no dbt installed at all.

This PR adds one property, dbt_version, to the command event that Recce already sends. It adds no new event, and the existing anonymous_tracking opt-out still gates it.

Which issue(s) this PR fixes:

Special notes for your reviewer:

The property sits in the finally block of TrackCommand.invoke, so it also arrives when the command fails. That failing run is the case this is for.

Checked against a real dbt v2 environment: the property reports 2.0.2 when the command fails on the missing dbt 1.x import.

Does this PR introduce a user-facing change?:

NONE

Recce OSS fails to start when dbt v2 is the only dbt in the
environment, because dbt v2 drops the Python modules the dbt adapter
imports. In the event data that failure looks the same as a machine
with no dbt installed, so we cannot count the users it affects.

The command event now carries the installed dbt version. The value
comes from package metadata, not from an import, so it still arrives
when the dbt import is what failed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
@wcchang1115 wcchang1115 self-assigned this Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
recce/track.py 88.00% <100.00%> (+0.82%) ⬆️
tests/test_track.py 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wcchang1115
wcchang1115 marked this pull request as ready for review September 16, 2026 02:53
@wcchang1115
wcchang1115 requested a review from gcko September 16, 2026 02:53

@gcko gcko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gcko
gcko merged commit f735b33 into main Sep 16, 2026
24 checks passed
@gcko
gcko deleted the feature/drc-4578-track-dbt-version branch September 16, 2026 02:55
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.

2 participants