Skip to content

feat: add versioned publish / canary rollout for cortex_agent (closes #16) - #17

Merged
Matts52 merged 1 commit into
mainfrom
github-issue-evaluation
Jul 30, 2026
Merged

feat: add versioned publish / canary rollout for cortex_agent (closes #16)#17
Matts52 merged 1 commit into
mainfrom
github-issue-evaluation

Conversation

@Matts52

@Matts52 Matts52 commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds opt-in named-version mode to the cortex_agent materialization (versioning=false by default — zero breaking changes for existing models)
  • When versioning=true, issues CREATE AGENT IF NOT EXISTS ... ADD VERSION for new agents and ALTER AGENT ... ADD VERSION for existing ones; set_default=true (the default) promotes the version to live traffic by flipping DEFAULT VERSION
  • Helper macros (_cortex_agent_exists, _cortex_agent_auto_version_name) live in a new macros/relations/cortex_agent/helpers/ folder with their own schema.yml; three DDL builder macros are added to create.sql with !! SYNTAX NEEDS VERIFICATION comments pending confirmation against live Snowflake docs
  • Adds agent_versioned integration test model and documents versioning, version_name, and set_default configs in README and macros/schema.yml

Test plan

  • dbt compile --select "agent_*" --target duckdb passes (covered by CI)
  • Resolve !! SYNTAX NEEDS VERIFICATION comments in the three DDL builders against live Snowflake Cortex Agent docs before merging
  • Live Snowflake: run agent_versioned twice and confirm second run adds a version row in SHOW VERSIONS IN AGENT; test set_default=false leaves default unchanged; test set_default=true promotes

🤖 Generated with Claude Code

…loses #16)

Adds opt-in named-version mode (versioning=false default, zero breaking changes).
When enabled, issues CREATE AGENT IF NOT EXISTS ... ADD VERSION for new agents
and ALTER AGENT ... ADD VERSION for existing ones, with optional SET DEFAULT_VERSION
to control live traffic promotion. Includes helper macros, integration test model,
README docs, and config reference table updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Matts52
Matts52 merged commit 59981de into main Jul 30, 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.

1 participant