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

Upgrade to v2 of bazel protobuf #6027

Merged
merged 2 commits into from
Jul 10, 2018

Conversation

illicitonion
Copy link
Contributor

Key differences:

  • Execute is a streaming RPC - we only support a single response per
    stream.
  • Action is now a separate proto addressed by digest, rather than
    inlined.
  • Inline output files are no longer supported.
  • Output files are now specified on Command not Action.

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!

@@ -39,6 +39,40 @@ enum ExecutionError {
NotFinished(String),
}

impl CommandRunner {
// The Execute API used to be unary, and became streaming. The contract of the streaming API is
// that if the client disconnects after one request, it should continue to function exactly like
Copy link
Member

Choose a reason for hiding this comment

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

Is this a literal disconnection, ie closed connection? Or is this a single stream being closed on a multiplexed connection? Potentially expensive if the former...

Maybe worth a TODO to drop this when servers have migrated, if this is a compatibility thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The underlying channel stays open, but the stream on top of it gets closed.

Reworded, added comment about possible future.

stream
.take(1)
.into_future()
// Drop the _stream to disconnect so that the server doesn't keep the connection alive and
Copy link
Member

Choose a reason for hiding this comment

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

Comment moved below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reworded both comments.

grpcio::RpcStatusCode::Unimplemented,
None,
));
unimplemented!()
Copy link
Member

Choose a reason for hiding this comment

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

Because this method is deprecated, or...?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comment

Copy link
Contributor

@dotordogh dotordogh left a comment

Choose a reason for hiding this comment

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

Looks great! Some changes took some time to understand, but makes sense now! I'm exited to see this work end to end!

stream
.take(1)
.into_future()
// Drop the _stream to disconnect so that the server doesn't keep the connection alive and
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe adding to the comment that this is dropping the stream if this is an error, and another comment for the other line that it is dropping the stream if it succeeds.

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

))
})
})
// The unwrap() below is safe because we have joined any futures that had references to the Arc
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is no longer relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

Key differences:
 * Execute is a streaming RPC - we only support a single response per
   stream.
 * Action is now a separate proto addressed by digest, rather than
   inlined.
 * Inline output files are no longer supported.
 * Output files are now specified on Command not Action.
@illicitonion illicitonion force-pushed the dwagnerhall/bazelv2 branch from 1acf9a7 to 596538d Compare July 10, 2018 10:52
@illicitonion illicitonion merged commit 1e6ae97 into pantsbuild:master Jul 10, 2018
@illicitonion illicitonion deleted the dwagnerhall/bazelv2 branch July 10, 2018 12:38
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.

3 participants