copr icon indicating copy to clipboard operation
copr copied to clipboard

Make coprdirs have their repo available in the buildroot

Open FrostyX opened this issue 1 year ago • 4 comments

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.

FrostyX avatar Aug 11 '24 19:08 FrostyX

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.

praiskup avatar Aug 19 '24 09:08 praiskup

Pull Request validation

Failed

🔴 Review - Missing review from a member (2 required)

Success

🟢 CI - All checks have passed 🟢 Review - Reviewed by undefined

github-actions[bot] avatar Feb 10 '25 13:02 github-actions[bot]

Took me only half a year but updated, PTAL.

FrostyX avatar Feb 20 '25 13:02 FrostyX

Mtg: Test for validating dir names and make sure the Cron for cleaning up old dirs still work.

FrostyX avatar Feb 24 '25 12:02 FrostyX

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.

FrostyX avatar Feb 26 '25 16:02 FrostyX

Only a nit; there are no "Fixes: " labels in git commit messages; but this certainly has some issue counterparts.

praiskup avatar Mar 03 '25 09:03 praiskup

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?

hroncok avatar Mar 03 '25 12:03 hroncok

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:.

FrostyX avatar Mar 04 '25 22:03 FrostyX