Skip to content

Make sandbox_class in workers immutable - #1257

Merged
Julian Gutierrez Oschmann (juli4n) merged 1 commit into
agent-substrate:mainfrom
sfunkenhauser:sandbox_class_mutable
Sep 14, 2026
Merged

Julian Gutierrez Oschmann (juli4n) merged 1 commit into
agent-substrate:mainfrom
sfunkenhauser:sandbox_class_mutable

Conversation

@sfunkenhauser

Copy link
Copy Markdown
Collaborator

Changing the sandbox_class requires creating a new worker, you can't change the sandbox_class of a running worker.

  • [ x ] Tests pass
  • [ x ] Appropriate changes to documentation are included in the PR

@BenTheElder

Copy link
Copy Markdown
Collaborator

Changing the sandbox_class requires creating a new worker, you can't change the sandbox_class of a running worker.

What does this buy us?

I ask because I'm looking at having workers self register which classes they can handle, which may vary (thinking forward a bit, but imagine if gvisor + uVM were one binary)

@sfunkenhauser

Copy link
Copy Markdown
Collaborator Author

Changing the sandbox_class requires creating a new worker, you can't change the sandbox_class of a running worker.

What does this buy us?

I ask because I'm looking at having workers self register which classes they can handle, which may vary (thinking forward a bit, but imagine if gvisor + uVM were one binary)

This prevents unsupported modifications to the worker resource, preventing accidental updates that could break the system.

If we want to allow workers to self register their sandbox class, I would think we would expand the WorkerService to handle sandbox class as well as capacity. This does not require the sandbox class in the UpdateWorker API to be mutable.

Changing the sandbox_class requires creating a new worker, you
can't change the sandbox_class of a running worker.
changed = true
}
if w.GetSandboxClass() != string(pool.Spec.SandboxClass) {
// Expected mid-rollout: sandboxClass drives the worker pod's shape, so

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if the WorkerPool controller should add the sandbox class to the Pod as an annotation (in buildDeploymentApplyConfig). That way, the Pod is self-descriptive and this whole race condition goes away.

Not part of this PR for sure.

@juli4n
Julian Gutierrez Oschmann (juli4n) merged commit 44f4000 into agent-substrate:main Sep 14, 2026
9 checks 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.

3 participants