fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
115 stars 61 forks source link

prunerepo doesn't clean projects where automatic createrepo is disabled #579

Open fedora-copr-github-bot opened 1 year ago

fedora-copr-github-bot commented 1 year ago

Original issue: https://pagure.io/copr/copr/issue/579 Opened: 2019-03-15 12:30:16 Opened by: praiskup

Per code:

    def prune_project(self, project_path, username, projectdir):
        [...]
        try:
            if not get_auto_createrepo_status(self.opts.frontend_base_url, username, projectname):
                loginfo("Skipped {}/{} since auto createrepo option is disabled"
                          .format(username, projectdir))
                return

praiskup commented at 2019-03-19 14:05:36:

The problem of "auto createrepo disable" is it's original purpose -- KDE/Gnome developers use it (original requestors) for "batch updates" of packages, so they build into /devel repo, and once everything is ready - they do the createrepo manually. The question is who of them enable the automatic prunerepo later, and who not .. and how much priority we should give here (how much storage we would save, research needed...).

I for one would disable createrepo for repositories for pull-requests; so I don't propose the repository to anyone for use. In my case, such builds would never been removed...

IMO, we should run the prunerepo even in this case (one day) -- and do the cleanup using the "production" repodata (not devel).

praiskup commented 1 year ago

Triage time:

We could measure how much we waste because of this: https://github.com/fedora-copr/copr/blob/ef3041ac9b9505821b9c0cb84cbb6aea2e43b2cd/backend/run/copr-backend-resultdir-cleaner#L76-L79

This is a complicated thing to implement - we have one metadata repository for both root dir and for the devel/ sub-dir, and we would have to keep the latest NEVRAs in both sub-dirs.