Story #8368
closed
Limit number of old repository versions.
Status:
CLOSED - CURRENTRELEASE
Description
As an application maintainer, I would like to be able to specify how many old versions of a repository to keep in order to keep the size of my database from growing out of control.
I would like to be able to:
- specify a default number of repo versions to keep for a specific repository type.
- ex: allow me to keep that last 200 versions for all AnsibleRepository types and keep all versions for all ContainerRepository types
- override the default number of repo versions to keep on a repo by repo basis.
- ex: allow me to specify that repo
staging
should keep all versions and repo rejected
should keep the last 5 repo versions
I hear, there cold be a int-field on repository to specify the number of retained versions. And the context manager that creates versions could clean up in its __exit__
method.
The question i see if there would be a way to mark precious versions that should not be deleted.
What do we do with versions that are linked to a publication / distribution?
- Tracker changed from Issue to Story
- % Done set to 0
- Severity deleted (
2. Medium)
- Triaged deleted (
No)
Will updating the setting/field automatically clean up repo versions? Like if I set the value to 3 and I have 5 versions, does that automatically delete 2 versions?
daviddavis wrote:
Will updating the setting/field automatically clean up repo versions? Like if I set the value to 3 and I have 5 versions, does that automatically delete 2 versions?
My take was no, but it's important we figure out what we want in the long term because it affects if we have to use the tasking system or not for any change to this. The openapi schema already reports that tasking isn't used, so I'm thinking that maybe we can't have some repsonses return 200 and others returned 202? I'm not clear on if that's a problem for openapi or not. Do you know?
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
- Status changed from ASSIGNED to POST
- Blocked by Story #8454: As a user, I can't delete RepositoryVersion.number==0 added
- Sprint/Milestone set to 3.12.0
- Sprint/Milestone changed from 3.12.0 to 3.13.0
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
- Related to Issue #8793: Retained_versions doesn't properly keep all content present in repository added
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Sprint/Milestone changed from 3.13.0 to Content/disk space management
- Sprint/Milestone changed from Content/disk space management to 3.13.0
Also available in: Atom
PDF
Limit how many repo versions Pulp retains
fixes #8368