Story #3150

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

Added by Tom Clegg almost 5 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
Normal
Assigned To:
-
Category:
Workbench
Target version:
-
Start date:
07/04/2014
Due date:
% Done:

0%

Estimated time:
(Total: 8.00 h)
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

Task #3192: Clarify requirements/implementationNewTom Clegg


Related issues

Related to Arvados - Story #3411: [API] Implement Trash behavior using collection expirationResolved07/29/2014

Related to Arvados - Bug #4182: [Workbench] [API] "Manage" permission should be sufficient to delete subprojectsNew10/10/2014

Related to Arvados - Bug #3688: [API] User should be able to delete a project even though dependent logs existClosed08/25/2014

Related to Arvados - Bug #5010: [Workbench] Trash button on collections lists should set expires_at instead of moving to HomeResolved01/23/2015

Related to Arvados - Feature #5032: [Workbench] User can trash and un-trash itemsResolved01/20/2015

Related to Arvados - Bug #5207: [API] Collection expires_at should be a full timestamp, not just a date.Resolved03/12/2015

Has duplicate Arvados - Bug #4409: [Workbench] Want to remove projects from HomeNew11/04/2014

History

#1 Updated by Tom Clegg almost 5 years ago

  • Target version set to 2014-08-06 Sprint

#2 Updated by Radhika Chippada almost 5 years ago

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

#3 Updated by Tom Clegg almost 5 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

#4 Updated by Tom Clegg almost 5 years ago

  • Description updated (diff)

#5 Updated by Tom Clegg almost 5 years ago

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

#6 Updated by Tom Clegg over 4 years ago

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

#7 Updated by Tom Clegg over 4 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"

#8 Updated by Tom Clegg over 4 years ago

  • Description updated (diff)

#9 Updated by Tom Clegg over 4 years ago

  • Description updated (diff)

#10 Updated by Tim Pierce over 4 years ago

  • Description updated (diff)

#11 Updated by Tom Clegg over 2 years ago

  • Status changed from New to Rejected

#12 Updated by Tom Clegg over 2 years ago

  • Target version deleted (Arvados Future Sprints)

Also available in: Atom PDF