package google.devtools.remoteworkers.v1test2

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

service Bots

bots.proto:64

Design doc: https://goo.gl/oojM5H Loosely speaking, the Bots interface monitors a collection of workers (think of them as "computers" for a moment). This collection is known as a "farm," and its purpose is to perform work on behalf of a client. Each worker runs a small program known as a "bot" that allows it to be controlled by the server. This interface contains only methods that are called by the bots themselves; admin functionality is out of scope for this interface. More precisely, we use the term "worker" to refer to the physical "thing" running the bot. We use the term "worker," and not "machine" or "computer," since a worker may consist of more than one machine - e.g., a computer with multiple attached devices, or even a cluster of computers, with only one of them running the bot. Conversely, a single machine may host several bots, in which case each bot has a "worker" corresponding to the slice of the machine being managed by that bot. The main resource in the Bots interface is not, surprisingly, a Bot - it is a BotSession, which represents a period of time in which a bot is in continuous contact with the server (see the BotSession message for more information). The parent of a bot session can be thought of as an instance of a farm. That is, one endpoint may be able to manage many farms for many users. For example, for a farm managed through GCP, the parent resource will typically take the form "projects/{project_id}". This is referred to below as "the farm resource."

service Tasks

tasks.proto:38

DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by Lease.result and logs should be precreated prior to sending to the bot (eg, via CommandTask.expected_outputs.stdout_destination).

message AdminTemp

bots.proto:226

