buildgrid.server.actioncache.service module

ActionCacheService

Allows clients to manually query/update the action cache.

class buildgrid.server.actioncache.service.ActionCacheService(server)

Bases: buildgrid._protos.build.bazel.remote.execution.v2.remote_execution_pb2_grpc.ActionCacheServicer

add_instance(name, instance)
GetActionResult(request, context)

Retrieve a cached execution result.

Implementations SHOULD ensure that any blobs referenced from the [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage] are available at the time of returning the [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be for some period of time afterwards. The TTLs of the referenced blobs SHOULD be increased if necessary and applicable.

Errors:

  • NOT_FOUND: The requested ActionResult is not in the cache.

UpdateActionResult(request, context)

Upload a new execution result.

In order to allow the server to perform access control based on the type of action, and to assist with client debugging, the client MUST first upload the [Action][build.bazel.remote.execution.v2.Execution] that produced the result, along with its [Command][build.bazel.remote.execution.v2.Command], into the ContentAddressableStorage.

Errors:

  • INVALID_ARGUMENT: One or more arguments are invalid.

  • FAILED_PRECONDITION: One or more errors occurred in updating the

action result, such as a missing command or action. * RESOURCE_EXHAUSTED: There is insufficient storage space to add the entry to the cache.