bazelbuild / bazelbuild/remote-apis

Allow abitrary tagging in RequestMetadata

Open
#304 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
445
Forks
141
PR merge metrics
No merged PRs in 30d

Description

### Issue Description

#### Background
This issue is a follow-up to [Bazel Issue #21332](https://github.com/bazelbuild/bazel/issues/21332).

#### Summary
In some setups, it is beneficial to provide metadata about the target being built to the Remote Build Execution (RBE) service. This metadata can help in identifying the "ownership" of a specific action, target, artifact, or test. If there are anomalies during the build, the build service can use this information to alert the appropriate on-call rotation. For example, in Buck2, `oncall()` annotations at the package level in BUCK files serve this purpose ([example](https://github.com/search?q=repo%3Afacebook%2Fbuck2+%2Foncall%2F&type=code)).

#### Use Cases
1. **Ownership Tagging**: Identifying the owner of a build action to help with on-call rotations.
2. **Cost Attribution**: Tagging for Remote Cache and RBE cost attribution based on team, service, programming language, or relevant categories.

#### Proposal
To support these use cases, I propose to add the following to the specification:

```diff
--- a/build/bazel/remote/execution/v2/remote_execution.proto
+++ b/build/bazel/remote/execution/v2/remote_execution.proto
@@ -2118,4 +2118,7 @@ message RequestMetadata {
// There is no expectation that this value will have any particular structure,
// or equality across invocations, though some client tools may offer these guarantees.
string configuration_id = 7;
+
+ // Multiple group identifiers for the target that produced this action.
+ repeated string target_tags = 8;
}
```

By adding `target_tags` as a repeated string field in the `RequestMetadata` message, multiple group identifiers for the target can be specified.

Contributor guide

Open the contributing guide

Research direction

Open build/bazel/remote/execution/v2/remote_execution.proto and inspect RequestMetadata around configuration_id. Review the proposed repeated target_tags field and the surrounding protocol conventions; done means RequestMetadata can represent multiple target tags while preserving the existing fields.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.