Re: [BuildStream] CAS server resource names & instance names
- From: Jürg Billeter <j bitron ch>
- To: Jim MacArthur <jim macarthur codethink co uk>, buildstream-list gnome org
- Subject: Re: [BuildStream] CAS server resource names & instance names
- Date: Mon, 10 Dec 2018 14:48:43 +0100
On Mon, 2018-12-10 at 13:41 +0000, Jim MacArthur wrote:
On 10/12/2018 12:46, Jürg Billeter wrote:
Remote execution storage will take an optional instance name and not
provide it or the initial slash if it's not provided, although I will
allow specification of "" as a valid instance name, distinct from not
specifying one.
I don't understand this. In the protocol there is no difference between
an empty instance name and not specifying an instance name (as in
protobuf it's the same). Why (and how) would we treat these two cases
differently in BuildStream, possibly violating the spec?
I don't see how you've got to the conclusion that empty instance and no
instance are the same thing. The Bazel protocol does say "For servers
which do not support multiple instances, then the `instance_name` is the
empty path" but that doesn't necessary imply behaviour for servers which
do support it. I can also see mappings to http URLs which look like
they'll always include an instance name or empty string, but I wasn't
considering them authoritative specifications.
For example, for Execution.Execute() instance_name is a protobuf string
field in the ExecuteRequest message. URL mapping is handled internally
by gRPC, clients can't normally influence it. Protobuf messages don't
allow distinction between unset string fields and empty string fields
(the serialization is identical).
I.e., at least for Execution.Execute() empty instance_name and no
instance_name are identical. It's impossible for the server to treat
them differently. I don't think it makes sense to distinguish the two
cases in other places where it would theoretically be possible. That
would be inconsistent and confusing, in my opinion.
Cheers,
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]