Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional optional metadata fields #186

Merged
merged 3 commits into from
Mar 1, 2021

Conversation

illicitonion
Copy link
Contributor

No description provided.

@google-cla google-cla bot added the cla: yes Pull requests whose authors are covered by a CLA with Google. label Feb 8, 2021
build/bazel/remote/execution/v2/remote_execution.proto Outdated Show resolved Hide resolved
// A namespace within which the build was performed, for instance a repository/workspace name.
string invocation_namespace_id = 6;

// An identifier for the target, unique within the invocation_namespace_id, which produced this action.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what it means to be "unique within the invocation_namespace_id". I could see unique within the build (tool_invocation_id) though even that gets confusing with multiple configurations, but I'm not sure how to extend that to multiple invocations on a namespace. Maybe call out what can be inferred from this uniqueness?

(Also, this may require invocation_namespace_id be globally unique).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this is trying to get at is basically: Within one namespace, two actions with the same target were generated by the same target. (Which, if you can rely on your users' namespace_ids being unique, is a strong statement, and otherwise probably just means that within a tool_invocation_id two actions with the same target were generated by the same target). I can just remove the comment about uniqueness, if you think that would be more clear?


// A namespace within which the build was performed, for instance a repository/workspace name.
// There are no guarantees that these are globally unique, e.g. two users may create namespaces with the same name.
string invocation_namespace_id = 6;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's per-invocation, putting it in the per-action metadata is not ideal. I've previously seen cases where metadata ended up being more than 50% of the network traffic, with most of it being redundant. Please don't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a reasonable concern - the same is presumably true for correlated_invocations_id - I expect that's tied to a single tool_invocation_id?

Perhaps both of these fields could be attached to GetCapabilities (either as in-line metadata in the request, or as header metadata) so that a remote execution system can record an association between them, and then they could be omitted from the per-request headers?

Copy link
Collaborator

@EdSchouten EdSchouten Feb 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would be to only attach the bare minimum here, and rely on the Build Event Stream to provide all other info. More concretely, this info should be part of the metadata:

  • invocation ID
  • target name
  • configuration ID

But this info could be part of the BES:

  • correlated invocations ID
  • tool name and version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you happen to be running a BES, I think that makes complete sense, but I'm not sure closely coupling those two systems is broadly applicable enough to have one depend on the other.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we leave this field out for now and check the rest in? :-D The other new items seem obviously a good idea to add to the proto.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally - updated to remove that field :)

EdSchouten added a commit to buildbarn/bb-browser that referenced this pull request Feb 17, 2021
This makes it possible to see the build tool's invocation ID and version
number on action and uncached action result pages. This feature will
become a lot more interesting once the following API for remote-apis
lands:

bazelbuild/remote-apis#186

Once we have that, we can display Bazel target names, configuration IDs,
etc., meaning we can finally correlate Build Event Stream events with
individual actions in Buildbarn.
Copy link
Collaborator

@EdSchouten EdSchouten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

illicitonion added a commit to illicitonion/bazel that referenced this pull request Feb 25, 2021
@bergsieker
Copy link
Collaborator

I'll merge this tomorrow morning unless someone else leaves comments.

@illicitonion
Copy link
Contributor Author

@bergsieker friendly ping? :)

@bergsieker bergsieker merged commit 6345202 into bazelbuild:master Mar 1, 2021
@illicitonion illicitonion deleted the metadata branch March 1, 2021 15:44
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 1, 2021
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 3, 2021
@coeuvre
Copy link
Member

coeuvre commented Mar 3, 2021

Please import this change as well.

illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 16, 2021
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 16, 2021
bazel-io pushed a commit to bazelbuild/bazel that referenced this pull request Apr 16, 2021
This reflects bazelbuild/remote-apis#186

Closes #13109.

PiperOrigin-RevId: 368763391
philwo pushed a commit to bazelbuild/bazel that referenced this pull request Apr 20, 2021
This reflects bazelbuild/remote-apis#186

Closes #13109.

PiperOrigin-RevId: 368763391
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this pull request Sep 4, 2022
    This reflects bazelbuild/remote-apis#186

    Closes #13109.

    PiperOrigin-RevId: 368763391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Pull requests whose authors are covered by a CLA with Google.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants