Remove slash from resource name on empty instance name
A slash is prepended to the resource name even when the instance name is empty. The Remote Execution API proto states that
// * `instance_name` is an identifier used to distinguish between the various
// instances on the server. Syntax and semantics of this field are defined
// by the server; Clients must not make any assumptions about it (e.g.,
// whether it spans multiple path segments or not). If it is the empty path,
// the leading slash is omitted, so that the `resource_name` becomes
For more context, see this issue.
Changes
-
set_resource_name(instance_name, resource)
to set the resource name depending on whatinstance_name
andresource
was inputted. - Simple unit tests for
set_resource_name
intests/commands/cmd_logstream.py
.