buildgrid.server.execution.instance module

ExecutionInstance

An instance of the Remote Execution Service.

class buildgrid.server.execution.instance.ExecutionInstance(scheduler: SQLDataStore, operation_stream_keepalive_timeout: int | None = None)

Bases: Instance

SERVICE_NAME: ClassVar[str] = 'build.bazel.remote.execution.v2.Execution'

The expected FULL_NAME of the Service which will wrap this instance. This value should be declared on the class of any Instance implementations.

start() None

A method called when the grpc service is starting.

This method may be overriden if startup logic is required.

stop() None

A method called when the grpc service is shutting down.

This method may be overriden if shutdown logic is required.

set_instance_name(instance_name: str) None

Set the instance name associated with this instance. This method may be overriden if extra referencing is required.

Parameters:

instance_name (str) – The new instance’s name.

Raises:

AssertionError – if the instance is already registered.

hash_type() int
execute(*, action_digest: Digest, skip_cache_lookup: bool, priority: int = 0, request_metadata: RequestMetadata | None = None, client_identity: ClientIdentityEntry | None = None) str

Sends a job for execution. Queues an action and creates an Operation to be associated with this action.

stream_operation_updates(operation_name: str, context: CancellationContext) Iterable[Operation]
get_storage_capabilities() CacheCapabilities
get_action_cache_capabilities() Tuple[Any | None, ActionCacheUpdateCapabilities | None]