Remote Execution: Implement RequestMetadata

Background

The RequestMetadata message allows the client to pass the server extra information:

  • tool_details: client name and version.
  • action_id: unique ID identifying requests relating to the same build action.
  • tool_invocation_id: unique ID identifying requests relating to the same build (ie. bst build invocation in BuildStream's case).
  • correlated_invocations_id: to be determine in BuildStream's case.

Having BuildStream sending this informations would allow the server to better understand incoming requests. That would also allow grouping the metrics per build, produce reports per build...

Task description

  • Agree on how the action_id, tool_invocation_id and correlated_invocations_id should be generated.
  • Attach RequestMetadata to every gRPC requests.

Acceptance Criteria

Every gRPC request send to a remote server have a requestmetadata-bin header filed set containing a valid RequestMetadata message.