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

Populate output_directory for remote execution responses #5709

Closed
illicitonion opened this issue Apr 16, 2018 · 3 comments
Closed

Populate output_directory for remote execution responses #5709

illicitonion opened this issue Apr 16, 2018 · 3 comments
Assignees
Projects

Comments

@illicitonion
Copy link
Contributor

illicitonion commented Apr 16, 2018

Currently, ExecuteProcessRequest specifies a list of output file paths that it wants to know about if they're generated by the process, and ExecuteProcessResult has a Digest of a Directory representing these outputs.

Local process execution reads these files from disk, and populates the output Directory Digest.

Remote process execution does not.

The ActionResult protocol buffer message has a list of OutputFile messages which are populated by the remote server.

We need to take this list, turn it into a Directory, and populate it on the ExecuteProcessResult.

The steps to do this are, roughly:

  1. If the content is inline in the OutputFile, store it in the store and get the digest.
  2. Construct a Directory from the list of file names, digests, and is_executable bits. We already have code to do this from a list of PathStats - maybe we want to re-use this, constructing PathStats for each File (easy to do), and passing in a custom StoreFileByDigest implementation which just looks up the (already known) digest from the filename. Alternatively, maybe we just want to write fresh code to do this, as it shouldn't be too much code.
  3. Store that Directory in the Store (so it can be looked up in the future), and set the field on the ExecuteProcessResult.
@stuhood
Copy link
Sponsor Member

stuhood commented Apr 18, 2018 via email

@illicitonion
Copy link
Contributor Author

My goal is to make remoting be a drop-in replacement for what currently exists, and then to make optimisations in the future. I find it incredibly likely we'll want to make output fetching lazy in the future, but it's a pure optimisation and is not on the critical path for getting something working end-to-end :)

@stuhood
Copy link
Sponsor Member

stuhood commented Apr 18, 2018

Hm, ok. I suppose eagerly fetching doesn't mean eagerly materializing.

@illicitonion illicitonion changed the title Eagerly fetch output files from remote execution responses Populate output_directory for remote execution responses May 17, 2018
@stuhood stuhood added the quelea label May 23, 2018
@dotordogh dotordogh self-assigned this May 23, 2018
@illicitonion illicitonion moved this from To do to In progress in Remoting May 23, 2018
@illicitonion illicitonion moved this from In progress to Done in Remoting Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Remoting
  
Done
Development

No branches or pull requests

3 participants