From nobody Mon Feb 9 19:04:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532569669101305.1130930029699; Wed, 25 Jul 2018 18:47:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 61394308FB86; Thu, 26 Jul 2018 01:47:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D33E308BDA3; Thu, 26 Jul 2018 01:47:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 40A5E3F646; Thu, 26 Jul 2018 01:47:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6Q1llbh015066 for ; Wed, 25 Jul 2018 21:47:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0A1832027047; Thu, 26 Jul 2018 01:47:47 +0000 (UTC) Received: from lemon.usersys.redhat.com (ovpn-12-77.pek2.redhat.com [10.72.12.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43AAF2026D68; Thu, 26 Jul 2018 01:47:43 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:21 +0800 Message-Id: <20180726014725.13677-7-famz@redhat.com> In-Reply-To: <20180726014725.13677-1-famz@redhat.com> References: <20180726014725.13677-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 06/10] testing: Reset testing upon git result update X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 26 Jul 2018 01:47:48 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Similar has been done in SetProperty handler but recently the git properties we listen to were converted into a Result record. So we have to watch that. Signed-off-by: Fam Zheng --- mods/testing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mods/testing.py b/mods/testing.py index 3403e8b..46b3d96 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -106,6 +106,7 @@ class TestingModule(PatchewModule): html_log_url=3D"URL to test log (HTML)", is_timeout=3D"whether the test has timeout") register_handler("SetProperty", self.on_set_property) + register_handler("GitResultUpdate", self.on_git_update) =20 def on_set_property(self, evt, obj, name, value, old_value): if ((isinstance(obj, Message) and obj.is_series_head) \ @@ -121,6 +122,14 @@ class TestingModule(PatchewModule): and old_value !=3D value: self.recalc_pending_tests(obj) =20 + def on_git_update(self, evt, obj, old_status, result): + if isinstance(obj, Message) \ + and obj.is_series_head \ + and old_status !=3D Result.SUCCESS \ + and result.status =3D=3D result.SUCCESS \ + and result.data.get("tag") and result.data.get("repo"): + self.clear_and_start_testing(obj) + def get_testing_results(self, obj, *args, **kwargs): return obj.results.filter(name__startswith=3D'testing.', *args, **= kwargs) =20 --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel