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

RemoteEx 2.2: Promote platform properties from command to action #167

Merged
merged 1 commit into from
Oct 17, 2020

Conversation

edbaunton
Copy link
Collaborator

Platform properties are currently a member of the command message which is
referred to in the action by digest. This requires the Execution Service to
make a call to the CAS to retrieve the contents of the command if it wishes to
inspect it. The platform properties are commonly used for making routing
decision about the action. Therefore, in order to route an action common
execution service implementations must introduce an additional call to the CAS
to fully hydrate the action and determine where it should be routed.

This commit promotes the platform properties from the command to the action. We
deprecate the platform properties contained within the action and bump the
minor version to version 2.2, following the model for output_paths.

Fixes #166

Signed-off-by: Ed Baunton ebaunton1@bloomberg.net

@googlebot googlebot added the cla: yes Pull requests whose authors are covered by a CLA with Google. label Sep 1, 2020
@ulfjack
Copy link
Collaborator

ulfjack commented Sep 2, 2020

This seems reasonable.

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.

Looks good!

Question: should we make it a bit more explicit what a transition path looks like? Should clients provide both for the time being? Should the one in Action be preferred over the one in Command?

At the same time, some time ago I got a request on the Buildbarn side whether it's required to specify platform properties at all. Is it valid to send requests where both Action.platform and Command.platform are null/nil/.../None, or is it required that at least one of them contains a message?

@edbaunton edbaunton force-pushed the edbaunton/inline-platform-properties branch from 307ac57 to 6eec24a Compare September 9, 2020 20:27
@edbaunton
Copy link
Collaborator Author

I am not 100% familiar with the right way to perform a proto field migration but I tried to update the docs as I would myself have expected to do it. Basically if you use 2.2 you must use the new field, if you are not using 2.2 you must populate the old and can populate the new if you want. From 2.2 you shouldn't populate the old.

From your comment @EdSchouten I also added in an 'optional' to the new field to denote that they can be empty. I didn't change that for the deprecated field.

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.

Giving this some more thought, one 'downside' of this approach is that clusters can no longer use the command digest as a key for correlating equivalent actions. For example, inspecting historical build actions to see whether their resource usage increased over time, etc..

That said, clusters are still capable of achieving this by introducing their own composite type:

message Key {
  Digest command_digest = 1;
  Platform platform = 2;
}

And hashing that to obtain a proper key for stuff like that. There's no need to account for that in the client <-> cluster protocol.

build/bazel/remote/execution/v2/remote_execution.proto Outdated Show resolved Hide resolved
@edbaunton
Copy link
Collaborator Author

How do others feel about how strict we should be with version migrations?

@edbaunton edbaunton force-pushed the edbaunton/inline-platform-properties branch from 6eec24a to 469859e Compare September 29, 2020 11:53
@edbaunton
Copy link
Collaborator Author

I have simplified the documentation to keep this simple change moving.

@edbaunton edbaunton force-pushed the edbaunton/inline-platform-properties branch from 469859e to 87b4f3d Compare October 14, 2020 19:46
Platform properties are currently a member of the `command` message which is
referred to in the action by digest. This requires the Execution Service to
make a call to the CAS to retrieve the contents of the command if it wishes to
inspect it. The platform properties are commonly used for making routing
decision about the action. Therefore, in order to route an action common
execution service implementations must introduce an additional call to the CAS
to fully hydrate the action and determine where it should be routed.

This commit promotes the platform properties from the command to the action. We
deprecate the platform properties contained within the action and bump the
minor version to version 2.2, following the model for `output_paths`.

Fixes #166

Signed-off-by: Ed Baunton <ebaunton1@bloomberg.net>
@edbaunton edbaunton force-pushed the edbaunton/inline-platform-properties branch from 87b4f3d to b171c22 Compare October 14, 2020 19:47
@edbaunton
Copy link
Collaborator Author

Keen for one more approver @EdSchouten and @ulfjack if you have a chance

@sstriker sstriker merged commit ddca4b2 into master Oct 17, 2020
@edbaunton edbaunton deleted the edbaunton/inline-platform-properties branch October 22, 2020 19:15
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 1, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 1, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 1, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 1, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.
illicitonion added a commit to illicitonion/bazel that referenced this pull request Mar 3, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.
bazel-io pushed a commit to bazelbuild/bazel that referenced this pull request Mar 3, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.

Closes #13134.

PiperOrigin-RevId: 360647520
philwo pushed a commit to bazelbuild/bazel that referenced this pull request Mar 15, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.

Closes #13134.

PiperOrigin-RevId: 360647520
philwo pushed a commit to bazelbuild/bazel that referenced this pull request Mar 15, 2021
bazelbuild/remote-apis#167 promoted the field,
but left the old one present for legacy fallback for remote execution
platforms which haven't updated yet.

This PR sets both.

Closes #13134.

PiperOrigin-RevId: 360647520
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this pull request Sep 4, 2022
    bazelbuild/remote-apis#167 promoted the field,
    but left the old one present for legacy fallback for remote execution
    platforms which haven't updated yet.

    This PR sets both.

    Closes #13134.

    PiperOrigin-RevId: 360647520
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.

Promoting or inlining platform properties
6 participants