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

packit-fedora-ci: Scratch builds on a PR to multiple branches overwrite each other #2736

Open
LecrisUT opened this issue Mar 2, 2025 · 3 comments
Labels
area/fedora-ci 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/high This issue impacts multiple/lot of users. kind/bug Something isn't working.

Comments

@LecrisUT
Copy link
Contributor

LecrisUT commented Mar 2, 2025

What happened? What is the problem?

Let's say there is a PR to update rawhide which triggers a packit-scratch-build. Then if we have another PR to f42 using the same commit (e.g. merging rawhide to f42 later on), the latter f42 scratch-build will overwrite the rawhide one.

This is what happened here, where you see only 1 packit-scratch-build job, but fedora-ci and zuul are correctly doubled:

@lachmanfrantisek
Copy link
Member

Hi @LecrisUT, good catch.

Slightly related to this is that if we share the commit between multiple pull-requests, the all the statuses are visible across all the pull requests (e.g. see here).

This comes from the way how CI checks are implemented (it is a commit status in reality), but we might need to at least make clear what status comes from what branch to better understand this.


Historical note: Pagure used to do statuses for pull-request instead of commits which fixes this issue but makes it really hard to reliably update the status on rebases/pushes/... Maybe we can check how this works on Forgejo and if there isn't a way to apply statues for commit AND pull requests.

@nforro nforro added complexity/single-task Regular task, should be done within days. impact/high This issue impacts multiple/lot of users. gain/high This brings a lot of value to (not strictly a lot of) users. labels Mar 3, 2025
@nforro nforro moved this from new to priority-backlog in Packit Kanban Board Mar 3, 2025
@LecrisUT
Copy link
Contributor Author

LecrisUT commented Mar 3, 2025

Seems like the core issue is

uid = hashlib.sha256(check_name.encode()).hexdigest()[:32]

where it should include the target branch as well. My thought is to include that in check_name itself because it would clarify the target branch in both pagure UI and notifications.

Maybe we can check how this works on Forgejo and if there isn't a way to apply statues for commit AND pull requests.

Afaict from Github, the status check is applied to both commit and PR if it's triggered in both. Sometimes I have commit status from my fork show up in the PR. It does not display in the PR though, so there is some magic there. Forgejo api shows that there is some context that you can set, but 🤷 for what that means.

@lbarcziova
Copy link
Member

where it should include the target branch as well. My thought is to include that in check_name itself because it would clarify the target branch in both pagure UI and notifications.

@LecrisUT yes you are correct, we discussed this on our standup today and also concluded the inclusion of the target branch will both be beneficial and fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fedora-ci 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/high This issue impacts multiple/lot of users. kind/bug Something isn't working.
Projects
Status: priority-backlog
Development

No branches or pull requests

4 participants