-
Notifications
You must be signed in to change notification settings - Fork 49
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
Check of allowed_pr_authors for dist-git PRs with multiple commits is not correct #2271
Comments
The check will be done later in the packit-service. Related to packit/packit-service#2271
I opened draft PRs for the proposed solution: packit/ogr#826, #2275 and packit/packit-service-fedmsg#99 - in fedmsg, filter the pushes (with the check for specfile changes) only if the commit doesn't come from a PR. If the commit comes for a PR, we should run the Koji build for the head commit of the PR which doesn't necessarily have to have the specfile change, so we will now check whether the whole PR has a specfile change. WDYT about this solution? |
I think it makes sense, but it doesn't solve the case when someone pushes multiple commits directly (with the HEAD commit not containing a spec file change), right? That could theoretically happen if someone follows this workflow: https://packit.dev/docs/fedora-releases-guide#keeping-dist-git-branches-non-divergent |
good point, but I have to correct myself, after looking into the code of running the build, we just checkout the corresponding dist-git branch and do not checkout the specific commit, so that should be ok. But this proabbly still seems to me like one of the easier solutions, as I haven't found a way (API) to get a list of all commits of a Pagure PR => a way of getting the PR from a commit that is not the first/last commit of a PR (that way, only the method for getting the corresponding PR would need to be adjusted). |
Implement get_pr_diff for Pagure Needed for packit/packit-service#2271 TODO: test RELEASE NOTES BEGIN There is a new get_pr_files_diff method supported for Pagure. RELEASE NOTES END Reviewed-by: František Lachman <[email protected]>
The check will be done later in the packit-service. Related to packit/packit-service#2271
Adjust check of dist-git PRs for Koji builds If the dist-git push comes from a PR, check that the specfile was changed in that PR. Related to #2271 Needs packit/ogr#826 TODO: Write new tests or update the old ones to cover new functionality. RELEASE NOTES BEGIN We have fixed a bug of not running Koji builds for Packit PRs with multiple commits if the last commit of the PR did not contain the specfile change. RELEASE NOTES END Reviewed-by: Nikola Forró Reviewed-by: Laura Barcziová Reviewed-by: František Lachman <[email protected]> Reviewed-by: Maja Massarini
The check will be done later in the packit-service. Related to packit/packit-service#2271
Skip the specfile changed check for PR pushes The check will be done later in the packit-service. Related to packit/packit-service#2271 Reviewed-by: František Lachman <[email protected]> Reviewed-by: Nikola Forró
For pushes to dist-git, when downstream Koji builds are configured, we check in case the commit is coming from a PR whether the PR author matches the configuration of
allowed_pr_authors
.The problem is in getting the PR here in case we don't react to the head commit (there are multiple commits in the PR and the head commit doesn't have specfile change):
packit-service/packit_service/worker/mixin.py
Lines 259 to 272 in d222ac1
Example:
Logs:
The text was updated successfully, but these errors were encountered: