Story #3411
Updated by Tom Clegg over 10 years ago
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
* API server collections table column: @delete_at@ (default is null)
* API server configuration setting: @default_ephemeral_collection_lifetime@
* API server discovery document entry: @default_ephemeral_collection_lifetime@
* API server implicitly selects @delete_at is null or delete_at > now@ when querying collections table (rails "default scope" can do this)
* Workbench "trash" button on collections that sets @delete_at@ to @now + default_ephemeral_collection_lifetime@ (default retrieved in discovery document).
* Workbench "trash" tab in project view that shows ephemeral collections (with "un-trash" button)
See also #3150