Story #14343
closedDesign for Group/Cluster favorites/library
100%
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
Updated by Lucas Di Pentima about 6 years ago
- Description updated (diff)
- Category set to Documentation
- Story points set to 1.0
Updated by Tom Morris about 6 years ago
- Target version changed from To Be Groomed to 2018-11-14 Sprint
Updated by Tom Morris about 6 years ago
- Target version changed from 2018-11-14 Sprint to 2018-11-28 Sprint
Updated by Peter Amstutz about 6 years ago
- Assigned To set to Peter Amstutz
- Target version changed from 2018-11-28 Sprint to 2018-12-12 Sprint
Updated by Tom Morris about 6 years ago
Test to make sure it works as well as documenting it.
Updated by Peter Amstutz about 6 years 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))
Updated by Peter Amstutz about 6 years 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.
Updated by Peter Amstutz about 6 years ago
- Subject changed from Group/Cluster favorites/library to Design for Group/Cluster favorites/library
Updated by Tom Morris about 6 years 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).
Updated by Lucas Di Pentima about 6 years 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.