Skip to content

GC or Recovery of deleted entities #604

Description

@htdvisser

Summary

Some entities in the IS are soft-delete. We want to be able to clean them up (and release their IDs) or recover them.

Why do we need this?

Sometimes entities are deleted by accident, in which case we want to restore them. After a cooldown period we want to be able to re-register new entities with the same IDs.

What is already there? What do you see now?

On delete, entities are marked with a deleted_at

What is missing? What do you want to see?

  • It should be possible to search for or to list entities that have been deleted
  • It should be possible to recover deleted entities
  • Deleted entities should be permanently deleted after a cooldown period

How do you propose to implement this?

  • In ListXXX/GetXXX requests we could add a bool include_deleted
  • For restoring deleted entities we can...
    • restore deleted entities on Get/Update
    • restore deleted entities with a new API call
  • For cleaning up deleted entities we can...
    • add a background process to the IS that periodically GCs deleted entities
    • add an API endpoint for GCing deleted entities, which can be called from a cron job.

Can you do this yourself and submit a Pull Request?

Sure

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions