Project

General

Profile

Actions

Idea #14343

closed

Design for Group/Cluster favorites/library

Added by Tom Morris over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Documentation
Target version:
Story points:
1.0
Release relationship:
Auto

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 1 (0 open1 closed)

Task #14545: Review https://dev.arvados.org/projects/arvados/wiki/Cluster-wide_favoritesResolvedPeter Amstutz12/06/2018Actions
Actions #1

Updated by Tom Morris over 5 years ago

  • Description updated (diff)
Actions #2

Updated by Lucas Di Pentima over 5 years ago

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

Updated by Tom Morris over 5 years ago

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

Updated by Tom Morris over 5 years ago

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

Updated by Peter Amstutz over 5 years ago

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

Updated by Tom Morris over 5 years ago

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

Actions #7

Updated by Peter Amstutz over 5 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))
Actions #8

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

Actions #9

Updated by Peter Amstutz over 5 years ago

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

Updated by Tom Clegg over 5 years ago

  • Description updated (diff)
Actions #11

Updated by Tom Morris over 5 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).

Actions #13

Updated by Lucas Di Pentima over 5 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.

Actions #14

Updated by Peter Amstutz over 5 years ago

  • Status changed from New to Resolved
Actions #15

Updated by Tom Morris about 5 years ago

  • Release set to 15
Actions

Also available in: Atom PDF