Story #8313
Updated by ipanova@redhat.com over 3 years ago
### Problem statement
1. There is no way to free some disc space because we do not allow repo versions removal from push repos. Deleting entire repo is not a viable option.
2. There is no way to delete certain repo versions if there is no longer need to keep them.
(Note: Orphan clean up is still expected to be run in order to remove artifacts from the fs.)
### Solution
1. Enable DELETE on the push repo versions endpoint and allow removal of any versions except the latest one.
* might bring complexity in the logic. Add validation on the distribution update call to disallow repo_version update
* change in access policy
2. After each push operation remove all repo versions except the latest one. As a result each push operation will always result into one version.
* this approach will close forever the door for us for adding 'rollback' capabilities for push repos
* this behaviour might be considered as unwanted/confusing. Other operations like tag/untag/manifest removal will still produce a new version and will not clean up previous ones ( behaviour discrepancy)
3. Leave this to pulpcore which will introduce retain N repo-version option. For pulp container push repos by default there will retained only 1 version https://pulp.plan.io/issues/8368