On Thu, 2025-02-27 at 09:32 +0100, Nikita Popov wrote: > Hi! > > Is it possible to somehow limit some gating rules in gating.yml only to > Fedora rawhide? For example, to gate on rpmdeplint (which is only available > for rawhide), we've tried something like this: > > --- !Policy > product_versions: > - fedora-rawhide > decision_contexts: > - bodhi_update_push_stable > - bodhi_update_push_stable_critpath > rules: > - !PassingTestCaseRule {test_case_name: > fedora-ci.koji-build.rpmdeplint.functional} > > But the rule does not get enforced. > > The documentation at > https://gating-greenwave.readthedocs.io/en/latest/policies.html implies > that using a fedora-rawhide product version is supported, but we suspect > that greenwave expects fedora-43 instead. However, this would require > updating the gating configuration every time Fedora branches. Yes, you're correct. This is because it's Bodhi (usually) that applies the gating, and Bodhi doesn't *really* understand the concept of "Rawhide". There is no single long-lived Rawhide release in Bodhi's model - we just have a "Fedora 43" release right now, that will still be 43 when 43 branches, and we'll create a new "Fedora 44" release at that point. So when Bodhi queries greenwave for a "Rawhide" update, it queries with the product_version set as 'fedora-NN', not 'fedora-rawhide'. So a 'fedora-rawhide' policy will not match. The code is at: https://github.com/fedora-infra/bodhi/blob/1efe4475d33bad7137a142afa78f1b15e94bc91d/bodhi-server/bodhi/server/models.py#L2337 https://github.com/fedora-infra/bodhi/blob/1efe4475d33bad7137a142afa78f1b15e94bc91d/bodhi-server/bodhi/server/models.py#L3858 So yes, unfortunately, this is a bit awkward. Potentially, we could have Bodhi figure out when the release it's working on "is" Rawhide (we have various implementations of this...) and do additional queries against 'fedora-rawhide'. But that doubles the number of queries run at any given time, and for some updates it already has to run rather a lot of queries. Greenwave allows a single query to specify multiple decision contexts and/or 'subjects' in a single query, but not multiple product_versions. I'm not sure I'd want to make greenwave accept multiple product_versions, it feels inherently odd aside from this "they're really just different names for the same thing" case. Perhaps we could instead come up with some kind of 'alias' concept for greenwave? I'll have to poke around in the greenwave code and see if that's feasible. In that case we'd just have to update the alias in greenwave config at each branch point, it can even be templated. -- Adam Williamson (he/him/his) Fedora QA Fedora Chat: @adamwill:fedora.im | Mastodon: @adamw@xxxxxxxxxxxxx https://www.happyassassin.net -- _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue