Project

General

Profile

Actions

Feature #12917

closed

Support ?include=container_uuid for group contents

Added by Bryan Cosca over 6 years ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Story points:
-

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"])


Subtasks 1 (0 open1 closed)

Task #13355: Review 12917-group-contents-include-containerResolvedStephen Smith05/24/2024Actions

Related issues

Related to Arvados Workbench 2 - Bug #15672: List of subprocesses limited in process viewResolvedLucas Di PentimaActions
Has duplicate Arvados - Idea #13145: Include container status & exit code in container request responseDuplicateActions
Blocks Arvados - Feature #13327: More responsive page loads with API ?include=container_uuidNewActions
Actions #2

Updated by Tom Morris over 6 years ago

  • Target version set to To Be Groomed
Actions #3

Updated by Peter Amstutz over 6 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.

Actions #4

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
Actions #5

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".

Actions #6

Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)
Actions #7

Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)
Actions #9

Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)
Actions #10

Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)
Actions #11

Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)
Actions #12

Updated by Tom Morris over 6 years ago

  • Related to Feature #13327: More responsive page loads with API ?include=container_uuid added
Actions #13

Updated by Peter Amstutz over 6 years ago

  • Description updated (diff)
  • Story points set to 2.0
Actions #14

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.

Actions #15

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']...?

Actions #16

Updated by Tom Morris over 6 years ago

  • Target version changed from To Be Groomed to 2018-04-25 Sprint
Actions #17

Updated by Tom Morris over 6 years ago

  • Assigned To set to Peter Amstutz
Actions #18

Updated by Peter Amstutz over 6 years ago

  • Has duplicate Idea #13145: Include container status & exit code in container request response added
Actions #20

Updated by Peter Amstutz about 6 years ago

  • Target version changed from 2018-04-25 Sprint to 2018-05-09 Sprint
Actions #21

Updated by Tom Morris about 6 years ago

  • Assigned To deleted (Peter Amstutz)
  • Target version changed from 2018-05-09 Sprint to Arvados Future Sprints
Actions #22

Updated by Tom Morris over 4 years ago

  • Related to Bug #15672: List of subprocesses limited in process view added
Actions #23

Updated by Peter Amstutz over 4 years ago

  • Target version changed from Arvados Future Sprints to 2020-02-12 Sprint
Actions #24

Updated by Lucas Di Pentima over 4 years ago

  • Assigned To set to Lucas Di Pentima
Actions #25

Updated by Lucas Di Pentima over 4 years ago

  • Description updated (diff)
Actions #26

Updated by Lucas Di Pentima over 4 years ago

  • Related to deleted (Feature #13327: More responsive page loads with API ?include=container_uuid)
Actions #27

Updated by Lucas Di Pentima over 4 years ago

  • Blocks Feature #13327: More responsive page loads with API ?include=container_uuid added
Actions #28

Updated by Lucas Di Pentima over 4 years ago

  • Status changed from New to In Progress
Actions #30

Updated by Lucas Di Pentima over 4 years ago

  • Target version changed from 2020-02-12 Sprint to 2020-02-26 Sprint
Actions #31

Updated by Lucas Di Pentima over 4 years ago

  • Target version deleted (2020-02-26 Sprint)
  • Status changed from In Progress to New
Actions #32

Updated by Lucas Di Pentima over 4 years ago

  • Assigned To deleted (Lucas Di Pentima)
  • Category set to API
Actions #33

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.

Actions #34

Updated by Peter Amstutz over 1 year ago

  • Release set to 60
Actions #35

Updated by Peter Amstutz about 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
Actions #37

Updated by Peter Amstutz about 1 year ago

  • Target version changed from Future to Development 2023-07-05 sprint
Actions #38

Updated by Peter Amstutz about 1 year ago

  • Assigned To set to Tom Clegg
Actions #39

Updated by Peter Amstutz about 1 year ago

  • Target version changed from Development 2023-07-05 sprint to Development 2023-07-19 sprint
Actions #40

Updated by Peter Amstutz about 1 year ago

  • Target version changed from Development 2023-07-19 sprint to Development 2023-08-02 sprint
Actions #41

Updated by Peter Amstutz about 1 year ago

  • Target version changed from Development 2023-08-02 sprint to Development 2023-08-16
Actions #42

Updated by Peter Amstutz 12 months ago

  • Target version changed from Development 2023-08-16 to Development 2023-08-30
Actions #43

Updated by Peter Amstutz 11 months ago

  • Target version changed from Development 2023-08-30 to Development 2023-09-13 sprint
Actions #44

Updated by Peter Amstutz 11 months ago

  • Target version changed from Development 2023-09-13 sprint to Development 2023-09-27 sprint
Actions #45

Updated by Peter Amstutz 10 months ago

  • Target version changed from Development 2023-09-27 sprint to To be scheduled
Actions #46

Updated by Peter Amstutz 5 months ago

  • Tracker changed from Idea to Feature
Actions #47

Updated by Peter Amstutz 5 months ago

  • Target version changed from To be scheduled to Future
Actions #48

Updated by Peter Amstutz 4 months ago

  • Target version changed from Future to Development 2024-04-24 sprint
Actions #49

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-04-24 sprint to Development 2024-05-08 sprint
Actions #50

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-05-08 sprint to Development 2024-04-24 sprint
Actions #51

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-04-24 sprint to Development 2024-05-08 sprint
Actions #52

Updated by Peter Amstutz 3 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
Actions #53

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-05-08 sprint to Development 2024-05-22 sprint
Actions #54

Updated by Tom Clegg 2 months ago

  • Status changed from New to In Progress
  • Subject changed from Support ?include=container for group contents to Support ?include=container_uuid for group contents
Actions #55

Updated by Tom Clegg 2 months ago

12917-group-contents-include-container @ 8a47094aa45b6352e71141c39f69c28c7f38b08c -- developer-run-tests: #4239

still needs documentation update.

Actions #56

Updated by Peter Amstutz 2 months ago

  • Target version changed from Development 2024-05-22 sprint to Development 2024-06-05 sprint
Actions #57

Updated by Tom Clegg 2 months ago

12917-group-contents-include-container @ 9bda36e2c94aefc6cb05763e453ad4afdaa6199d -- developer-run-tests: #4243

  • All agreed upon points are implemented / addressed.
    • include=container_uuid works similarly to owner_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 the state attribute for object types that have one, and the field selection applies to both the main items and the included items.
  • 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.
  • Follows our coding standards and GUI style guidelines.
Actions #58

Updated by Stephen Smith about 2 months ago

This lgtm!

Actions #59

Updated by Tom Clegg about 2 months ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF