Async operations¶
Work that outlives a request returns an operation reference, and the operation has its own event stream. One durable stream carries every long-running lifecycle in the control plane, with cursor and watch semantics, so a caller follows an operation instead of polling the resource it will eventually change.
The shape¶
flowchart TB
C["Caller"]
subgraph CP["CONTROL PLANE"]
direction TB
API["API server"]
DS[("Desired state")]
CTL["Controllers"]
OS[("Operation event stream<br/>one, for every family")]
API --> DS
DS --> CTL
CTL -->|"append"| OS
end
C -->|"1 request"| API
API -->|"2 operation reference"| C
C -->|"3 watch from cursor"| OS
The request touches only the API server and desired state, and returns once desired state is written. Everything after it happens between the controllers and the operation stream, and the caller follows it by reading the stream rather than the resource that will eventually change.
The request returns as soon as intent is recorded. Controllers converge toward it afterwards, appending events as they go. See The controller manager.
The operation families¶
Eight families use the stream, and the set is closed:
observability.payload_access package.publication
project.build_request model.build_request
project.deployment model.deployment
dataplane.enrollment dataplane.recovery
One stream for all of them is what keeps the surface small. A caller that knows how to follow a build follows an enrollment the same way, and a new family appears as a value rather than as a new set of lifecycle verbs.
Watching¶
The watch contract is control_plane.asyncops.watch.v1. A watcher supplies the
cursor it holds and waits for events past it:
| Parameter | Default | Meaning |
|---|---|---|
| Limit | 50 | How many events one return may carry |
| Wait timeout | 20 seconds | How long a watch waits before returning empty |
| Wake slice | 2 seconds | How often a waiting watcher re-checks |
A watch that returns empty is the normal quiet case, and the caller resumes from the cursor it already holds. Two scopes are watchable: one operation's events, and every operation in a workspace.
The five operations on the stream are appending an event, reading an operation's detail, listing its events, watching its events, and watching a workspace.
Waiting without polling the store¶
A wake signal notifies waiting watchers that an event has landed, so a watcher sleeps until there is something to read rather than querying on a timer. The signal is an optimisation over the durable stream rather than a second source of truth: the events themselves are the record, and a watcher that missed a signal still finds the events by cursor.
Reading this through the CLI¶
Operations surface through the established grammar rather than per-domain
lifecycle verbs. You get and describe an operation and read its events,
whichever family it belongs to. Payload transfer stays separate from the
lifecycle: the stream carries what happened, and a body that the operation
produced is fetched by its own path. See
The tenant byte rule.