buildgrid.server.operations.instance module

OperationsInstance

An instance of the LongRunningOperations Service.

class buildgrid.server.operations.instance.OperationsInstance(scheduler: SQLDataStore, max_list_operations_page_size: int = 1000)

Bases: Instance

SERVICE_NAME: ClassVar[str] = 'google.longrunning.Operations'

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.

get_operation_ignored_exceptions = (<class 'buildgrid._exceptions.RetriableError'>,)
get_operation(operation_name: str) Tuple[Operation, Dict[str, str] | None]
list_operations_ignored_exceptions = (<class 'buildgrid._exceptions.RetriableError'>,)
list_operations(filter_string: str, page_size: int | None, page_token: str | None) ListOperationsResponse
delete_operation(job_name: str) None

DeleteOperation is not supported in BuildGrid.

cancel_operation_ignored_exceptions = (<class 'buildgrid._exceptions.NotFoundError'>, <class 'buildgrid._exceptions.RetriableError'>)
cancel_operation(operation_name: str) None