New name of output collection is null or empty
authorNico Cesar <nico@nicocesar.com>
Wed, 18 Nov 2020 21:08:30 +0000 (16:08 -0500)
committerNico Cesar <nico@nicocesar.com>
Wed, 18 Nov 2020 21:08:30 +0000 (16:08 -0500)
Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico@curii.com>

doc/api/methods/container_requests.html.textile.liquid
services/api/app/models/container_request.rb

index cd566f5ce42dcf29edab62c6d38a103f9737ba94..b24a24e0674b9a6f01e7463072e8ccd18ed15213 100644 (file)
@@ -49,7 +49,7 @@ table(table table-bordered table-condensed).
 |cwd|string|Initial working directory, given as an absolute path (in the container) or a path relative to the WORKDIR given in the image's Dockerfile.|Required.|
 |command|array of strings|Command to execute in the container.|Required. e.g., @["echo","hello"]@|
 |output_path|string|Path to a directory or file inside the container that should be preserved as container's output when it finishes. This path must be one of the mount targets. For best performance, point output_path to a writable collection mount.  See "Pre-populate output using Mount points":#pre-populate-output for details regarding optional output pre-population using mount points and "Symlinks in output":#symlinks-in-output for additional details.|Required.|
-|output_name|string|Desired name for the output collection. If null, a name will be assigned automatically.||
+|output_name|string|Desired name for the output collection. If null or empty, a name will be assigned automatically.||
 |output_ttl|integer|Desired lifetime for the output collection, in seconds. If zero, the output collection will not be deleted automatically.||
 |priority|integer|Range 0-1000.  Indicate scheduling order preference.|Clients are expected to submit container requests with zero priority in order to preview the container that will be used to satisfy it. Priority can be null if and only if state!="Committed".  See "below for more details":#priority .|
 |expires_at|datetime|After this time, priority is considered to be zero.|Not yet implemented.|
index 77536eee4f28f53a2acae66cc90d647967ff6b51..2ba175fd996c355f1f438c94ceaf279731ba68b2 100644 (file)
@@ -194,7 +194,7 @@ class ContainerRequest < ArvadosModel
       coll_name = "Container #{out_type} for request #{uuid}"
       trash_at = nil
       if out_type == 'output'
-        if self.output_name
+        if self.output_name and self.output_name != ""
           coll_name = self.output_name
         end
         if self.output_ttl > 0