Feature #12917
closedSupport ?include=container_uuid for group contents
Description
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.
Proposed solution¶
Expand the existing "include" option to the group contents method to support "container_uuid".
include=container_uuid
includes the contents of the record associated with container_uuid
in the "includes" list.
A query like this would return:
?include=container_uuid
{ "items": [ { "kind": "arvados#container_request", "uuid": "abc-123", "container_uuid": "xyz-123" ... } ], "includes": [ { "uuid": "xyz-123", "state": "Completed", "exit_code": 0, ... } ] }
This should support field selection similarly to how it works for group contents, e.g. select=["containers.uuid", "containers.state"]
The "include" query parameter needs to support either a string (for a single thing being included) or a json list (if there are multiple things being included, e.g. include=["owner_uuid", "container_uuid"])
Updated by Peter Amstutz almost 7 years ago
Suggest adding virtual fields container_state
and container_exit_code
which have the value of the corresponding fields of the record with container_uuid
, or null if no container is assigned.
Alternately, we could add a query parameter which specifies that we want the entire container record embedded in the response.
Updated by Tom Morris over 6 years ago
- Subject changed from Users should be able to see if a CR failed from the CR method to Users should be able to see if a container failed from the container_request method
Updated by Tom Clegg over 6 years ago
IMO, these aren't container_request fields so they shouldn't appear as container_request fields.
Suggest we support an "include container record" flag in container_requests#index and #show requests, and return the whole container record.
Since we're not (yet?) using jsonapi, we need to choose a response format for this. We should use something that can extend to other similar situations, like "include created_by_user record".
Updated by Tom Clegg over 6 years ago
Updated by Tom Morris over 6 years ago
- Related to Feature #13327: More responsive page loads with API ?include=container_uuid added
Updated by Peter Amstutz over 6 years ago
- Description updated (diff)
- Story points set to 2.0
Updated by Peter Amstutz over 6 years ago
Just one thought, we have wandered a little bit from the original goal of making the API easier for getting container status from container_request. Returing a separate "includes" section takes a similar amount of Python code to interpret as the current approach that requires making a second API call. Embedding the record in each item so that one can can write items0[container][state] is much simpler for the user (ie Bryan).
That said, "includes" is a more general solution that is better suited for other use cases like optimizing Workbench queries and so probably still the one we go with.
Updated by Tom Clegg over 6 years ago
Perhaps the client library could offer a "join response items" convenience function that assigns includes[x]
to items[y][f]
for all items[y][f+'_uuid']==includes[x]['uuid']
...?
Updated by Tom Morris over 6 years ago
- Target version changed from To Be Groomed to 2018-04-25 Sprint
Updated by Peter Amstutz over 6 years ago
- Has duplicate Idea #13145: Include container status & exit code in container request response added
Updated by Peter Amstutz over 6 years ago
- Target version changed from 2018-04-25 Sprint to 2018-05-09 Sprint
Updated by Tom Morris over 6 years ago
- Assigned To deleted (
Peter Amstutz) - Target version changed from 2018-05-09 Sprint to Arvados Future Sprints
Updated by Tom Morris about 5 years ago
- Related to Bug #15672: List of subprocesses limited in process view added
Updated by Peter Amstutz almost 5 years ago
- Target version changed from Arvados Future Sprints to 2020-02-12 Sprint
Updated by Lucas Di Pentima almost 5 years ago
- Assigned To set to Lucas Di Pentima
Updated by Lucas Di Pentima almost 5 years ago
- Related to deleted (Feature #13327: More responsive page loads with API ?include=container_uuid)
Updated by Lucas Di Pentima almost 5 years ago
- Blocks Feature #13327: More responsive page loads with API ?include=container_uuid added
Updated by Lucas Di Pentima almost 5 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima almost 5 years ago
- Target version changed from 2020-02-12 Sprint to 2020-02-26 Sprint
Updated by Lucas Di Pentima almost 5 years ago
- Target version deleted (
2020-02-26 Sprint) - Status changed from In Progress to New
Updated by Lucas Di Pentima almost 5 years ago
- Assigned To deleted (
Lucas Di Pentima) - Category set to API
Updated by Stanislaw Adaszewski over 4 years ago
Again speaking privately here. This seems important. Workbenches are slow because of small API issues like this one. [uuid, in, [...]] filter to retrieve corresponding containers seems always a bit on the slow side. Thank you in advance.
Updated by Peter Amstutz over 1 year ago
- Release deleted (
60) - Story points deleted (
2.0) - Target version set to Future
- Subject changed from Users should be able to see if a container failed from the container_request method to Support ?include=container_uuid for container request lists and group contents
Updated by Peter Amstutz over 1 year ago
- Target version changed from Future to Development 2023-07-05 sprint
Updated by Peter Amstutz over 1 year ago
- Target version changed from Development 2023-07-05 sprint to Development 2023-07-19 sprint
Updated by Peter Amstutz over 1 year ago
- Target version changed from Development 2023-07-19 sprint to Development 2023-08-02 sprint
Updated by Peter Amstutz over 1 year ago
- Target version changed from Development 2023-08-02 sprint to Development 2023-08-16
Updated by Peter Amstutz over 1 year ago
- Target version changed from Development 2023-08-16 to Development 2023-08-30
Updated by Peter Amstutz over 1 year ago
- Target version changed from Development 2023-08-30 to Development 2023-09-13 sprint
Updated by Peter Amstutz over 1 year ago
- Target version changed from Development 2023-09-13 sprint to Development 2023-09-27 sprint
Updated by Peter Amstutz over 1 year ago
- Target version changed from Development 2023-09-27 sprint to To be scheduled
Updated by Peter Amstutz 10 months ago
- Target version changed from To be scheduled to Future
Updated by Peter Amstutz 9 months ago
- Target version changed from Future to Development 2024-04-24 sprint
Updated by Peter Amstutz 9 months ago
- Target version changed from Development 2024-04-24 sprint to Development 2024-05-08 sprint
Updated by Peter Amstutz 9 months ago
- Target version changed from Development 2024-05-08 sprint to Development 2024-04-24 sprint
Updated by Peter Amstutz 8 months ago
- Target version changed from Development 2024-04-24 sprint to Development 2024-05-08 sprint
Updated by Peter Amstutz 8 months ago
- Description updated (diff)
- Subject changed from Support ?include=container_uuid for container request lists and group contents to Support ?include=container for group contents
Updated by Peter Amstutz 8 months ago
- Target version changed from Development 2024-05-08 sprint to Development 2024-05-22 sprint
Updated by Tom Clegg 7 months ago
12917-group-contents-include-container @ 8a47094aa45b6352e71141c39f69c28c7f38b08c -- developer-run-tests: #4239
still needs documentation update.
Updated by Peter Amstutz 7 months ago
- Target version changed from Development 2024-05-22 sprint to Development 2024-06-05 sprint
Updated by Tom Clegg 7 months ago
12917-group-contents-include-container @ 9bda36e2c94aefc6cb05763e453ad4afdaa6199d -- developer-run-tests: #4243
- All agreed upon points are implemented / addressed.
include=container_uuid
works similarly toowner_uuid
include=["container_uuid","owner_uuid"]
allows including both owner and container
- Anything not implemented (discovered or discussed during work) has a follow-up story.
- I did not implement selecting fields like "containers.uuid". The description says this should work similarly to group contents, and it doesn't work for group contents. We could implement this, but I think it should be a separate story rather than blocking this one. For now, it works to select bare attributes --
"state"
selects thestate
attribute for object types that have one, and the field selection applies to both the mainitems
and theincluded
items.
- I did not implement selecting fields like "containers.uuid". The description says this should work similarly to group contents, and it doesn't work for group contents. We could implement this, but I think it should be a separate story rather than blocking this one. For now, it works to select bare attributes --
- Code is tested and passing, both automated and manual, what manual testing was done is described
- ✅ automated
- Documentation has been updated.
- ✅
- Behaves appropriately at the intended scale (describe intended scale).
- More efficient than getting the same information with multiple API calls.
- Considered backwards and forwards compatibility issues between client and server.
- If a controller is upgraded before its backend railsapi, then
?include=owner_uuid
requests will fail until railsapi is upgraded. The documented upgrade procedure upgrades both of those packages while arvados services are stopped, so this shouldn't come up.
- If a controller is upgraded before its backend railsapi, then
- Follows our coding standards and GUI style guidelines.
- ✅
Updated by Tom Clegg 7 months ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|9a8bcf923075e072dcde21795b03087affb63e6a.