Skip to content

Fix: Add @requires.catalogs decorator to test command#12663

Open
rrittsteiger wants to merge 1 commit intodbt-labs:mainfrom
rrittsteiger:fix/add-catalogs-decorator-to-test-command
Open

Fix: Add @requires.catalogs decorator to test command#12663
rrittsteiger wants to merge 1 commit intodbt-labs:mainfrom
rrittsteiger:fix/add-catalogs-decorator-to-test-command

Conversation

@rrittsteiger
Copy link

@rrittsteiger rrittsteiger commented Mar 17, 2026

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:

> dbt test
07:00:45  Running with dbt=1.11.7
07:00:46  Registered adapter: snowflake=1.11.3
07:00:46  Unable to do partial parsing because saved manifest not found. Starting full parse.
07:00:47  Encountered an error:
Runtime Error
  Catalog not found.Received: GLUE_CATALOG_INTEGRATIONExpected one of: INFO_SCHEMA, SNOWFLAKE?

Solution

Added @requires.catalogs decorator to the test function in core/dbt/cli/main.py.

With this fix tests will run properly.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

Resolves #12662

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.
@rrittsteiger rrittsteiger requested a review from a team as a code owner March 17, 2026 08:52
@cla-bot cla-bot bot added the cla:yes label Mar 17, 2026
@github-actions github-actions bot added the community This PR is from a community member label Mar 17, 2026
@rrittsteiger rrittsteiger changed the title Fix: Add @requires.catalogs decorator to test command Fix: Add @requires.catalogs decorator to test command - Closes #12662 Mar 18, 2026
@rrittsteiger rrittsteiger changed the title Fix: Add @requires.catalogs decorator to test command - Closes #12662 Fix: Add @requires.catalogs decorator to test command Mar 18, 2026
@dbeatty10
Copy link
Contributor

dbeatty10 commented Mar 18, 2026

@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:

  • Added Resolves https://github.com/dbt-labs/dbt-core/issues/12662 to the PR description (so that the bug report will auto-close upon merge) I see now that you already had Resolves https://github.com/dbt-labs/dbt-core/issues/12662 to the bottom (not a requirement, but we put this at the very top by convention)

Here's what you should do next:

  • Fill out the ### Problem and ### Solution sections in the PR description (you can use #11162, #12002, and #12388 as inspiration)

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.39%. Comparing base (befdd4e) to head (984a62c).
⚠️ Report is 1 commits behind head on main.

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     
Flag Coverage Δ
integration 88.23% <100.00%> (+0.10%) ⬆️
unit 65.37% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 65.37% <100.00%> (+<0.01%) ⬆️
Integration Tests 88.23% <100.00%> (+0.10%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] dbt test fails with AWS Glue Catalog Integration in Snowflake

2 participants