Make coprdirs have their repo available in the buildroot
This is useful in general but especially for pull requests that build multiple packages which depend on each other (e.g. python-copr and copr-cli). Up until now, it had to be workarounded by building the dependency into the main copr repository.
This would bring security issue into the src.fedoraproject.org integration (the pagure events handler).... a single Copr project may integrate multiple packages from s.f.o. being developed by multiple packagers from s.f.o, and all such integrated packages can build from the corresponding "pull-request 1" (separate PRs, heading the same CoprDir!) and then, the package builds are done against each other.
We need to solve the s.f.o integration first, somehow.
Pull Request validation
Failed
🔴 Review - Missing review from a member (2 required)
Success
🟢 CI - All checks have passed 🟢 Review - Reviewed by undefined
Took me only half a year but updated, PTAL.
Mtg: Test for validating dir names and make sure the Cron for cleaning up old dirs still work.
Test for validating dir names
I didn't change any code but I added a test for the validation method. All patterns that I would expect to fail, fail. @praiskup were you worried about some different ones?
make sure the Cron for cleaning up old dirs still work.
I submitted a build:
copr --config ~/.config/copr.docker build-distgit frostyx/test-coprdir-deletion:pr:foo-bar-1 --name hello
and tried:
[copr-fe@frontend /]$ copr-frontend delete-dirs
which returned nothing. Then I did:
coprdb=# update build set submitted_on=1 where id=8561786;
and tried again:
[copr-fe@frontend /]$ copr-frontend delete-dirs
frostyx/test-coprdir-deletion:pr:foo-bar-1 is going to be deleted
Also looking at the deletion code, there doesn't seem to be any logic related to the dir name. So I think the cleanups should still work as expected.
Only a nit; there are no "Fixes: " labels in git commit messages; but this certainly has some issue counterparts.
This means we can no longer submit all builds to $COPR:custom:isolated and assume they are isolated from each other. We must now send them to $COPR:custom:isolated-$NUMBER hen each NUMBER is unique, right?
Hello @hroncok, I think the answer to your question is "no".
Sorry, I implemented two unrelated things in this PR, to make it more confusing. The "isolation" part of this PR fixes #767, and it is only relevant for :pr: CoprDirs that are automatically created from pagure pull requests. This change should be NOOP for everybody who uses :custom:.