Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete projects deactivated over retention period #1600

Open
2 tasks done
sahibamittal opened this issue Nov 27, 2024 · 4 comments
Open
2 tasks done

Delete projects deactivated over retention period #1600

sahibamittal opened this issue Nov 27, 2024 · 4 comments
Assignees
Labels
component/api-server component/frontend enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort

Comments

@sahibamittal
Copy link
Collaborator

Current Behavior

Inactive projects which are no longer in use are retained in DT and take up unnecessary space in DB.

Proposed Behavior

Create a scheduled task to monitor the inactive projects.
If a project is deactivated for longer than the retention period, delete it.
Retention period can be set as env variable and can be modified in UI under administration.

Checklist

@sahibamittal sahibamittal added enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk component/api-server labels Nov 27, 2024
@sahibamittal sahibamittal self-assigned this Nov 27, 2024
@sahibamittal
Copy link
Collaborator Author

sahibamittal commented Nov 27, 2024

TBD: Should we keep at least 2 versions of projects irrespective of their status (active/inactive)?
@nscuro @VithikaS

@nscuro
Copy link
Member

nscuro commented Nov 27, 2024

What's the use case for keeping projects despite them being inactive and eligible for deletion as per retention policy?

@sahibamittal
Copy link
Collaborator Author

sahibamittal commented Dec 6, 2024

Per discussion so far, retention policy should be based on either of two options below :

  1. Age : Delete inactive projects if they're older than retention period of time.
  2. Cadence : Keep 'x' number of inactive versions and delete the rest.

User can select either one of them and configure accordingly.

@sahibamittal
Copy link
Collaborator Author

  1. Switch boolean project.active flag to inactiveSince timestamp
  2. Introduce retention policy that wipes projects inactive for >= 30 days per default
  3. Make retention policy configurable (via UI)
  4. Allow keep last X inactive versions “escape valve”
    1. “last X versions” is also based on inactiveSince, since we can’t reliably determine this by comparing version strings
    2. “last X versions” are kept despite being outside the retention duration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api-server component/frontend enhancement New feature or request p2 Non-critical bugs, and features that help organizations to identify and reduce risk size/M Medium effort
Projects
None yet
Development

No branches or pull requests

2 participants