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

Snapshot is backed by LMDB not tar files #5496

Merged
merged 3 commits into from
Feb 22, 2018

Conversation

illicitonion
Copy link
Contributor

This is much more incremental, and will help us to support remote
execution (where Directory protos are the lingua franca).

There are still several significant things to clean up here:

  • Some IsolatedProcess tests are disabled
  • We need to work out how to do input/output conversions for
    IsolatedProcess for real
  • Process execution is hard-coded to be local, synchronous, and a
    little panic-y

but as this is already a very large change, and the process execution
pieces aren't actually used in production codepaths, I'd like those to
be follow-ups.

@illicitonion
Copy link
Contributor Author

Depends on #5493 and #5494 and #5495

This is much more incremental, and will help us to support remote
execution (where Directory protos are the lingua franca).

There are still several significant things to clean up here:
 * Some IsolatedProcess tests are disabled
 * We need to work out how to do input/output conversions for
   IsolatedProcess for real
 * Process execution is hard-coded to be local, synchronous, and a
   little panic-y

but as this is already a very large change, and the process execution
pieces aren't actually used in production codepaths, I'd like those to
be follow-ups.
Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks!

// Without this flag, each time a read transaction is started, it eats into our transaction
// limit (default: 126) until that thread dies.
//
// This flag makes transactions are removed from that limit when they are dropped, rather
Copy link
Member

Choose a reason for hiding this comment

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

makes sure transactions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -60,7 +62,13 @@ If unspecified, local execution will be performed.",
};
let server = args.value_of("server");

let request = process_execution::ExecuteProcessRequest { argv, env };
// TODO: Capture the working directory as a snapshot, and materialize it to a temporary directory.
Copy link
Member

Choose a reason for hiding this comment

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

Would that be used somewhere? I'm not sure where... Seems more likely that we'd want to take a (list) of input snapshots as argument (depending on the snapshot manipulation API)? Either way, not important now.

@@ -120,6 +105,12 @@ impl Context {
}
}

impl StoreFileByDigest<Failure> for Context {
Copy link
Member

Choose a reason for hiding this comment

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

I think VFS is implemented in nodes.rs... unclear what the pros/cons of splitting impls across files would be, beyond reducing cross-file imports, so *shrug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved


// TODO: Make this much less unwrap-happy as part of moving this to run off-thread and
// asynchronously.

Copy link
Member

@stuhood stuhood Feb 21, 2018

Choose a reason for hiding this comment

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

There might also be a potential solution involving interning Snapshot objects by digest on the rust side, and then keeping the python object more svelte? ... depends on the Snapshot manipulation API more than the threading, per-se.

It might be worth opening a Snapshot manipulation API ticket soon and then doing some design sketching there.

Copy link
Contributor Author

@illicitonion illicitonion Feb 22, 2018

Choose a reason for hiding this comment

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

Filed #5502 and linked to it there

let tmpdir = TempDir::new("process-execution").unwrap();
// TODO: Materialize the snapshot into the tmpdir when ExecuteProcessRequest has a Snapshot.
// TODO: Make this much less unwrap-happy as part of moving this to run off-thread and
// asynchronously.
Copy link
Member

Choose a reason for hiding this comment

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

ditto snapshot manipulation reference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed #5502 and linked to it there

@illicitonion illicitonion merged commit e3c38ba into pantsbuild:master Feb 22, 2018
@illicitonion illicitonion deleted the dwagnerhall/itywip branch February 26, 2018 11:30
illicitonion added a commit to twitter/pants that referenced this pull request Mar 5, 2018
wisechengyi pushed a commit that referenced this pull request Mar 5, 2018
wisechengyi pushed a commit that referenced this pull request Mar 5, 2018
* Revert "Use rust logging API (#5525)"

This reverts commit 1150d09.

* Revert "Fix up remote process execution (#5500)"

This reverts commit 628c83d.

* Revert "Remote execution uploads files from a Store (#5499)"

This reverts commit 935086b.

* Revert "Remote command execution returns a Future (#5497)"

This reverts commit fbff143.

* Revert "Snapshot is backed by LMDB not tar files (#5496)"

This reverts commit e3c38ba.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants