-
Notifications
You must be signed in to change notification settings - Fork 116
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
Limit how many repo versions Pulp retains #1204
Conversation
Attached issue: https://pulp.plan.io/issues/8368 |
c8164f3
to
c886bcc
Compare
@daviddavis since repo version 0 is special, we should always keep it and maybe exclude from the version count to keep, meaning if the user has set retain_versions=1 we will keep latest and 0. thoughts? |
@ipanova currently I am waiting on the outcome of https://pulp.plan.io/issues/8454. |
oh ok, i missed this one |
ebcc3ba
to
d712380
Compare
Code looks good. |
I'll add a test to cover the case of auto-publish/auto-distribute with |
788a68e
to
0c7d009
Compare
retained_versions = serializers.IntegerField( | ||
help_text=_( | ||
"Retain X versions of the repository. Default is null which retains all versions." | ||
" This is provided as a tech preview in Pulp 3 and may change in the future." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add this feature in the docs that it is in 'tech preview'?
Not sure which place would be the best https://docs.pulpproject.org/pulpcore/concepts.html or https://docs.pulpproject.org/pulpcore/plugins/plugin-writer/concepts/tasks/add-remove.html?highlight=repository%20version#repository-versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another idea would be a create a new workflow for repo versions where we could how to trigger it and when it gets triggered, specifically to clarify that versions are getting cleaned up even on the repo update call.
self.assertEqual(len(versions), 2) | ||
self.assertEqual(self.repo.latest_version_href.split("/")[-2], "3") | ||
|
||
def test_autodistribute(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I decided to go with some workflow docs, which means I need to update the CLI. Setting this back to draft while I do that. |
fixes #8368
fixes #8368
Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/contributing/pull-request-walkthrough.html