-
Notifications
You must be signed in to change notification settings - Fork 124
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
As an administrator I want to set prune policy based on datetime #2909
Comments
this is rpm plugin specific, moving |
This actually belongs in pulpcore, that's where retain_versions lives now. Discussion from triage 6-DEC: ggainey: retain_repo_versions is a base-repository-attr, feels like this should be as well? |
@ggainey I think it belongs on the rpm plugin moreso, if the aim is to have a workflow similar to what they currently have. The ask here is effectively to remove packages based on date, and have those packages be cleaned up to get back their space savings. If you just set the repository version limit to 1 (latest only) then you get something more or less equivalent to using createrepo tools on disk, but the pruning functionality would still be missing, and that aspect probably has to be implemented in the plugin. Moreover we also need to consider the implications of how this would overlap with the existing retain package count functionality. Keeping versions by date is also a potentially useful feature independently, but I'm not sure it's necessary or directly relevant to what COPR is asking for. |
Comments from matrix where @dralley unconfused me: ggainey: I have no idea - I thought I knew what was being asked for here, but now I think I don't dralley: that's what I thought the ask was, but I could be wrong ggainey: can you add this discussion to the issue then? because it (I think) makes things clearer TL;DR: this is a pulp_rpm feature. |
@xsuchy @ipanova Can you confirm or clarify this? From the COPR docs:
I read this as "we keeping multiple versions of RPMs in the repo (but only one build per version), and after 14 days those older versions are pruned by regenerating the repo and deleting the old RPMs, so Or, is it the case that only one version of any RPM is kept in the repo at any given time, |
Correct.
We have implemented this logic now. But we can easily live with the former one. Users of Copr are mostly developers and CI systems. I believe they actually do not need the ability to downgrade. But they want to be able to download the build and build artifacts (like logs) and compare it to different version-releases. |
For a general use of Pulp, particularly in non-COPR deployments, having the ability for an admin to configure allowing downgrades is useful. @dralley's interpretation would be useful in a generic sense for Pulp. |
The way @dralley interprets this is exactly how Copr pruner works now, and it is definitely a better option. |
Got some clarification from @praiskup today:
It was decided against the setting on each repo(similar to retain_package_versions we already have) because the hook will be called at the finalize_new_version meaning that it will be called everytime when a new package will be uploaded. |
See discussion notes from 2023-10-26 rpm team mtg here : https://hackmd.io/@pulp/rpm_meeting#October-26 |
Do I read it correctly that you want to run prune tasks as a trigger after each task? That would be a performance problem. In Copr we have a project that builds thousands builds per day. Occasionally, ten thousand per day. Times architecture and platform. Calling the prune task thousands of times per day per one repository would be a huge waste of energy. It is sufficient if the running task runs once per day. |
No, altho that was mentioned in an early part of the discussion. @ipanova 's summary in #2909 (comment) is the current proposal, which matches yours precisely. The hackmd link was added just to keep all the notes/discussion easily find-able. |
I, as an administrator, want to specify that if the repository has more builds of the same name, then I want to delete versions older than X days.
The Copr team is considering using Pulp as a backend repository. This is one of the few missing features in Pulp.
In Copr (Fedora's build system) we produce 500-1000 GB of build daily. It can quickly consume all available storage. Therefore we implemented a pruning policy
https://docs.pagure.org/copr.copr/user_documentation.html#how-long-do-you-keep-the-builds
For this, we use the tool
prunerepo
that we created https://pagure.io/prunerepo/tree/mainand additional logic in our backend:
It is nice when the quota of X days can be configured by the admin.
The text was updated successfully, but these errors were encountered: