Fix: Add @requires.catalogs decorator to test command#12663
Open
rrittsteiger wants to merge 1 commit intodbt-labs:mainfrom
Open
Fix: Add @requires.catalogs decorator to test command#12663rrittsteiger wants to merge 1 commit intodbt-labs:mainfrom
rrittsteiger wants to merge 1 commit intodbt-labs:mainfrom
Conversation
The test command was missing the @requires.catalogs decorator, causing it to fail when models use custom catalog integrations defined in catalogs.yml. This adds the decorator to match other commands like run, build, parse, compile, seed, and snapshot. Fixes custom catalog integration support for dbt test command.
2 tasks
Contributor
|
@rrittsteiger Congrats on opening YOUR FIRST PR ! 🤩 Nice job figure out the root cause and determining a precision solution 🧠 Here's what I've done:
Here's what you should do next: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12663 +/- ##
==========================================
+ Coverage 91.35% 91.39% +0.04%
==========================================
Files 203 203
Lines 25683 25684 +1
==========================================
+ Hits 23462 23474 +12
+ Misses 2221 2210 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
The test command was missing the @requires.catalogs decorator, causing it to fail when models use custom catalog integrations defined in catalogs.yml. This adds the decorator to match other commands like run, build, parse, compile, seed, and snapshot.
Fixes custom catalog integration support for dbt test command.
Resolves #12662
Problem
At the moment 'dbt test' is not parsing catalogs.yml. This leads to the following error running it:
Solution
Added @requires.catalogs decorator to the test function in core/dbt/cli/main.py.
With this fix tests will run properly.
Checklist
Resolves #12662