Story #14343

Design for Group/Cluster favorites/library

Added by Tom Morris 2 months ago. Updated 4 days ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Documentation
Target version:
Start date:
12/06/2018
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

Description

Write a wiki page documenting on how to implement public favorite projects listings using the existing APIs after first verifying that this will actually work.

The proposed implementation includes using 'star' class links with owner_uuid being the 'all users' group's UUID ({prefix}-j7d0g-fffffffffffffff). This will be managed by admin users (and only admins), but should be queryable by any user.

Provide examples using the arv tool or curl for creating/listing favorites which can be used as templates for the Javascript programmers implementing Workbench 2.

As a starting point, here are the calls that they are using for the existing per-user favorites which can be updated to show how they'd work for the system-wide favorites:

Create - POST to https://c97qk.arvadosapi.com/arvados/v1/links/ with body of

href: "/links/c97qk-o0j2j-qbcemd2n5ze7ac8", kind: "arvados#link", etag: "a1x2k55z2q6ssqacdkw9v2m64",…}
created_at: "2018-12-06T19:10:18.927990983Z"
etag: "a1x2k55z2q6ssqacdkw9v2m64"
head_kind: "arvados#group"
head_uuid: "c97qk-j7d0g-3tw2wchv9k86rnh"
href: "/links/c97qk-o0j2j-qbcemd2n5ze7ac8"
kind: "arvados#link"
link_class: "star"
modified_at: "2018-12-06T19:10:18.928343000Z"
modified_by_client_uuid: "c97qk-ozdt8-2bnm5ya20rzs78u"
modified_by_user_uuid: "c97qk-tpzed-4gq939sjwtbvwd7"
name: "Top"
owner_uuid: "c97qk-tpzed-4gq939sjwtbvwd7"
properties: {}
tail_kind: "arvados#user"
tail_uuid: "c97qk-tpzed-4gq939sjwtbvwd7"
uuid: "c97qk-o0j2j-qbcemd2n5ze7ac8"
}

Listing - GET of %22head_uuid%22,%22is_a%22,[%22arvados%23group%22,%22arvados%23containerRequest%22,%22arvados%23collection%22,[%22tail_uuid%22,%22%3D%22,%22c97qk-tpzed-4gq939sjwtbvwd7%22],[%22link_class%22,%22%3D%22,%22star%22]]&order=name+asc">https://c97qk.arvadosapi.com/arvados/v1/links/?limit=10&offset=0&filters=%22head_uuid%22,%22is_a%22,[%22arvados%23group%22,%22arvados%23containerRequest%22,%22arvados%23collection%22,[%22tail_uuid%22,%22%3D%22,%22c97qk-tpzed-4gq939sjwtbvwd7%22],[%22link_class%22,%22%3D%22,%22star%22]]&order=name+asc


Subtasks

Task #14545: Review https://dev.arvados.org/projects/arvados/wiki/Cluster-wide_favoritesResolvedPeter Amstutz

History

#1 Updated by Tom Morris about 2 months ago

  • Description updated (diff)

#2 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)
  • Category set to Documentation
  • Story points set to 1.0

#3 Updated by Tom Morris about 2 months ago

  • Target version changed from To Be Groomed to 2018-11-14 Sprint

#4 Updated by Tom Morris about 2 months ago

  • Target version changed from 2018-11-14 Sprint to 2018-11-28 Sprint

#5 Updated by Peter Amstutz 18 days ago

  • Assigned To set to Peter Amstutz
  • Target version changed from 2018-11-28 Sprint to 2018-12-12 Sprint

#6 Updated by Tom Morris 18 days ago

Test to make sure it works as well as documenting it.

#7 Updated by Peter Amstutz 10 days ago

So, it turns out this won't work without modifying workbench, because 'star' links reference the current user.

    links = Link.filter([['tail_uuid', '=', user.uuid],
                         ['link_class', '=', 'star'],
                         ['head_uuid', 'is_a', 'arvados#group']]).select(%w(head_uuid))

#8 Updated by Peter Amstutz 10 days ago

We could change workbench so it searches for both [user uuid, all users group] but then it is no longer just a documentation story.

#9 Updated by Peter Amstutz 10 days ago

  • Subject changed from Group/Cluster favorites/library to Design for Group/Cluster favorites/library

#10 Updated by Tom Clegg 10 days ago

  • Description updated (diff)

#11 Updated by Tom Morris 9 days ago

  • Description updated (diff)

I've updated the story to clarify it and include examples of the current HTTP calls that can be modified to show how they'd work for system-wide favorites.

If a quick test demonstrates that this won't work, then we'll regroup and figure out what to do next (abandoning this story).

#13 Updated by Lucas Di Pentima 9 days ago

Looks good to me. The only addition I would add is to explicitly mention that for creation cluster-wide favorites, the c97qk-j7d0g-fffffffffffffff project corresponds to "All Users" group, as it may not be obvious to some readers.

#14 Updated by Peter Amstutz 4 days ago

  • Status changed from New to Resolved

Also available in: Atom PDF