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

Remote Output Service: initial proto definition #18775

Closed

Conversation

stagnation
Copy link
Contributor

Introduce a .proto file for the proposed Remote Output Service. This commit is part of Ed Scouten's ideas and demonstration of feasibility described in the linked pull request below, my contribution is just clerical. The Remote Output Service can speed up build with large output files by avoiding the downloads. Combined with an on-demand filesystem solution clients can download just the files they need. The big picture is described and tracked in
#12823 .

This is the first step in a rough process:

1 Review and merge the remote_output_service.proto definition first.
2 Implement the Bazel side from scratch, so we only have one
  implementation of OutputService.
3 The community will implement and maintain the server part (local
  daemon) outside of the Bazel source tree.
4 Eventually, remote_output_service.proto will move out of the Bazel
  source tree and be maintained by the community, similar to the
  REAPI spec today.

@google-cla
Copy link

google-cla bot commented Jun 26, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Jun 26, 2023
@sgowroji sgowroji added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Jun 27, 2023
@coeuvre coeuvre self-requested a review June 27, 2023 09:49
@stagnation stagnation force-pushed the feature/ROS-proto-defintion branch from 0dc47c9 to 7db94f9 Compare June 27, 2023 10:03
@meisterT meisterT requested a review from tjgq July 13, 2023 11:31
message File {
// The hash and size of the file. This field is only set when
// BatchStatRequest.include_file_digest is set.
build.bazel.remote.execution.v2.Digest digest = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Some more experience using this protocol: my recommendation would be to allow the server to not report this value if it prefers.

Namely, I have observed Bazel sometimes prefers to obtain the digest of a file for which it still has one or more open file descriptors. If the FUSE file system has write-back caching enabled, this may cause dirty pages to remain in the page cache.

In that case it would be desirable for bb_clientd or any other implementation to omit this field, instructing Bazel to compute the digest itself.

     // The hash and size of the file. This field is only set when
     // BatchStatRequest.include_file_digest is set.
+    //
+    // This field may also be omitted if the remote output service is
+    // unable to compute it accurately. For example, when a file is
+    // opened for writing, the kernel may buffer data to be written.
+    // When absent, the caller should fall back to computing the digest
+    // manually.
     build.bazel.remote.execution.v2.Digest digest = 1;

Copy link
Member

Choose a reason for hiding this comment

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

I agree. From Bazel's perspective, this is a best-effort/fast approach to get digest if available. Bazel can always fallback to manually compute the digest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good :) I will update the comment

@stagnation stagnation force-pushed the feature/ROS-proto-defintion branch from 7db94f9 to ba3336c Compare October 4, 2023 10:30
Introduce a .proto file for the proposed Remote Output Service. This
commit is part of Ed Schouten's ideas and demonstration of feasibility
described in the linked pull request below, this commit is just
clerical. The Remote Output Service can speed up build with large output
files by avoiding the downloads. Combined with an on-demand filesystem
solution clients can download just the files they need. The big picture
is described and tracked in
bazelbuild#12823 .

This is the first step in a rough process:

    1 Review and merge the remote_output_service.proto definition first.
    2 Implement the Bazel side from scratch, so we only have one
      implementation of OutputService.
    3 The community will implement and maintain the server part (local
      daemon) outside of the Bazel source tree.
    4 Eventually, remote_output_service.proto will move out of the Bazel
      source tree and be maintained by the community, similar to the
      REAPI spec today.
@stagnation stagnation force-pushed the feature/ROS-proto-defintion branch from ba3336c to f128e40 Compare October 4, 2023 10:35
@EdSchouten
Copy link
Contributor

@stagnation I think this can be closed now, right?

@stagnation stagnation closed this Mar 8, 2024
@stagnation stagnation deleted the feature/ROS-proto-defintion branch March 8, 2024 12:21
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants