#2175 Allow building in custom directories
Closed: Fixed 2 years ago by praiskup. Opened 2 years ago by churchyard.

Every build in a copr project happens in a particular directory. It appears that all manually submitted builds automatically happen in the default directory (named the same as the project). Builds from webhooks happen in the directory as well, unless they are from pull requests -- builds from webhooks src.fp.o pull requests happen in directories named after the PR (<project_name>:pr:<pr_number>).

Would you please make it possible to submit builds (ideally via API) in custom directories? It would allow us to test the impact of some change without individual builds affecting each other. We would:

  1. build the changed package in the default directory
  2. for each dependent package, create a directory and build the package in it

The isolation would be helpful because sometimes, the HEAD of a Fedora package in dist-git has not yet been built in Fedora proper, and building it in copr might break other packages we build in the same copr. Happy to explain this in more detail.

Thanks


Metadata Update from @praiskup:
- Issue tagged with: RFE

2 years ago

This makes sense. But I'm a bit worried that we should implement some
reasonable constraints for the directory naming. We already wasted the
colon-pr-colon namespace for the automation.

I'm curious whether we could go with something like colon-custom-colon
pattern at the beginning at least, till we fully test the overall effects
of this feature.

If anything, I'm pretty sure should at least deny-list the
colon-pr-colon directory for non-pull-request builds.

Also, there's one issue (at least it is IMO) that might not be
obvious. When a package is built in the non-default directory (aka PR
directory), it is still built only against the main directory packages
(the packages in the PR directory can not be installed during the build,
the repository is not added). The question is what to do about this?
My best bet is that we should have this configurable per-directory.

the packages in the PR directory can not be installed during the build, the repository is not added

That is completely fine by me. It even allows us to build everything in one custom directory:

  1. build the changed package in the default directory
  2. create a custom directory (e.g. name-colon-isolated)
  3. for each dependent package, build the package in (2)

As long as this is heavily advertized.

Long term, we should IMO have a way to remove CoprDir, too. PR directories
are automatically removed upon certain days of inactivity.

Commit 688f033 relates to this ticket

Commit 3d6f625 relates to this ticket

Metadata Update from @praiskup:
- Issue assigned to praiskup

2 years ago

Commit 8ceebf5 relates to this ticket

I believe this is fixed (currently deployed on stage https://copr.stg.fedoraproject.org). Will be released the next week.

Metadata Update from @praiskup:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #2207 Merged 2 years ago