AdminTemp is a prelimiary set of administration tasks. It's called "Temp" because we do not yet know the best way to represent admin tasks; it's possible that this will be entirely replaced in later versions of this API. If this message proves to be sufficient, it will be renamed in the alpha or beta release of this API. This message (suitably marshalled into a protobuf.Any) can be used as the inline_assignment field in a lease; the lease assignment field should simply be `"admin"` in these cases. This message is heavily based on Swarming administration tasks from the LUCI project (http://github.com/luci/luci-py/appengine/swarming).

enum AdminTemp.Command

bots.proto:228

Possible administration actions.

Used in: AdminTemp

message Blob

command.proto:264

Describes a blob of binary content with its digest.

Used in: CommandTask.Inputs

message BotSession

bots.proto:97

A bot session represents the state of a bot while in continuous contact with the server for a period of time. The session includes information about the worker - that is, the *worker* (the physical or virtual hardware) is considered to be a property of the bot (the software agent running on that hardware), which is the reverse of real life, but more natural from the point of the view of this API, which communicates solely with the bot and not directly with the underlying worker.

Used as response type in: Bots.CreateBotSession, Bots.UpdateBotSession

Used as field type in: CreateBotSessionRequest, UpdateBotSessionRequest

enum BotStatus

bots.proto:258

A coarse description of the status of the bot that the server uses to determine whether to assign the bot new leases.

Used in: BotSession

message CommandOutputs

command.proto:145

DEPRECATED - use CommandResult instead. Describes the actual outputs from the task.

message CommandOverhead

command.proto:162

DEPRECATED - use CommandResult instead. Can be used as part of CompleteRequest.metadata, or are part of a more sophisticated message.

message CommandResult

command.proto:175

All information about the execution of a command, suitable for providing as the Bots interface's `Lease.result` field.

message CommandTask

command.proto:33

Describes a shell-style task to execute, suitable for providing as the Bots interface's `Lease.payload` field.

message CommandTask.Inputs

command.proto:35

Describes the inputs to a shell-style task.

Used in: CommandTask

message CommandTask.Inputs.EnvironmentVariable

command.proto:37

An environment variable required by this task.

Used in: Inputs

message CommandTask.Outputs

command.proto:87

Describes the expected outputs of the command.

Used in: CommandTask

message CommandTask.Timeouts

command.proto:112

Describes the timeouts associated with this task.

Used in: CommandTask

message Device

worker.proto:133

Any device, including computers, phones, accelerators (e.g. GPUs), etc. All names must be unique.

Used in: Worker

message Device.Property

worker.proto:135

A device property; see `properties` for more information.

Used in: Device

message Digest

command.proto:251

The CommandTask and CommandResult messages assume the existence of a service that can serve blobs of content, identified by a hash and size known as a "digest." The method by which these blobs may be retrieved is not specified here, but a model implementation is in the Remote Execution API's "ContentAddressibleStorage" interface. In the context of the RWAPI, a Digest will virtually always refer to the contents of a file or a directory. The latter is represented by the byte-encoded Directory message.

Used in: Blob, CommandOutputs, CommandResult, CommandTask.Inputs, DirectoryMetadata, FileMetadata

message Directory

command.proto:274

The contents of a directory. Similar to the equivalent message in the Remote Execution API.

message DirectoryMetadata

command.proto:233

The metadata for a directory. Similar to the equivalent message in the Remote Execution API.

Used in: Directory

message FileMetadata

command.proto:211

The metadata for a file. Similar to the equivalent message in the Remote Execution API.

Used in: Directory

message Lease

bots.proto:168

A Lease is a lease that the scheduler has assigned to this bot. If the bot notices (by UpdateBotSession) that it has any leases in the PENDING state, it should call UpdateBotSession to put the leases into the ACTIVE state and start executing their assignments. All fields in this message are output-only, *except* the `state` and `status` fields. Note that repeated fields can only be updated as a unit, so on every update the bot must provide an update for *all* the leases the server expects it to report on. The scheduler *should* ensure that all leases scheduled to a bot can actually be accepted, but race conditions may occur. In such cases, the bot should attempt to accept the leases in the order they are listed by the server, to allow the server to control priorities. The server will remove COMPLETED leases from time to time, after which the bot shouldn't report on them any more (the server will ignore superfluous COMPLETED records).

Used in: BotSession

enum LeaseState

bots.proto:293

The state of the lease. All leases start in the PENDING state. A bot can change PENDING to ACTIVE or (in the case of an error) COMPLETED, or from ACTIVE to COMPLETED. The server can change PENDING or ACTIVE to CANCELLED if it wants the bot to release its resources - for example, if the bot needs to be quarantined (it's producing bad output) or a cell needs to be drained.

Used in: Lease

message TaskResult

tasks.proto:110

DEPRECATED - use Lease.assignment_result instead. The result and metadata of the task.

Used as response type in: Tasks.UpdateTaskResult

Used as field type in: UpdateTaskResultRequest

message Worker

worker.proto:62

Describes a worker, which is a list of one or more devices and the connections between them. A device could be a computer, a phone, or even an accelerator like a GPU; it's up to the farm administrator to decide how to model their farm. For example, if a farm only has one type of GPU, the GPU could be modelled as a "has_gpu" property on its host computer; if it has many subproperties itself, it might be better to model it as a separate device. The first device in the worker is the "primary device" - that is, the device running a bot and which is responsible for actually executing commands. All other devices are considered to be attached devices, and must be controllable by the primary device. This message (and all its submessages) can be used in two contexts: * Status: sent by the bot to report the current capabilities of the device to allow reservation matching. * Request: sent by a client to request a device with certain capabilities in a reservation. Several of the fields in this message have different semantics depending on which of which of these contexts it is used. These semantics are described below. Several messages in Worker and its submessages have the concept of keys and values, such as `Worker.Property` and `Device.Property`. All keys are simple strings, but certain keys are "standard" keys and should be broadly supported across farms and implementations; these are listed below each relevant message. Bot implementations or farm admins may add *additional* keys, but these SHOULD all begin with an underscore so they do not conflict with standard keys that may be added in the future. Keys are not context sensitive. See http://goo.gl/NurY8g for more information on the Worker message.

Used in: BotSession, Lease

message Worker.Config

worker.proto:83

A configuration request or report; see the `configs` field for more information.

Used in: Worker

message Worker.Property

worker.proto:64

A global property; see the `properties` field for more information.

Used in: Worker