fedora-infra / bodhi

Bodhi is a web-system that facilitates the process of publishing updates for a Fedora-based software distribution.
https://bodhi.fedoraproject.org
GNU General Public License v2.0
152 stars 195 forks source link

[web] Update links to Koji builds should not use koji search #5536

Open juhp opened 10 months ago

juhp commented 10 months ago

It should be possible for Bodhi to know the exact koji build corresponding to an NVR (since they must be unique).

eg https://bodhi.fedoraproject.org/updates/FEDORA-2023-1be0af64c4 has a build link: https://koji.fedoraproject.org/koji/search?terms=distrobox-1.6.0.1-1.fc39&type=build&match=exact which should be simplified to just https://koji.fedoraproject.org/koji/buildinfo?buildID=2322876 (it is just a simple Koji API call to get the buildid corresponding to an NVR).

Opening the direct link is noticeably faster for me: in fact I deliberately don't open Bodhi build links because of this...

mattiaverga commented 10 months ago

This is rather tricky: we have Build.get_build_id(), but it needs to query Koji, thus may slow down page generation. I'm postponing after 8.0 release to look into that. Maybe we can just store the build id in database, if it is handy for other tasks too.