Get desktop application:
View/edit binary Protocol Buffers messages
/ This API describes how schedulers communicate with Worker nodes. / / When a worker node comes online it must be pre-configured with the / endpoint of the scheduler it will register with. Once the worker / connects to the scheduler it must send a `ConnectWorkerRequest` / command to the scheduler. The scheduler will then use this information / to determine which jobs the worker can process.
/ Registers this worker and informs the scheduler what properties / this worker supports. The response must be listened on the client / side for updates from the server. This is performed as a single / bi-directional call to ensure that the worker is always talking to the / same scheduler instance even if there's a load balancer in front. / The first message on the UpdateForScheduler stream will be a / ConnectWorkerRequest which will notify the scheduler of the available / properties and the first response will be a ConnectionResult to tell / the worker what worker ID to place in action results.
/ Communication from the worker to the scheduler.
/ The initial request sent to the scheduler informing it of the / supported properties of this worker.
/ Message used to let the scheduler know that it is still alive as / well as check to see if the scheduler is still alive. The scheduler / may close the connection if the worker has not sent any messages / after some amount of time (configured in the scheduler's / configuration).
/ Informs the scheduler that the service is going offline and / should stop issuing any new actions on this worker. / / The worker may stay connected even after sending this command / and may even send an `ExecuteResult` after sending this command. / It is up to the scheduler implementation to decide how to handle / this case. / / Any job that was running on this instance likely needs to be / executed again, but up to the scheduler on how or when to handle / this case.
/ Informs the scheduler about the result of an execution request.
/ Notify that the execution has completed, but result is uploading.
/ The worker took the action.
/ The worker will not run the action.
/ Communication from the scheduler to the worker.
/ This will be sent only as the first item in the stream after the node / has connected.
/ Message used to let the worker know that it is still alive as well / as check to see if the worker is still alive. The worker / may close the connection if the scheduler has not sent any messages / after some amount of time (configured in the scheduler's / configuration).
/ Informs the worker about some work it should begin performing the / requested action.
/ Informs the worker that it has been disconnected from the pool. / The worker may discard any outstanding work that is being executed.
/ Instructs the worker to kill a specific running operation.
/ Resource usage observed by the worker while running one action.
Used in: ,
/ Peak resident memory observed for the action process tree.
/ Whether this value came from worker-side sampling.
/ The operation ID that was sampled.
/ The worker ID that observed the resource usage.
/ Total CPU time consumed by the action process tree, in milliseconds. / User and system time combined, summed across every process in the / action's process group.
/ Wall time from spawn to exit, in milliseconds; cores used is / cpu_time_ms / wall_time_ms.
/ Peak bytes under the action's work directory, in KiB. Not yet / measured; zero.
/ How the action ended.
/ True when a worker-side limit, not the kernel or a timeout, ended / the action.
/ What the action was admitted with, from its platform properties.
/ Represents the initial request sent to the scheduler informing the / scheduler about this worker's capabilities and metadata.
Used in:
/ The list of properties this worker can support. The exact / implementation is driven by the configuration matrix between the / worker and scheduler. / / The scheduler may reject this worker if any property keys that / the scheduler is not configured to support, or may simply ignore / the unsupported properties. / / The details on how to use this property can be found here: / https://github.com/TraceMachina/nativelink/blob/3147265047544572e3483c985e4aab0f9fdded38/nativelink-config/src/cas_server.rs
/ Prefix to use for worker IDs. This is primarily used for debugging / or for other systems to identify workers. The scheduler will always / append this prefix to the assigned worker_id followed by a UUIDv6.
/ Maximum number of inflight tasks this worker can cope with at one time / The default (0) means unlimited.
/ The worker admits any action while it holds nothing else, whatever / it reads free, rather than declining it for load. A scheduler can / then read a decline for load as coming from a busy worker. Absent / (false) from older workers.
/ Result sent back from the server when a node connects.
Used in:
/ The worker ID to place in the action results generated by this worker.
/ The scheduler understands ExecuteAccepted and ExecuteDeclined. A / worker sends them only to a scheduler that says so: an older / scheduler would drop them, and a declined action would then wait on / a worker that never runs it.
/ The platform property the scheduler reads an action's memory / reservation from, when it vetoes placement on the worker's reported / free memory (`live_memory_veto`). The worker declines a dispatch for / load against the same property, so the two sides cannot disagree. / Empty when the scheduler does not veto; the worker then never / declines for load.
/ The worker took the action it was sent and is about to run it. Until / this arrives the scheduler has only charged its ledger on the send.
Used in:
/ The result of an ExecutionComplete.
Used in:
/ The operation ID that was executed.
/ The worker will not run the action it was sent. The scheduler restores / its ledger and requeues the action without counting an attempt, and / pauses the worker until it reports room again.
Used in:
/ Free text for the log.
/ For LOAD: what the action asked for and what the worker had, in KiB.
Used in:
/ The worker already has `max_inflight_tasks` actions.
/ The action's memory reservation is more than the worker has free.
/ The worker is shutting down, or is single-use and already took / its action.
/ The result of an ExecutionRequest.
Used in:
/ The `instance_name` this task was initially assigned to. This is set by the client / that initially sent the job as part of the RBE protocol.
/ The operation ID that was executed.
/ The actual response data.
/ Result of the execution. See `build.bazel.remote.execution.v2.ExecuteResponse` / for details.
/ An internal error. This is only present when an internal error happened that / was not recoverable. If the execution job failed but at no fault of the worker / it should not use this field and should send the error via execute_response.
/ Worker-observed resource usage for this action execution.
/ Request object for going away requests.
Used in:
/ The worker is shutting down but still running actions: stop / dispatching to it and let those finish. It leaves the pool when its / stream closes. Without this the scheduler removes the worker at / once and requeues everything it holds.
NextId: 3.
/ This is a special message used to save actions into the CAS that can be used / by programs like bb_browser to inspect the history of a build. / Note: Ensure this is always compatible with: / https://github.com/buildbarn/bb-remote-execution/blob/e95e066eb624dc9099682394ec18c12e218e8fc4/pkg/proto/cas/cas.proto#L23
/ Request object for keep alive requests.
Used in:
/ The worker's spare capacity as of this keepalive.
/ Request to kill a running operation sent from the scheduler to a worker.
Used in:
/ The the operation id for the operation to be killed.
/ The reservation an action was admitted under, echoed by the worker so / the measurement and the number it was measured against travel together.
Used in:
/ How an action ended, as the worker saw it. Separate from the exit code: / a kill by the worker or the kernel is a sizing fact, not a tool failure.
Used in:
/ The process exited on its own, whatever its exit code.
/ Killed for memory: by the worker's reservation enforcement, or by / the kernel with the last sample within 10% of the memory limit.
/ Killed for disk. Reserved for disk enforcement.
/ Killed by the action timeout.
/ Killed from outside: a scheduler cancel, or a signal nobody here sent.
Used in: ,
/ The action information used to execute job.
/ Id of the operation.
/ The time at which the command was added to the queue to allow population / of the ActionResult.
/ The post-computed platform properties that the scheduler has reserved for / the action.
/ The ID of the worker that is executing the action.
/ Original execution metadata, including the build tool and invocation. / Workers must not infer a Buck2 file session from an action digest alone.
/ What a worker has to spare, sent with every keepalive so the scheduler / can veto a placement the admission ledger would allow. Absent from / older workers.
Used in:
/ Memory the worker could still give an action, in KiB: the cgroup / limit less its working set (current usage less the page cache the / kernel can drop at once), or MemAvailable without a limit.