Skip to content

agent: flag to create new captures as runtime-v2#3107

Open
williamhbaker wants to merge 1 commit into
masterfrom
wb/runtime-v2-ratchet
Open

agent: flag to create new captures as runtime-v2#3107
williamhbaker wants to merge 1 commit into
masterfrom
wb/runtime-v2-ratchet

Conversation

@williamhbaker

Copy link
Copy Markdown
Member

Description:

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

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.

Manually tested on a local stack: Many scenarios with the RUNTIME_V2_NEW_CAPTURES agent config on and off, with new & existing captures being published / re-published. Also, sanity checking of derivation and materialization publishing (unchanged).

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:

I ended up far from where I started. I was initially considering a mechanism in the runtime itself to decide to run a task on the V1 or V2 runtime, or some kind of computed shard label value. Both of these were complex and insufficient for various reasons: In the runtime, we don't have the creation time of the task readily available, computing the shard label value in all the places we'd need to was not trivial, and I don't think either way would readily extend to derivations since they need to make a decision at build time anyway about which image to run.

While these challenges are not intractable, I think this final "just add the spec flag to the spec" mechanism is the most obviously correct and least intrusive approach, and makes it very easy to tell which tasks are running V2.

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

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.

@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, functionally. No comment on when to deploy

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