Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Once a version is tagged, changes to the proto must be additive. Add new fields,

A new tag is cut whenever the proto changes. Both the agent and the server pin a tag in their `go.mod`.

v0.2.0 adds the `isolation` field on `EnrollRequest` and `HeartbeatRequest`, the `runtime` field on `StartRunner` and the `runtimes` list on `BackendCapability`, so the server can schedule pool runners on hosts that offer gVisor or VM isolation.

## License

Apache-2.0, see `LICENSE`.
6 changes: 4 additions & 2 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
version: v2
plugins:
- remote: buf.build/protocolbuffers/go
# Pinned so the committed code matches what CI generates. The unpinned
# connect plugin now emits connectrpc.com/connect/v2 and go.mod stays on v1.
- remote: buf.build/protocolbuffers/go:v1.36.12
out: gen
opt: paths=source_relative
- remote: buf.build/connectrpc/go
- remote: buf.build/connectrpc/go:v1.19.1
out: gen
opt: paths=source_relative
67 changes: 55 additions & 12 deletions gen/agent/v1/agent.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions proto/agent/v1/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ message BackendCapability {
string backend = 1;
// Version string reported by the backend CLI.
string version = 2;
// Docker runtimes registered on the host, for example "runc", "runsc".
repeated string runtimes = 3;
}

message EnrollRequest {
Expand All @@ -54,6 +56,9 @@ message EnrollRequest {
repeated BackendCapability available_backends = 6;
// Maximum number of runners this host can run at the same time.
int32 max_runners = 7;
// Isolation the host offers for runners: "container", "sandboxed_container"
// (Docker with the gVisor runsc runtime) or "vm".
string isolation = 8;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Represent all supported isolation modes

When a host provides multiple backends—for example Docker alongside Tart or Firecracker, which the repeated available_backends field permits—this scalar can advertise only one of container, sandboxed_container, or vm. The scheduler will consequently treat that host as ineligible for jobs requiring any unreported mode even though the corresponding backend is available. Represent isolation as a repeated capability or associate it with each BackendCapability, and mirror that representation in heartbeats.

Useful? React with 👍 / 👎.

}

message EnrollResponse {
Expand Down Expand Up @@ -110,6 +115,9 @@ message HeartbeatRequest {
// Every runner the agent currently tracks.
repeated RunnerStatus runners = 2;
int32 max_runners = 3;
// Isolation is repeated here so a host that gains gVisor is picked up after
// an agent restart. Same values as EnrollRequest.isolation.
string isolation = 4;
}

message HeartbeatResponse {}
Expand Down Expand Up @@ -149,6 +157,9 @@ message StartRunner {
string platform = 5;
// Encoded just in time runner config from GitHub.
string jit_config = 6;
// Container runtime the server wants, for example "runsc". Empty means the
// backend default.
string runtime = 7;
}

message CleanupRunner {
Expand Down
Loading