Project

General

Profile

Actions

Story #3411

closed

[API] Implement Trash behavior using collection expiration

Added by Misha Zatsman over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Tim Pierce
Category:
-
Target version:
Start date:
07/29/2014
Due date:
% Done:

100%

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

Description

A collection can have two different kinds of permanence: ephemeral or persisted.

When a user creates a collection, they will need to specify which kind permanence they want.

Each collection has an expiration date but persisted collections have an expiration date of "never" or null or however it's easiest to represent.

There should be a systemwide setting for "ephemeral lifetime" and it should be set to two weeks by default. Changing this value to less than 24 hours should result in an error. The api server should return this value to callers when requested, because the data manager will need to know it before deleting blocks.

When a collection is created as ephemeral, its expiration date should be set to now + "ephemeral lifetime". Likewise, if a collection's permanence is switched from to ephemeral, its expiration date should be set to now + "ephemeral lifetime".

When the api server returns collections for any request, it should only return collections whose expiration date is in the future or never. The api server should support a flag in requests that will enable it to also return expired collections.

For more information on Ephemeral Collections, see:

https://arvados.org/projects/orvos-private/wiki/Keep_Design_Doc#Persisting-Data

Implementation notes

First branch:
  • API server collections table column: delete_at (default is null) expires_at column got added in #3036
  • API server configuration setting: default_trash_lifetime
  • API server discovery document entry: defaultTrashLifetime
  • API server implicitly selects expires_at is null or expires_at > now when querying collections table (rails "default scope" can do this)
Next branch [fell off sprint, moved to #3900]:
  • Workbench "trash" button on collections that sets expires_at to now + default_trash_lifetime (default retrieved in discovery document).
  • Workbench "trash" tab in project view that shows trashed collections (with "un-trash" button)

See also #3150


Subtasks 3 (0 open3 closed)

Task #3739: Add default_trash_lifetimeResolvedTim Pierce07/29/2014

Actions
Task #3741: API server filters for trashed objectsResolvedTim Pierce07/29/2014

Actions
Task #3883: Review 3411-expire-collectionsResolvedTom Clegg07/29/2014

Actions

Related issues 3 (0 open3 closed)

Related to Arvados - Feature #3900: [Workbench] Trash button on collection uses "delete" API instead of setting expires_at/trash_atResolvedLucas Di Pentima02/10/2017

Actions
Related to Arvados - Story #3150: [API] Add "trash" behavior for all object types, instead of literal rdbms "delete"Rejected07/04/2014

Actions
Blocks Arvados - Story #3408: [Keep] Implement Production Data ManagerResolvedPeter Amstutz07/29/2014

Actions
Actions

Also available in: Atom PDF