packit / packit-service

Packit provided as a service
https://packit.dev
MIT License
34 stars 46 forks source link

Previously built Copr PR packages used for buildroot initialization #2432

Open jan-kolarik opened 1 month ago

jan-kolarik commented 1 month ago

In dnf5, we use Packit to run CI tests on pull requests in GitHub.

Once the dnf5 package is successfully built, it becomes part of the Copr repository associated with the GitHub pull request. Any subsequent changes to the pull request retrigger the CI tests and the RPM package build in the same Copr repository containing previously built packages.

Since dnf5 is used to build packages, including itself, it is installed during buildroot initialization using the previously built version from the Copr repository. If this version has a runtime issue, it can affect the buildability of subsequent packages in the pull request.

The only workaround is to create a new pull request, which generates a new Copr repository.

hroncok commented 1 month ago

Copr chroots can be configured to use mock bootstrap images. That should prevent this issue.

lachmanfrantisek commented 3 weeks ago

Thanks @hroncok for suggesting this! Looks like this is also configurable via API. This would be really handy!

In the meantime, I've discussed this with the Copr team and they've suggested taking a look at "Copr project directories" (~subproject). It's not documented much and could change a bit but still worth considering -- the directories should not influence each other.

hroncok commented 3 weeks ago

Indeed, we use directories regurarly and they don't influence each other (nor do builds from within a directory influence other builds from the same directory).

jamacku commented 1 week ago

We have hit the same issue in chkconfig/alternatives:

The initial PR caused alternatives to segfault. Alternatives are in minimal buildroot so any follow-up commits ended with the Packit copr build failing.

We went the same route as @jan-kolarik, and Packit passed since it installed the package from Fedora instead of from copr.

But for some reason, it also rewrote the status checks on the original PR. :confused: So PR 128 has status checks from PR 132.