Project

General

Profile

Actions

Feature #18621

open

Ability for admin to purge old versions of a collection

Added by Peter Amstutz almost 3 years ago. Updated 19 days ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
Story points:
-

Description

Deleting past versions should leave a record in the audit trail.

Would like to be able to provide a filter that describes past versions that should be pruned.

I think the interface would end up being very similar to the bulk trash API (#20972), where it deletes a page of things at a time.

This would probably have a distinct endpoint as the behavior will be a bit different.

There's a couple ways to approach this: one would be to set trash_at and delete_at on the past versions and have the normal cleanup process actually delete the rows. The main issue is that when certain changes happen on the head version, it updates trash_at and delete_at in all the past versions in sync_past_versions. So we would need to decide what we want the behavior to be in that situation.

The other option is to just delete the rows immediately.

From discussion:

  • admin only
  • Purges up to limit items (one request page at a time) and returns the items that were deleted as a list result
    • manifest_text is excluded from result unless "select" is used
    • supports "limit" and "order" (just like a list request)
    • should support a "dry_run" option that returns the list of things that would be purged without actually purging them
  • Row are deleted immediately
  • Adds a "delete event" to the logs table for each row that is deleted

Detailed design

endpoint: /arvados/v1/collections/purge

User accessing the endpoint must be admin, otherwise returns 403.

Methods

purge

HTTP POST with query parameters (in the URL or body, as supported by every other endpoint).

All other methods (GET etc) are not supported. Any paths under the endpoint return 404.

POST with no parameters yields an error.

Argument Type Description
limit integer optional, same as other API methods
offset integer optional, same as other API methods
order array optional, same as other API methods
select array optional, same as other API methods
count string optional, same as other API methods
filters array required, same as other API methods
dry_run boolean optional, if true, returns the items that would be purged but don't actually delete them
  • Only matches collections where uuid != current_version_uuid in addition to filters
  • Purges and returns up to "limit" items, only items returned are actually purged, unless dry_run is true
    • manifest_text is excluded from result unless "select" is used
  • Row are deleted immediately
  • Adds a "delete event" to the logs table for each row that is deleted
  • Returns collection objects that were purged in "items" same as other list APIs, these are deleted from the collections table entirely and won't be returned again, unless dry_run is true
  • Can use count=exact and dry_run=true to see how many items would be purged without actually purging them.

Related issues 1 (1 open0 closed)

Related to Arvados - Feature #20972: Bulk trash APINewActions
Actions #2

Updated by Peter Amstutz almost 2 years ago

  • Release set to 60
Actions #3

Updated by Peter Amstutz 11 months ago

  • Release deleted (60)
  • Target version set to Future
Actions #4

Updated by Peter Amstutz 11 months ago

  • Description updated (diff)
Actions #5

Updated by Peter Amstutz 11 months ago

  • Description updated (diff)
Actions #6

Updated by Peter Amstutz 11 months ago

Actions #7

Updated by Peter Amstutz 11 months ago

  • Description updated (diff)
Actions #8

Updated by Peter Amstutz 11 months ago

  • Target version changed from Future to Development 2024-02-28 sprint
  • Description updated (diff)
Actions #9

Updated by Peter Amstutz 10 months ago

  • Target version changed from Development 2024-02-28 sprint to Development 2024-03-13 sprint
Actions #10

Updated by Peter Amstutz 10 months ago

  • Target version changed from Development 2024-03-13 sprint to Development 2024-03-27 sprint
Actions #11

Updated by Peter Amstutz 9 months ago

  • Target version changed from Development 2024-03-27 sprint to Development 2024-04-10 sprint
Actions #12

Updated by Peter Amstutz 9 months ago

  • Target version changed from Development 2024-04-10 sprint to Development 2024-04-24 sprint
Actions #13

Updated by Peter Amstutz 9 months ago

  • Target version changed from Development 2024-04-24 sprint to Development 2024-05-08 sprint
Actions #14

Updated by Peter Amstutz 9 months ago

  • Target version changed from Development 2024-05-08 sprint to Development 2024-06-05 sprint
Actions #15

Updated by Peter Amstutz 8 months ago

  • Target version changed from Development 2024-06-05 sprint to Development 2024-05-08 sprint
Actions #16

Updated by Peter Amstutz 8 months ago

  • Description updated (diff)
Actions #17

Updated by Peter Amstutz 8 months ago

  • Description updated (diff)
Actions #18

Updated by Peter Amstutz 8 months ago

  • Target version changed from Development 2024-05-08 sprint to Development 2024-05-22 sprint
Actions #19

Updated by Peter Amstutz 8 months ago

  • Release set to 70
Actions #20

Updated by Peter Amstutz 8 months ago

  • Target version changed from Development 2024-05-22 sprint to Development 2024-06-05 sprint
Actions #21

Updated by Peter Amstutz 7 months ago

  • Target version changed from Development 2024-06-05 sprint to 439
Actions #22

Updated by Peter Amstutz 7 months ago

  • Target version changed from 439 to Development 2024-06-19 sprint
Actions #23

Updated by Peter Amstutz 7 months ago

  • Target version changed from Development 2024-06-19 sprint to Development 2024-07-03 sprint
Actions #24

Updated by Peter Amstutz 6 months ago

  • Target version changed from Development 2024-07-03 sprint to Development 2024-07-24 sprint
Actions #25

Updated by Peter Amstutz 6 months ago

  • Target version changed from Development 2024-07-24 sprint to Development 2024-08-28 sprint
Actions #26

Updated by Peter Amstutz 6 months ago

  • Release deleted (70)
Actions #27

Updated by Peter Amstutz 5 months ago

  • Target version changed from Development 2024-08-28 sprint to Development 2024-09-25 sprint
Actions #28

Updated by Peter Amstutz 4 months ago

  • Target version changed from Development 2024-09-25 sprint to Development 2024-10-09 sprint
Actions #29

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-10-09 sprint to Development 2024-10-23 sprint
Actions #30

Updated by Peter Amstutz 3 months ago

  • Target version changed from Development 2024-10-23 sprint to Development 2024-11-06 sprint
Actions #31

Updated by Peter Amstutz about 2 months ago

  • Target version changed from Development 2024-11-06 sprint to Development 2024-11-20
Actions #32

Updated by Peter Amstutz about 2 months ago

  • Target version changed from Development 2024-11-20 to Development 2024-12-04
Actions #33

Updated by Peter Amstutz about 1 month ago

  • Target version changed from Development 2024-12-04 to Development 2025-01-08
Actions #34

Updated by Peter Amstutz 19 days ago

  • Target version changed from Development 2025-01-08 to Future
Actions

Also available in: Atom PDF