Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previously built Copr PR packages used for buildroot initialization #2432

Closed
jan-kolarik opened this issue May 23, 2024 · 8 comments · Fixed by #2531
Closed

Previously built Copr PR packages used for buildroot initialization #2432

jan-kolarik opened this issue May 23, 2024 · 8 comments · Fixed by #2531
Assignees
Labels
area/copr Related to the integration with copr.fedorainfracloud.org/ complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/feature New feature or a request for enhancement.

Comments

@jan-kolarik
Copy link

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
Copy link

hroncok commented May 30, 2024

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

@lachmanfrantisek
Copy link
Member

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.

@lachmanfrantisek lachmanfrantisek added kind/feature New feature or a request for enhancement. complexity/single-task Regular task, should be done within days. impact/low This issue impacts only a few users. gain/high This brings a lot of value to (not strictly a lot of) users. labels Jun 3, 2024
@lachmanfrantisek lachmanfrantisek moved this from new to backlog in Packit Kanban Board Jun 3, 2024
@lachmanfrantisek lachmanfrantisek moved this from backlog to priority-backlog in Packit Kanban Board Jun 3, 2024
@hroncok
Copy link

hroncok commented Jun 4, 2024

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
Copy link

jamacku commented Jun 19, 2024

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. 😕 So PR 128 has status checks from PR 132.

@jamacku
Copy link

jamacku commented Aug 5, 2024

@lachmanfrantisek, Do you have any updates regarding this issue? It's very inconvenient to have to open new PRs every time we encounter this problem.

Thank you

e.g. fedora-sysv/chkconfig#135

@lachmanfrantisek
Copy link
Member

lachmanfrantisek commented Aug 15, 2024

@jamacku thanks for the ping. Will prioritise this one (putting on top of our priority backlog) -- adding a config option to set a mock bootstrap image sounds like being more easier to do compared to swapping to Copr directories. So, if this works, we will go that way.

@mfocko mfocko moved this from priority-backlog to refined in Packit Kanban Board Aug 22, 2024
@nforro nforro assigned nforro and unassigned lachmanfrantisek Sep 9, 2024
@nforro nforro moved this from refined to in-progress in Packit Kanban Board Sep 9, 2024
@nforro nforro moved this from in-progress to in-review in Packit Kanban Board Sep 17, 2024
softwarefactory-project-zuul bot added a commit to packit/packit that referenced this issue Sep 17, 2024
Add `bootstrap` config option for Copr builds

Related to packit/packit-service#2432.
RELEASE NOTES BEGIN
Packit now allows to configure mock bootstrap feature setup of Copr projects with a new bootstrap configuration option.
RELEASE NOTES END

Reviewed-by: Laura Barcziová
@github-project-automation github-project-automation bot moved this from in-review to done in Packit Kanban Board Sep 17, 2024
softwarefactory-project-zuul bot added a commit to packit/packit.dev that referenced this issue Sep 19, 2024
Document the `bootstrap` option of `copr_build` job

Related to packit/packit-service#2432.

Reviewed-by: Laura Barcziová
@nforro
Copy link
Member

nforro commented Sep 23, 2024

@jan-kolarik @jamacku The change has been deployed, could you please try the new bootstrap option and verify that it can be used to solve your issue(s)? If not, we will prioritize and implement this instead.

@jan-kolarik
Copy link
Author

@jan-kolarik @jamacku The change has been deployed, could you please try the new bootstrap option and verify that it can be used to solve your issue(s)? If not, we will prioritize and implement this instead.

Great, thanks for fixing this! I’ll make a note to test it, but it generally can’t be easily verified by just intercepting the existing pull requests, since a runtime error needs to occur in the initial build that was pushed within the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/copr Related to the integration with copr.fedorainfracloud.org/ complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/feature New feature or a request for enhancement.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants