From 01820c1e5e574f75d0cfab63621ba334f431abd6 Mon Sep 17 00:00:00 2001 From: Jimmy Berry Date: Fri, 16 Nov 2018 13:36:38 -0600 Subject: [PATCH] staging-report: ignore projects not in a final state. --- staging-report.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/staging-report.py b/staging-report.py index 8442bb1a..e5e507dd 100755 --- a/staging-report.py +++ b/staging-report.py @@ -97,17 +97,13 @@ class StagingReport(object): def report(self, project, aggregate=True, force=False): info = self.api.project_status(project, aggregate) - # Some staging projects do not have info like - # openSUSE:Factory:Staging:Gcc49 - if not info: - return - - if info['overall_state'] == 'empty': - return - - # The 'unacceptable' status means that the project will be - # replaced soon. Better do not disturb with noise. - if info['overall_state'] == 'unacceptable': + # Do not attempt to process projects without staging info, or projects + # in a pending state that will change before settling. This avoids + # intermediate notifications that may end up being spammy and for + # long-lived stagings where checks may be re-triggered multiple times + # and thus enter pending state (not seen on first run) which is not + # useful to report. + if not info or not self.api.project_status_final(info): return report_broken_packages = self._report_broken_packages(info)