Repository navigation
Bump Substrate to ddb46651: templates name no sandbox, durable suspend, an identity Substrate's authorization can grant - #108
Open
Tomer Glottmann (tomergee) wants to merge 3 commits into
Open
Tomer Glottmann (tomergee) wants to merge 3 commits into
Tomer Glottmann (tomergee) wants to merge 3 commits into
Conversation
…d, an identity Substrate's authorization can grant go.ate.dev/substrate 3a2ca623 -> ddb46651 (2026-10-18). - substrate#2780 removed ActorTemplate.sandbox_config and the SandboxConfig message; the WorkerPool's sandboxClasses alone chooses the sandbox, and ate-api-server rejects a template that still sends sandboxConfig. The generated template drops it. The WorkerPool already declares gvisor with the gvisor-default configRef. An older Substrate requires the field, thus this ate-env needs Substrate at or after 0443aec3. - substrate#2813 removed PauseActor; the fake control plane drops it. - substrate#2805 made SuspendActor asynchronous by default (the snapshot stays on the node and uploads in the background). ate-env-api asks for DURABILITY_MODE_SYNCHRONOUS, the behavior it always had, so a suspended environment survives the loss of its node. The fake records the mode and TestSuspend checks it. - Substrate enforces ateapi authorization by default (substrate#2591; also in the previous pin). ate-env-api ran as the namespace's default ServiceAccount, which no policy grants, so each control-plane call was denied on a stock install. `ate-env manifest` now creates an ate-env-api ServiceAccount (no Kubernetes API token mounted; ate-env-api never calls the API) and runs the Deployment as it, and `ate-env manifest access-policy` prints the policy that grants it editor on an atespace, for `kubectl ate create access-policy -a <atespace> -f -`.
… install step The README's compatibility note names ddb46651 and the 0443aec3 boundary (templates without sandboxConfig), says that ate-env-api suspends synchronously, and that Substrate enforces authorization. Step 1 now creates the atespace and the access policy before the manifest, with what to do when the atespace already has a policy. The upgrade notes cover the access policy (without it ate-env-api fails at startup), old base templates (Substrate drops their sandboxConfig when it stores them) and the earlier limits boundary. The rootfs-image docs no longer say that a template carries a sandbox class.
Since substrate#2780 the template names no sandbox class, and Substrate's release note flags that a template with no workerSelector whose actor has no snapshot can be placed on a pool of any class. ate-env templates had no selector. On a cluster with more than one pool (another team's, or an OpenShell microvm pool), a cold-booting environment could land on the wrong one. The WorkerPool now carries `ate-env/workerpool: <pool>`; Substrate copies a pool's labels to its workers. Each template selects that label, through a new --workerpool flag on `ate-env manifest template` that defaults to <template>-workerpool, as `ate-env manifest` does. Derived per-image templates inherit the selector from their base. Templates with the selector pass Substrate ddb46651's validation. The README explains the selection and when to register old bases again.
Tomer Glottmann (tomergee)
added a commit
to tomergee/env
that referenced
this pull request
Oct 19, 2026
…ndbox class Rebased onto the Substrate ddb46651 bump (agent-substrate#108). Since substrate#2780 the ActorTemplate has no sandboxConfig and the WorkerPool alone chooses the sandbox, thus `ate-env manifest template` lost --sandbox-class and --sandbox-config (`ate-env manifest` keeps them for the pool). Without a selector a cold-booting OpenShell actor could land on a gVisor pool, where OpenShell's sandbox does not qualify. - deploy/workerpool.yaml carries `ate-env/workerpool: <pool>`; install.sh rewrites it with the pool name and registers the template with --workerpool instead of the sandbox flags. - The README and docs/openshell.md name the 0443aec3 boundary, the label selection, and the access policy from ate-env's README step 1.
Collaborator
|
Two issues:
|
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.
Bumps
go.ate.dev/substratefrom 3a2ca623 (2026-10-16) to ddb46651 (2026-10-18). Against current Substrate main,maindoes not build, and a stock install refuses ate-env-api's control-plane calls.What breaks on
maintodaymainActorTemplate.sandbox_configandSandboxConfigremoved; the WorkerPool'ssandboxClassesalone picks the sandbox. ate-api-server rejects unknown fields.go buildfails.ate-env manifest templatewritessandboxConfig, which Substrate refuses withInvalidArgument.gvisorwith thegvisor-defaultconfigRef.SuspendEnvironmentsilently loses its durability guarantee: a node loss before the upload loses the environment.DURABILITY_MODE_SYNCHRONOUS, as Substrate's own callers that relied on the old default now do.workerSelectorwhose actor has no snapshot can be placed on a pool of any classate-env/workerpool: <pool>, which Substrate copies to its workers. Each template selects it through a new--workerpoolflag, default<template>-workerpoolas inate-env manifest. Derived templates inherit the selector.defaultServiceAccount, which no policy grants. Each control-plane call is denied, and ate-env-api fails at startup.ate-env manifestcreates anate-env-apiServiceAccount and runs the Deployment as it, with no Kubernetes API token mounted, because ate-env-api never calls the API.ate-env manifest access-policyprints the policy that grants iteditoron an atespace.Install, per the updated README step 1, as an owner of the atespace (the default
kubectl-ateidentity on a stock install):Compatibility. This ate-env needs Substrate at or after 0443aec3 (2026-10-17), because an older Substrate requires
sandboxConfig(+k8s:requiredat 3a2ca623). The README says so.Upgrading.
workerSelector. On a cluster with more than one pool, register them again after you apply the new manifest.Verification
go build,go vet,go test -race ./..., staticcheck,make verify-gofmt verify-boilerplateandgo mod tidy(a no-op) are clean against ddb46651.kubectl-ate'sactorTemplateFromManifestparses the default template, a template with custom limits (cpu 999.999, 64Gi), and a rootfs-image derived template.defaults.ApplyandValidateCreateActorTemplateRequestaccept all three.kubectl-ate'sloadAccessPolicyManifestandValidateCreateAtespaceAccessPolicyRequestaccept the access policy.--workerpoolnames another pool.manifest access-policynamesuser:system:serviceaccount:<namespace>:ate-env-apias editor.TestSuspendchecks the synchronous mode.