Project

Profile

Help

Story #5975

As a user I can set 'history' on any repository type

Added by dkliban@redhat.com 5 months ago.

Status:
NEW
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

Users should be able to limit how many old repository versions are kept.

pulpcore can provide this feature by adding a 'history' field to the Repository model. The default value should be 0 - keep all repository versions. The RepositoryVersion context manager can then remove old version after calling finalize_new_version()[0]. Two use cases should be covered:

User set history before a repository has reached the value of history.
User set history after a repository has reach the value of history.

In both cases the next time a new repository version is created, only the history number (or less) of repository versions remains.

[0] https://github.com/pulp/pulpcore/blob/da3a395efdfd9906b7761ea228d82cf43d6b7cbf/pulpcore/app/models/repository.py#L717

Please register to edit this issue

Also available in: Atom PDF