Pruning policy

Miroslav Suchý msuchy at redhat.com
Thu Oct 3 10:50:23 UTC 2013


On 09/26/2013 11:06 PM, Miroslav Suchy wrote:
> Hi,
> right now COPR keeps all builds. This is not sustainable. Especially right now, when we lack of disk space.
>
> So we need to have some policy for removing old builds.
>
> What we have on input are:
>   * successful builds
>   * failed builds
>   * builds which succeed in one chroot, but fail in another chroot
>
> Variables for equation are:
>   * date of the build
>   * is it last build?
>   * is it last successful build?
>
> Where we will draw the line? I would suggest:
>
> * Keep everything which was built between NOW() and X days ago.
>    We can tune up X when we will see how fast we consume disk space. In ideal world I would imagine X as 14 days. But I
> can imagine that even one day would be enough.
>
> * If build is older, keep that build only if it is last successful build in chroot.
>
> * anything else is going to be deleted. Question: should we keep logs?
>


I implemented this ^^^ as command "copr-prune-repo" and set it as cronjob.

I ran it on current copr-be and it removed 12 GB out of 20 GB.

-- 
Miroslav Suchy, RHCE, RHCDS
Red Hat, Software Engineer, #brno, #devexp, #fedora-buildsys


More information about the copr-devel mailing list