From 2693f2a84c61da7e6bea1c27b23c98a368fee72e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Aug 11 2022 23:20:43 +0000 Subject: Find waivers with no scenario in non-verbose decisions (#664) 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 --- diff --git a/greenwave/decision.py b/greenwave/decision.py index 759aa6a..c1756d5 100644 --- a/greenwave/decision.py +++ b/greenwave/decision.py @@ -104,6 +104,13 @@ class Decision: testcase=answer.test_case_name, scenario=answer.scenario )) + self.waiver_filters.append(dict( + subject_type=answer.subject.type, + subject_identifier=answer.subject.identifier, + product_version=self.product_version, + testcase=answer.test_case_name, + scenario=None + )) if self.waiver_filters: self.waivers = waivers_retriever.retrieve(self.waiver_filters)