Skip to content

fix: migrate custom config keys to config(meta={}) with legacy fallback - #30

Merged
Matts52 merged 1 commit into
mainfrom
dbt-cortex-agent-issue-29-fix
Sep 22, 2026
Merged

Matts52 merged 1 commit into
mainfrom
dbt-cortex-agent-issue-29-fix

Conversation

@Matts52

@Matts52 Matts52 commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fixes UnusedConfigKey (dbt1060) errors raised by dbt Core v2's strict schema validation, which rejects unrecognized top-level config() keys
  • All four affected macros (cortex_agent/create.sql, cortex_mcp_server/create.sql, cortex_skill/create.sql, cortex_agent.sql materialization) now read custom keys from config.meta first, then fall back to the legacy config.get() / config.require() so consuming projects on dbt-core 1.12 continue to work without changes
  • All 12 integration test models are migrated to config(meta={...}) syntax to exercise the new primary read path

Test plan

  • dbt parse in integration_tests/ completes with zero UnusedConfigKey errors
  • dbt compile output for agent_minimal, agent_versioned, atlassian_mcp_server, forecaster_skill matches expected DDL
  • Optionally run dbt parse --use-v2-parser to confirm v2 compatibility

Closes #29

🤖 Generated with Claude Code

)

All config.get()/config.require() calls for package-specific keys now
check config.meta first, falling back to the top-level config for
backward compatibility. Integration test models migrate to meta={...}
syntax to exercise the new primary read path under dbt v2's strict
schema validation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Matts52
Matts52 merged commit 3640726 into main Sep 22, 2026
1 check passed
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.

v2 parser: migrate custom config() keys to config(meta={...}) with legacy fallback

1 participant