Project

General

Profile

Feature #12917

Updated by Peter Amstutz 13 days ago

Users should be able to see the exit code or state=[“Queued”, “Locked”, “Running”, “Cancelled” and “Complete”] from the container_request api method, rather than having to go another layer deeper to the container api method. 

 h2. Proposed solution 

 Expand the existing Add a general "include" option to the group contents method to support "container_uuid". index (list) method. 

 @include=container_uuid@ include=container includes the contents of the record associated with @container_uuid@ container_uuid 

 Can only be used on fields ending in the "includes" list. _uuid 

 A query like this would return: 

 ?include=container_uuid ?include=container 

 <pre> 
 { 
   "items": [ 
     { 
       "kind": "arvados#container_request", 
       "uuid": "abc-123", 
       "container_uuid": "xyz-123"  
       
       ... 
     } 
   ], 
   "includes": [ 
     { 
       "uuid": "xyz-123", 
       "state": "Completed", 
       "exit_code": 0, 
       ... 
     } 
   ] 
 } 
 </pre> 

 Initially we will only adopt this syntax but initially limiting the implementation to only container requests. This should support field selection similarly to how be implemented on the controller side. 

 If used for anything other than include=container on container_request it works should return an API error. 

 Discussion points for group contents, e.g. @select=["containers.uuid", "containers.state"]@ future: 

 The "include" query parameter needs * selecting fields in the includes 
 * Permission enforcement.    Permission to support either read a string (for container is based on permission to read the container_request, but this is not true generally.    For example, permission to read a single thing being included) or container request doesn't grant permission to read output_uuid. 
 * Straightforward to set up a json list (if there are join when the _uuid field points to exactly one record type (only collections, only containers, etc) but more complex when it can point to multiple things being included, e.g. include=["owner_uuid", "container_uuid"]) 
 (owner_uuid, head/tail_uuid on links)

Back