Learn more about these different git repos.
Other Git URLs
Attempting to push to epel10 branches in dist-git fails.
❯ git push Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0) remote: Unspecified ref refs/heads/epel10 is blocked remote: Denied push for ref 'refs/heads/epel10' for user 'carlwgeorge' remote: All changes have been rejected To ssh://pkgs.fedoraproject.org/rpms/tinyproxy ! [remote rejected] epel10 -> epel10 (pre-receive hook declined) error: failed to push some refs to 'ssh://pkgs.fedoraproject.org/rpms/tinyproxy'
I originally thought that this was some kind of problem related to requesting the branch with --no-git-branch (see #12235), but then I was able to reproduce the push error on another repo where I requested the branch normally.
--no-git-branch
I dug in and I think I've pinpointed the issue. The DistGitAuth.is_supported_branch method in pagure-dist-git queries bodhi for a release, using the branch name as the identifier. The result of this query determines if the branch is allowed to be pushed to.
DistGitAuth.is_supported_branch
https://pagure.io/pagure-dist-git/blob/9a2fd0835be06e6a994e32e3265e80e502331f50/f/dist_git_auth.py#_84-115
However, bodhi doesn't actually allow querying releases by branch. If I'm reading that code right, you have to request it by the name, long_name, or dist_tag properties.
name
long_name
dist_tag
https://github.com/fedora-infra/bodhi/blob/8.1.1/bodhi-server/bodhi/server/services/releases.py#L194 https://github.com/fedora-infra/bodhi/blob/8.1.1/bodhi-server/bodhi/server/models.py#L856
For previous EPEL branches, the branch name happened to align with the dist_tag property of the bodhi release. That meant a request such as https://bodhi.fedoraproject.org/releases/epel9 returned successfully, which in turn passed is_supported_branch. However, since EPEL 10 has minor versions, we've disrupted this accidental alignment. A request to https://bodhi.fedoraproject.org/releases/epel10 returns a 404. A request to https://bodhi.fedoraproject.org/releases/epel10.0 returns ok, but that isn't what is_supported_branch asks for based on a branch name of epel10. For anyone not up to speed on EPEL 10 plans, our intention is a setup like this at first:
is_supported_branch
epel10 dist-git branch -> epel10.0 in koji/bodhi
and then later:
epel10 dist-git branch -> epel10.1 in koji/bodhi epel10.0 dist-git branch -> epel10.0 in koji/bodhi
and then continuing like that through the rest of the RHEL 10 minor versions.
I think there are two options we can take to resolve this.
Option 1: change pagure-dist-git to understand how to allow an epel10 branch when the bodhi release is epel10.0
Option 2: change bodhi to allow querying releases by the branch name
I'm going to attempt to create a PR to implement option 1 because I think that will be easier.
2024/08/09 (the EPEL 10 Hackfest at Flock)
It will always be needed.
This is a complete blocker for EPEL 10 as it is currently planned.
This is due to code in https://pagure.io/pagure-dist-git
It checks for active bodhi releases, and epel-10 isn't one (bodhi has a epel-10.0).
So that code will need to be adjusted to handle this case.
I have implemented this in https://pagure.io/pagure-dist-git/pull-request/166. I feel pretty good about it with the tests passing locally in a Python 3.9 venv. I tried to do the same in a Python 3.6 venv, but couldn't get all the deps sorted out. I don't see CI configured on that repo, so if anyone has an existing environment they could also run the tests in it would be appreciated. General code review comments are also welcome of course.
Based on the builds it seems the latest version of pagure-dist-git was only built for epel8, so I'm assuming that's how it being run in production. I don't know what all is involved with tagging a new version in the upstream repo, so as a possible alternative I also put up a package pull request to backport the fix to the existing epel8 version. If it's easier to tag a new version and build that, feel free to just close the package pull request.
I really hope we can get this in production before the hackfest this Friday. :smiley:
So we will need to merge the changes create a new release and build it in Koji. I am just starting my travels to flock. I might be able to look at the PR during the trip.
This fix has been merged and tagged as version 1.15. The epel8 branch of the package has been built for the epel8-infra target and deployed in production (thanks to some productive hallway work at Flock). I verified that I can now push to epel10 branches, so this is resolved. Thanks @humaton for the help!
Metadata Update from @carlwgeorge: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.