Skip to content

Commit

Permalink
ExecutedActionMetadata: Allow adding auxiliary metadata (#154)
Browse files Browse the repository at this point in the history
ExecutedActionMetadata provides a number of fields that help us to get
insight in the worker that executed a build action, such as the name of
the worker and some basic timing statistics.

Buildbarn ships with a small local modification to
ExecutedActionMetadata, adding a 'repeated google.protobuf.Any' field.
This field is used by some of Buildbarn's components to embed even more
metrics into ActionResult, such as POSIX getrusage(2) information and
temporary space allocation stats:

https://github.com/buildbarn/bb-remote-execution/blob/master/pkg/proto/resourceusage/resourceusage.proto

By having this data embedded in the ActionResult, people can view this
information by simply inspecting a build action through bb-browser. This
makes it easier for people to diagnose build failures accurately.

By using google.protobuf.Any, build clusters can expose their own
metrics without requiring any further protocol extensions. It doesn't
make sense to standardise those metrics, as they tend to be strongly
implementation specific.
  • Loading branch information
EdSchouten authored Oct 30, 2020
1 parent ddca4b2 commit aa8e718
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/bazel/remote/execution/v2/remote_execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package build.bazel.remote.execution.v2;
import "build/bazel/semver/semver.proto";
import "google/api/annotations.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
Expand Down Expand Up @@ -881,6 +882,11 @@ message ExecutedActionMetadata {

// When the worker finished uploading action outputs.
google.protobuf.Timestamp output_upload_completed_timestamp = 10;

// Details that are specific to the kind of worker used. For example,
// on POSIX-like systems this could contain a message with
// getrusage(2) statistics.
repeated google.protobuf.Any auxiliary_metadata = 11;
}

// An ActionResult represents the result of an
Expand Down

0 comments on commit aa8e718

Please sign in to comment.