#666 Find waivers with no scenario in non-verbose decisions (#664)
Closed by lholecek. Opened by adamwill.
adamwill/greenwave non-verbose-null-waivers  into  master

Download 666.patch

As described in #664, when handling a non-verbose decision query,
greenwave will not find waivers with no (null / None)
scenario. But when handling a verbose decision query, it finds
all waivers, and considers waivers with no scenario as waiving
any otherwise-matching result regardless of the scenario (per
is in greenwave/waivers.py _is_waived). This means decisions
are not consistent between verbose and non-verbose queries.

This is a problem in practice because most people file waivers
via Bodhi, and Bodhi at present is not including the scenario in
the waivers it files, and Bodhi also does not use a verbose
query on the code path it uses to update the gating decision
after filing a waiver. So right now, when you waive failures on
an update, Bodhi still considers it as failing gating.

Signed-off-by: Adam Williamson awilliam@redhat.com

I tested this with a local dev instance. Without the patch applied, a non-verbose query for an update that has failures waived by Bodhi - e.g. echo '{"product_version":"fedora-37","decision_context":"bodhi_update_push_stable_critpath","subject":[{"item":"annobin-10.81-1.fc37","type":"koji_build"},{"item":"FEDORA-2022-927d891099","type":"bodhi_update"}]}' | http post http://127.0.0.1:5005/api/v1.0/decision - gives unsatisfied requirements. With this patch applied, it (correctly) considers all requirements satisfied.

Closing. Fixed in https://github.com/release-engineering/greenwave/pull/73.

Pull-Request has been closed by lholecek

Metadata