Skip to content

runtime v2 flag for new captures and derivations#3219

Merged
williamhbaker merged 3 commits into
masterfrom
wb/runtime-v2-new-tasks
Jul 21, 2026
Merged

runtime v2 flag for new captures and derivations#3219
williamhbaker merged 3 commits into
masterfrom
wb/runtime-v2-new-tasks

Conversation

@williamhbaker

Copy link
Copy Markdown
Member

Description:

Rolls newly-created materializations and derivations onto runtime-v2, mirroring the existing captures flag (b98d27c). Adds RUNTIME_V2_NEW_MATERIALIZATIONS and RUNTIME_V2_NEW_DERIVATIONS agent flags, each an independent per-task-type toggle on RuntimeV2Rollout. New tasks get enable-runtime-v2 stamped at publish; existing tasks and explicit flags are untouched. Defaults off (deploy-inert); the last commit turns all three on for local stacks.

Tested: integration tests for both types + end-to-end on a local stack (new task gets the flag in model + built shard label and actually runs on the v2 sidecar).

Workflow steps:

(How does one use this feature, and how has it changed)

Documentation links affected:

(list any documentation links that you created, or existing ones that you've identified as needing updates, along with a brief description)

Notes for reviewers:

(anything that might help someone review this PR)

Adds a `--runtime-v2-new-materializations` flag (env
`RUNTIME_V2_NEW_MATERIALIZATIONS`) to the agent. When enabled, any
newly-created materialization that doesn't already set `enable-runtime-v2`
is published with that shard flag set to `true`, placing it on the V2
runtime. Existing materializations are never touched, and an explicit
per-task flag always takes precedence.

This extends the existing `RuntimeV2Rollout` initializer (previously
capture-only) with an independent per-task-type toggle, so materializations
can be rolled out separately from captures. Captures and materializations
share a single existence query, since catalog names are globally unique.

This can be deployed inert: the flag defaults to false, so it only begins
to take effect once the agent is configured to enable it.
Adds a `--runtime-v2-new-derivations` flag (env `RUNTIME_V2_NEW_DERIVATIONS`)
to the agent. When enabled, any newly-created derivation that doesn't already
set `enable-runtime-v2` is published with that shard flag set to `true`,
placing it on the V2 runtime. Existing derivations are never touched, and an
explicit per-task flag always takes precedence.

A derivation is a collection carrying a `derive` block, so unlike captures and
materializations its shards live at `derive.shards`, and plain collections are
never candidates. This extends the existing `RuntimeV2Rollout` initializer with
an independent per-task-type toggle, so derivations can be rolled out
separately from captures and materializations.

This can be deployed inert: the flag defaults to false, so it only begins to
take effect once the agent is configured to enable it.
Sets RUNTIME_V2_NEW_CAPTURES / _DERIVATIONS / _MATERIALIZATIONS in the local
control-plane agent env, so every local stack stamps `enable-runtime-v2` onto
newly-created tasks of all three types at publication time. Local development
and QA thus exercise the V2 runtime by default; existing tasks and explicit
per-task flags are unaffected.
@williamhbaker
williamhbaker requested a review from dgreer-dev July 21, 2026 21:07

@dgreer-dev dgreer-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@williamhbaker
williamhbaker merged commit f7cbb32 into master Jul 21, 2026
11 checks passed
@williamhbaker
williamhbaker deleted the wb/runtime-v2-new-tasks branch July 21, 2026 22:00
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