feat: add versioned publish / canary rollout for cortex_agent (closes #16) - #17
Merged
Conversation
…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>
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.
Summary
cortex_agentmaterialization (versioning=falseby default — zero breaking changes for existing models)versioning=true, issuesCREATE AGENT IF NOT EXISTS ... ADD VERSIONfor new agents andALTER AGENT ... ADD VERSIONfor existing ones;set_default=true(the default) promotes the version to live traffic by flippingDEFAULT VERSION_cortex_agent_exists,_cortex_agent_auto_version_name) live in a newmacros/relations/cortex_agent/helpers/folder with their ownschema.yml; three DDL builder macros are added tocreate.sqlwith!! SYNTAX NEEDS VERIFICATIONcomments pending confirmation against live Snowflake docsagent_versionedintegration test model and documentsversioning,version_name, andset_defaultconfigs in README andmacros/schema.ymlTest plan
dbt compile --select "agent_*" --target duckdbpasses (covered by CI)!! SYNTAX NEEDS VERIFICATIONcomments in the three DDL builders against live Snowflake Cortex Agent docs before mergingagent_versionedtwice and confirm second run adds a version row inSHOW VERSIONS IN AGENT; testset_default=falseleaves default unchanged; testset_default=truepromotes🤖 Generated with Claude Code