Project

General

Profile

Actions

Idea #3150

closed

[API] Add "trash" behavior for all object types, instead of literal rdbms "delete"

Added by Tom Clegg almost 10 years ago. Updated about 7 years ago.

Status:
Rejected
Priority:
Normal
Assigned To:
-
Category:
Workbench
Target version:
-
Start date:
07/04/2014
Due date:
Story points:
2.0

Description

"Trash" button should make an object disappear from the current view, but it should be possible (ideally easy) to get it back.

API server behavior

Notes:
  • Jobs in particular, and probably all objects, should never be deleted outright during normal use -- just moved out of the way. (The exception is the underlying data blocks referenced by deleted collections.)
  • Add a "expires_at" flag to each model (just like collections have now).
    • Feature: an expired/deleted object's UUID cannot be reused by a different object.
  • By default, do not return rows with expires_at is not null and expires_at < CURRENT_TIMESTAMP
  • Trash lifetime is set in Rails.application.config.default_trash_lifetime (default: two weeks)
  • application controller method delete(optional_ts=nil) → set expires_at to optional_ts (if nil, use Time.now + Rails.application.config.default_trash_lifetime)
Permissions:
  • If I delete an object from a project that is shared with other users, other users can still read it by looking at the project's "trash" view
Trashing a project:
  • Recursive delete would be slow, and awkward to undo. (Which contents were already in the trash before the project was trashed?)
  • Skip trashed projects in site-wide search (like collections.index, and groups.contents with no group_uuid).
Workbench
  • Trash button → invoke DELETE method on API server
  • Empty trash → invoke /:object/:uuid/delete/{Time.now} on each object in the user's trash

SDK
The default SDK view should be to hide items in the trash, to make SDK results consistent with those seen in Workbench. But the user should be able to override this setting to view items in the trash.

Possible solution: a show_trash option (defaults to False) to the list, update, show and other methods.


Subtasks 1 (1 open0 closed)

Task #3192: Clarify requirements/implementationNewTom Clegg07/04/2014Actions

Related issues

Related to Arvados - Idea #3411: [API] Implement Trash behavior using collection expirationResolvedTim Pierce07/29/2014Actions
Related to Arvados - Bug #4182: [Workbench] [API] "Manage" permission should be sufficient to delete subprojectsClosed10/10/2014Actions
Related to Arvados - Bug #3688: [API] User should be able to delete a project even though dependent logs existClosed08/25/2014Actions
Related to Arvados - Bug #5010: [Workbench] Trash button on collections lists should set expires_at instead of moving to HomeResolvedTim Pierce01/23/2015Actions
Related to Arvados - Feature #5032: [Workbench] User can trash and un-trash itemsResolved01/20/2015Actions
Related to Arvados - Bug #5207: [API] Collection expires_at should be a full timestamp, not just a date.ResolvedTom Clegg03/12/2015Actions
Has duplicate Arvados - Bug #4409: [Workbench] Want to remove projects from HomeResolved11/04/2014Actions
Actions #1

Updated by Tom Clegg almost 10 years ago

  • Target version set to 2014-08-06 Sprint
Actions #2

Updated by Radhika Chippada almost 10 years ago

  • Subject changed from Specify "Trash" behavior and design implementation to [Workbench] Specify "Trash" behavior and design implementation
  • Category set to Workbench
Actions #3

Updated by Tom Clegg almost 10 years ago

  • Subject changed from [Workbench] Specify "Trash" behavior and design implementation to [Workbench] Improve "Trash" behavior in Workbench
It should be possible (and easy) to trash and then un-trash
  • collections
  • jobs, pipelines, etc.
  • projects with stuff in them
Certain things are not amenable to a true "delete" feature because of provenance features and content-addressable storage.
  • collections
  • jobs
Actions #4

Updated by Tom Clegg almost 10 years ago

  • Description updated (diff)
Actions #5

Updated by Tom Clegg almost 10 years ago

  • Target version changed from 2014-08-06 Sprint to Arvados Future Sprints
Actions #6

Updated by Tom Clegg over 9 years ago

  • Subject changed from [Workbench] Improve "Trash" behavior in Workbench to [API] Add "trash" behavior for all object types, in lieu of "delete"
Actions #7

Updated by Tom Clegg over 9 years ago

  • Subject changed from [API] Add "trash" behavior for all object types, in lieu of "delete" to [API] Add "trash" behavior for all object types, instead of literal rdbms "delete"
Actions #8

Updated by Tom Clegg over 9 years ago

  • Description updated (diff)
Actions #9

Updated by Tom Clegg over 9 years ago

  • Description updated (diff)
Actions #10

Updated by Tim Pierce over 9 years ago

  • Description updated (diff)
Actions #11

Updated by Tom Clegg about 7 years ago

  • Status changed from New to Rejected
Actions #12

Updated by Tom Clegg about 7 years ago

  • Target version deleted (Arvados Future Sprints)
Actions

Also available in: Atom PDF