Skip to content

Remove slash from resource name on empty instance name

Gustavo Nazario Perez requested to merge gnazariopere/fix-empty-instance into master

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 what instance_name and resource was inputted.
  • Simple unit tests for set_resource_name in tests/commands/cmd_logstream.py.

Merge request reports

Loading