Skip to content

fix: config.meta is not a dict attribute, use config.get('meta', {}) - #31

Merged
Matts52 merged 1 commit into
Matts52:mainfrom
tejas-sigma:fix/config-meta-attribute-access
Sep 22, 2026
Merged

Matts52 merged 1 commit into
Matts52:mainfrom
tejas-sigma:fix/config-meta-attribute-access

Conversation

@tejas-sigma

Copy link
Copy Markdown
Contributor

Bug

Every config.meta.get(x) call in v1.0.6 crashes at runtime:

'dbt.context.providers.RuntimeConfigObject object' has no attribute 'meta'

The live config context object inside a materialization/relation macro doesn't expose .meta as a plain attribute — only .get('key', default) works. node.config (a rendered dict from the manifest, used correctly in cortex_skill/create.sql:136) is a different object, which is presumably why that one line wasn't affected and this shipped without being caught locally.

Confirmed against dbt-sos's Slim CI: every model using the cortex_agent, cortex_skill, or cortex_mcp_server materializations fails to compile — 13/17 cortex_agent/cortex_skill models errored in a real build, 100% reproducible, same stack trace every time.

Fix

All 24 call sites across cortex_agent.sql, cortex_agent/create.sql, cortex_skill/create.sql, and cortex_mcp_server/create.sql changed from config.meta.get(x) to config.get('meta', {}).get(x) — the same pattern dbt-cortex-search-service already uses correctly (config.get('meta', default={})).

No behavior change beyond the fix itself — same fallback-to-legacy-top-level-key logic on every call site, just using a config accessor that actually exists.

config.meta.get(x) crashes at runtime with:
  'dbt.context.providers.RuntimeConfigObject object' has no attribute 'meta'

The live config context object exposed inside a materialization/relation
macro doesn't support .meta as a plain attribute -- only .get('key',
default) works. node.config (a rendered dict from the manifest, used
in cortex_skill/create.sql:136) is a different object and .meta access
there isn't affected, which is presumably why this shipped without being
caught locally.

Every model using the cortex_agent/cortex_skill/cortex_mcp_server
materializations fails to compile with this version. Confirmed against
dbt-sos's Slim CI: 13/17 cortex_agent + cortex_skill models errored,
100% reproducible, same stack trace in every case.

Fixes all 24 call sites across cortex_agent.sql, cortex_agent/create.sql,
cortex_skill/create.sql, and cortex_mcp_server/create.sql to use
config.get('meta', {}).get(x) instead -- the same pattern
dbt-cortex-search-service already uses correctly.
@Matts52
Matts52 merged commit 5f1a947 into Matts52:main Sep 22, 2026
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