Skip to content

contract: publish atelet↔ateom under pkg/, neutralize names, drop runsc_path#336

Open
Davanum Srinivas (dims) wants to merge 3 commits into
agent-substrate:mainfrom
dims:pluggable/publish-ateom-contract
Open

contract: publish atelet↔ateom under pkg/, neutralize names, drop runsc_path#336
Davanum Srinivas (dims) wants to merge 3 commits into
agent-substrate:mainfrom
dims:pluggable/publish-ateom-contract

Conversation

@dims

Copy link
Copy Markdown
Collaborator

Path B — making a custom out-of-tree ateom-* backend a first-class citizen — the contract pieces, as one PR (three commits).

Companion to #332 (open the sandboxClass enum) and #333 (declarative WorkerPool pod shape). Those were the CRD/controller pluggability changes; this PR is the atelet↔ateom contract changes. They're in one PR because all three commits rewrite/regenerate the same ateom.proto (separate PRs would just rebase over each other) and they are one decision: whether to commit to this contract shape.

Commits

  1. proto,paths: publish the atelet<->ateom contract under pkg/git mv internal/proto/ateompb → pkg/proto/ateompb and internal/ateompath → pkg/ateompath so an out-of-tree backend can go get the gRPC contract + path conventions instead of vendoring internal/. Mechanical move + clean regen of ateom.pb.go; behavior-neutral.
  2. paths,resources: name the asset cache neutrally — now that pkg/ateompath is public API, RunSCBinaryPathCachedAssetPath and ValidateRunscHashValidateAssetHash (the cache holds any backend's content-addressed asset, not just gVisor's runsc). The on-disk runsc-<sha> filename is deliberately unchanged — existing snapshots embed that absolute path. No behavior change.
  3. proto: drop the gVisor-specific runsc_path — remove runsc_path (field 4, now reserved) from RunWorkload/Checkpoint/Restore; gVisor reads its binary from runtime_asset_paths["runsc"] like every other backend. The wire contract now has zero backend-specific fields.

Draft on purpose

Committing to the atelet↔ateom contract may be premature, so this is a Draft for visibility/review rather than merge — fine to hold behind #332/#333.

Verified locally: go build ./... and go test on the affected packages pass; ateom.pb.go regenerated with protoc v25.3.

@BenTheElder

Copy link
Copy Markdown
Collaborator

BTW I was chatting with Tim Hockin (@thockin) about this and one key suggestion was that we might wind up with atelet as the extension mechanism. Undecided I think ...

@dims Davanum Srinivas (dims) force-pushed the pluggable/publish-ateom-contract branch from 1913f48 to 2e59f04 Compare June 26, 2026 21:45
@dims

Copy link
Copy Markdown
Collaborator Author

BTW I was chatting with Tim Hockin (@thockin) about this and one key suggestion was that we might wind up with atelet as the extension mechanism. Undecided I think ...

ACK Benjamin Elder (@BenTheElder) some of what i am doing is still useful to get rid of gvisor-isms i think. I am ok with going to atelet and have that conversation and the shape of it. I want to make sure what we have now is pluggable as is as well. it won't stop us from switching over when we decide to.

@dims Davanum Srinivas (dims) changed the title [WIP] contract: publish atelet↔ateom under pkg/, neutralize names, drop runsc_path contract: publish atelet↔ateom under pkg/, neutralize names, drop runsc_path Jun 26, 2026
@dims Davanum Srinivas (dims) marked this pull request as ready for review June 26, 2026 21:58
… B1)

Move internal/proto/ateompb -> pkg/proto/ateompb (the ateom gRPC contract) and
internal/ateompath -> pkg/ateompath (the runtime path conventions: BasePath, the
ateom socket, OCI bundle, netns, and asset-cache layout). Both lived under
internal/, so an out-of-tree custom ateom-* backend could not import them -- it had
to vendor the .proto and hand-duplicate the path conventions (and risk drift).
Publishing them under pkg/ lets a backend `go get` the contract + conventions
directly. Update all in-tree importers; regenerate ateom.pb.go with the new
go_package (clean rawDesc, not a hand-edit). Mechanical relocation; no behavior
change.
B1 publishes pkg/ateompath, so RunSCBinaryPath becomes public API -- but it
returns the cache path for any content-addressed sandbox asset (a backend's
cloud-hypervisor/kernel/firecracker binary), not just gVisor's runsc. Rename:

  ateompath.RunSCBinaryPath   -> ateompath.CachedAssetPath
  resources.ValidateRunscHash -> resources.ValidateAssetHash

Pure rename + comment cleanup; no behavior change. The on-disk "runsc-<sha>"
filename is deliberately kept -- existing snapshots embed that absolute path, so
renaming it is a separate breaking migration.
…t_paths (Path B / B4)

Remove runsc_path (field 4, now reserved) from RunWorkload/Checkpoint/Restore
requests so the ateom contract has no backend-specific fields. gVisor now reads
its binary from runtime_asset_paths["runsc"] -- the same map every other backend
uses; atelet stops setting RunscPath and the runscPathFor helper is removed.
Regenerate ateom.pb.go. A custom ateom-* now sees a backend-neutral contract: it
declares whatever asset names it wants on its SandboxConfig and reads them from
runtime_asset_paths.
@dims Davanum Srinivas (dims) force-pushed the pluggable/publish-ateom-contract branch from 2e59f04 to 0df7eff Compare June 26, 2026 22:06
@BenTheElder

Copy link
Copy Markdown
Collaborator

Ack ... I'm not sure we should publish to pkg/, given the guidelines for that ...

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