From nobody Thu Apr 25 01:03:20 2024 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 153256965723624.03894476694461; Wed, 25 Jul 2018 18:47:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B01685362; Thu, 26 Jul 2018 01:47:36 +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 363522010CE3; Thu, 26 Jul 2018 01:47:36 +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 264863F646; Thu, 26 Jul 2018 01:47:36 +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 w6Q1lY7J015013 for ; Wed, 25 Jul 2018 21:47:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6517D2027047; Thu, 26 Jul 2018 01:47:34 +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 BCE162026D68; Thu, 26 Jul 2018 01:47:32 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:16 +0800 Message-Id: <20180726014725.13677-2-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 01/10] testing: Avoid masking out outter iterator r 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.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 26 Jul 2018 01:47:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The 'r' we want to yield is the object in queryset. Avoid overwriting it with a requirement string. Signed-off-by: Fam Zheng --- mods/testing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/testing.py b/mods/testing.py index 0a80b3d..70b4674 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -409,8 +409,8 @@ class TestingGetView(APILoginRequiredView): if not t: continue reqs =3D t.get("requirements", "") - for r in [x.strip() for x in reqs.split(",") if x]: - if r not in capabilities: + for req in [x.strip() for x in reqs.split(",") if x]: + if req not in capabilities: break else: yield r, t --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 153256965889898.6929193037115; Wed, 25 Jul 2018 18:47:38 -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 03CB9308FB86; Thu, 26 Jul 2018 01:47:38 +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 E8D2D308BDA3; Thu, 26 Jul 2018 01:47:37 +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 DDBB03F646; Thu, 26 Jul 2018 01:47:37 +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 w6Q1lacm015024 for ; Wed, 25 Jul 2018 21:47:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 93000202704B; Thu, 26 Jul 2018 01:47:36 +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 27F082026D68; Thu, 26 Jul 2018 01:47:34 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:17 +0800 Message-Id: <20180726014725.13677-3-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 02/10] cli: Default -N of tester command to -1 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:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This is a more appropriate value for "run forever", because 0 could result in an unexpected early return in the loop when there is no test to run. Signed-off-by: Fam Zheng --- patchew-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchew-cli b/patchew-cli index 174d1e6..f4539a7 100755 --- a/patchew-cli +++ b/patchew-cli @@ -452,7 +452,7 @@ class TesterCommand(SubCommand): help=3D"comma separated project names to run t= est") parser.add_argument("--name", "-n", help=3D"name of this tester (default is the lo= gged in username)") - parser.add_argument("--num", "-N", type=3Dint, default=3D0, + parser.add_argument("--num", "-N", type=3Dint, default=3D-1, help=3D"max number of tests to run") parser.add_argument("--no-clean-up", action=3D"store_true", help=3D"skip cleaning up after finish") --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 153256966118157.95658309881151; Wed, 25 Jul 2018 18:47:41 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C0265F780; Thu, 26 Jul 2018 01:47:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4CAC5261C0; Thu, 26 Jul 2018 01:47:40 +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 3D3EC18037EC; Thu, 26 Jul 2018 01:47:40 +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 w6Q1ld5I015034 for ; Wed, 25 Jul 2018 21:47:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id E087B202704B; Thu, 26 Jul 2018 01:47:38 +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 5D0A52026D68; Thu, 26 Jul 2018 01:47:36 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:18 +0800 Message-Id: <20180726014725.13677-4-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 03/10] deploy-testers: Allow deploy with normal user access 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 26 Jul 2018 01:47:40 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Ansible "become" and "/data" basically requires root access to the tester machine, but that is not always the case. Tweak the playbook a bit to allow that. Signed-off-by: Fam Zheng --- scripts/playbooks/deploy-testers.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/playbooks/deploy-testers.yml b/scripts/playbooks/deplo= y-testers.yml index ae3ab0b..7b375db 100644 --- a/scripts/playbooks/deploy-testers.yml +++ b/scripts/playbooks/deploy-testers.yml @@ -23,7 +23,7 @@ default: patchew private: no vars: - base_dir: "/data/{{ instance_name }}" + base_dir: "{{ instance_name }}" src_dir: "{{ base_dir }}/src" patchew_cmd: "{{ src_dir }}/patchew-cli -s {{ patchew_server }}" tasks: @@ -52,16 +52,10 @@ - "--exclude=3D/venv" - name: Generate password file shell: "echo {{ tester_pass }} > $HOME/.patchew-tester-pass" - become: true - become_user: "{{ cron_user }}" - name: Login with patchew-cli shell: "{{ patchew_cmd }} login {{ tester_user }} $(cat $HOME/.patch= ew-tester-pass)" - become: true - become_user: "{{ cron_user }}" - name: Logout with patchew-cli shell: "{{ patchew_cmd }} logout" - become: true - become_user: "{{ cron_user }}" - name: Define PATCHEW env in cron cron: name: PATCHEW --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 1532569663188584.9698328131054; Wed, 25 Jul 2018 18:47:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7369D32B68A; Thu, 26 Jul 2018 01:47:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 65BD760BEC; Thu, 26 Jul 2018 01:47:42 +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 5002118037EC; Thu, 26 Jul 2018 01:47:42 +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 w6Q1lfpk015044 for ; Wed, 25 Jul 2018 21:47:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 45D552027047; Thu, 26 Jul 2018 01:47:41 +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 B3CBD2026D68; Thu, 26 Jul 2018 01:47:39 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:19 +0800 Message-Id: <20180726014725.13677-5-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 04/10] testing: Fix git info for testing-get method 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.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 26 Jul 2018 01:47:42 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Git properties are no longer there, we have to go for the Result object. Signed-off-by: Fam Zheng --- mods/testing.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mods/testing.py b/mods/testing.py index 70b4674..3403e8b 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -377,10 +377,12 @@ class TestingGetView(APILoginRequiredView): return r =20 def _generate_series_test_data(self, s, test): + gr =3D s.git_result + assert gr.is_success() return self._generate_test_data(project=3Ds.project.name, - repo=3Ds.get_property("git.repo"), - head=3Ds.get_property("git.tag"), - base=3Ds.get_property("git.base"), + repo=3Dgr.data["repo"], + head=3Dgr.data["tag"], + base=3Dgr.data.get("base", None), identity=3D{ "type": "series", "message-id": s.message_id, --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 15325696659084.301102936055827; Wed, 25 Jul 2018 18:47:45 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F682308A96C; Thu, 26 Jul 2018 01:47:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10F2B5DF50; Thu, 26 Jul 2018 01:47:45 +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 F228218037EC; Thu, 26 Jul 2018 01:47:44 +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 w6Q1lhZh015054 for ; Wed, 25 Jul 2018 21:47:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8143C202704B; Thu, 26 Jul 2018 01:47:43 +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 EF1352026D68; Thu, 26 Jul 2018 01:47:41 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:20 +0800 Message-Id: <20180726014725.13677-6-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 05/10] git: Emit git result update event 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.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 26 Jul 2018 01:47:45 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" old_status will help testing mod to determine if recalculating test results is necessary. Signed-off-by: Fam Zheng --- mods/git.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mods/git.py b/mods/git.py index 924547a..7970bc1 100644 --- a/mods/git.py +++ b/mods/git.py @@ -67,7 +67,9 @@ class GitModule(PatchewModule): # Make sure git is available subprocess.check_output(["git", "version"]) declare_event("ProjectGitUpdate", project=3D"the updated project n= ame") - declare_event("SeriesApplied", series=3D"the object of applied ser= ies") + declare_event("GitResultUpdate", obj=3D"the updated object", + old_status=3D'the old result status', + result=3D"the Git result object") register_handler("SeriesComplete", self.on_series_update) register_handler("TagsUpdate", self.on_series_update) =20 @@ -273,8 +275,10 @@ class ApplierReportView(APILoginRequiredView): def handle(self, request, project, message_id, tag, url, base, repo, failed, log): p =3D Project.objects.get(name=3Dproject) - r =3D Message.objects.series_heads().get(project=3Dp, - message_id=3Dmessage_id).gi= t_result + series =3D Message.objects.series_heads().get(project=3Dp, + message_id=3Dmessage_id) + r =3D series.git_result + old_status =3D r.status r.log =3D log data =3D {} if failed: @@ -292,3 +296,5 @@ class ApplierReportView(APILoginRequiredView): r.status =3D Result.SUCCESS r.data =3D data r.save() + emit_event("GitResultUpdate", obj=3Dseries, old_status=3Dold_statu= s, + result=3Dr) --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 From nobody Thu Apr 25 01:03:20 2024 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 1532569671333710.9890532206164; Wed, 25 Jul 2018 18:47:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 95AA2308A955; Thu, 26 Jul 2018 01:47:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83C7A261C0; Thu, 26 Jul 2018 01:47:50 +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 766D518037EC; Thu, 26 Jul 2018 01:47:50 +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 w6Q1lnmF015074 for ; Wed, 25 Jul 2018 21:47:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 39DE32027047; Thu, 26 Jul 2018 01:47:49 +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 CC0142026D68; Thu, 26 Jul 2018 01:47:47 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:22 +0800 Message-Id: <20180726014725.13677-8-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 07/10] testing: Move do_apply to base class 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 26 Jul 2018 01:47:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Fam Zheng --- tests/patchewtest.py | 5 +++++ tests/test_git.py | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/patchewtest.py b/tests/patchewtest.py index 5bed3b9..9d34555 100644 --- a/tests/patchewtest.py +++ b/tests/patchewtest.py @@ -100,6 +100,11 @@ class PatchewTestCase(django.test.LiveServerTestCase): def cli_import(self, mbox, rc=3D0): self.check_cli(["import", self.get_data_path(mbox)], rc) =20 + def do_apply(self): + self.cli(["apply", "--applier-mode"]) + for s in Message.objects.series_heads(): + self.assertNotEqual(s.git_result.status, Result.PENDING) + def get_data_path(self, fname): r =3D tempfile.NamedTemporaryFile(dir=3DRUN_DIR, prefix=3D"test-da= ta-", delete=3DFalse) d =3D os.path.join(BASE_DIR, "tests", "data", fname) diff --git a/tests/test_git.py b/tests/test_git.py index b2802d5..31e9823 100755 --- a/tests/test_git.py +++ b/tests/test_git.py @@ -31,11 +31,6 @@ class GitTest(PatchewTestCase): def cleanUp(self): shutil.rmtree(self.repo) =20 - def do_apply(self): - self.cli(["apply", "--applier-mode"]) - for s in Message.objects.series_heads(): - self.assertNotEqual(s.git_result.status, Result.PENDING) - def test_need_apply(self): self.cli_import("0001-simple-patch.mbox.gz") s =3D Message.objects.series_heads()[0] --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 1532569673404338.63643620955054; Wed, 25 Jul 2018 18:47:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A53784E8BF; Thu, 26 Jul 2018 01:47:52 +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 95B55C4B1E; Thu, 26 Jul 2018 01:47:52 +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 879903F646; Thu, 26 Jul 2018 01:47:52 +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 w6Q1lpPS015091 for ; Wed, 25 Jul 2018 21:47:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7E8C62027047; Thu, 26 Jul 2018 01:47:51 +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 E80572026D68; Thu, 26 Jul 2018 01:47:49 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:23 +0800 Message-Id: <20180726014725.13677-9-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 08/10] tests: Create repo automatically for projects 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.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 26 Jul 2018 01:47:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" They are likely useful for git and testing related cases, so do it automatically. Signed-off-by: Fam Zheng --- tests/patchewtest.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/patchewtest.py b/tests/patchewtest.py index 9d34555..d41793e 100644 --- a/tests/patchewtest.py +++ b/tests/patchewtest.py @@ -118,8 +118,12 @@ class PatchewTestCase(django.test.LiveServerTestCase): return Project.objects.all() =20 def add_project(self, name, mailing_list=3D"", git_repo=3D""): - p =3D Project(name=3Dname, mailing_list=3Dmailing_list, git=3Dgit_= repo) + p =3D Project(name=3Dname, mailing_list=3Dmailing_list, git=3Dgit_= repo or self.create_git_repo(name)) p.save() + push_repo =3D self.create_git_repo(name + "_push") + p.set_property("git.push_to", push_repo) + p.set_property("git.public_repo", push_repo) + p.set_property("git.url_template", push_repo) return p =20 def api_login(self): @@ -146,10 +150,13 @@ class PatchewTestCase(django.test.LiveServerTestCase): repo =3D os.path.join(self.get_tmpdir(), name) os.mkdir(repo) subprocess.check_output(["git", "init"], cwd=3Drepo) - subprocess.check_output(["touch", "foo"], cwd=3Drepo) + subprocess.check_output(["touch", "foo", "bar"], cwd=3Drepo) subprocess.check_output(["git", "add", "foo"], cwd=3Drepo) subprocess.check_output(["git", "commit", "-m", "initial commit"], cwd=3Drepo) + subprocess.check_output(["git", "add", "bar"], cwd=3Drepo) + subprocess.check_output(["git", "commit", "-m", "another commit"], + cwd=3Drepo) return repo =20 def parse_args(): --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 1532569675982591.861613332989; Wed, 25 Jul 2018 18:47:55 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C21B83F3D; Thu, 26 Jul 2018 01:47:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B2D330001ED; Thu, 26 Jul 2018 01:47:55 +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 1C72F18037EC; Thu, 26 Jul 2018 01:47:55 +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 w6Q1lr1U015101 for ; Wed, 25 Jul 2018 21:47:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id BB6E8202704B; Thu, 26 Jul 2018 01:47:53 +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 4217D2026D68; Thu, 26 Jul 2018 01:47:51 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:24 +0800 Message-Id: <20180726014725.13677-10-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 09/10] tests: Fix "testing" 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.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 26 Jul 2018 01:47:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" These tests have been in a lower level before and relied on SetProperty handlers in testing mod to initialize testing data. So they unfortunately missed the bug introduced during the conversion from "git.*" properties to Results: now that git mod doesn't set Message's git.repo and git.tag property, the testings are never prepared! Switch to use a more end-to-end approach with do_apply(). Signed-off-by: Fam Zheng --- tests/test_testing.py | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/tests/test_testing.py b/tests/test_testing.py index 7ca4625..c1a1c94 100755 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -28,8 +28,6 @@ class TestingTestCase(PatchewTestCase, metaclass=3Dabc.AB= CMeta): def setUp(self): self.create_superuser() self.p =3D self.add_project("QEMU", "qemu-devel@nongnu.org") - self.p.git =3D "dummy repo" - self.p.save() =20 self.PROJECT_BASE =3D '%sprojects/%d/' % (self.REST_BASE, self.p.i= d) =20 @@ -153,14 +151,10 @@ class MessageTestingTest(TestingTestCase): super(MessageTestingTest, self).setUp() =20 self.cli_login() - self.cli_import('0001-simple-patch.mbox.gz') + self.cli_import('0013-foo-patch.mbox.gz') + self.do_apply() self.cli_logout() - self.msg =3D Message.objects.all()[0] - self.msg.save() - self.msg.set_property("git.repo", "dummy repo") - self.msg.set_property("git.tag", "dummy tag") - self.msg.set_property("git.base", "dummy base") =20 def do_testing_done(self, **kwargs): self._do_testing_done(self.msg, **kwargs) @@ -175,16 +169,6 @@ class MessageTestingTest(TestingTestCase): self.PROJECT_BASE, self.msg.message= _id, test_name)) =20 def test_testing_ready(self): - # Set property through series_heads elements must be handled the s= ame - self.msg.set_property("git.repo", None) - self.msg.set_property("git.tag", None) - self.assertEqual(self.msg.results.filter(name=3D'testing.a').first= ().status, - Result.PENDING) - msg =3D Message.objects.series_heads()[0] - self.assertEqual(self.msg.message_id, msg.message_id) - msg.set_property("git.repo", "dummy repo") - msg.set_property("git.tag", "dummy tag") - msg.set_property("git.base", "dummy base") self.assertEqual(self.msg.results.filter(name=3D'testing.a').first= ().status, Result.PENDING) =20 @@ -212,31 +196,22 @@ class TesterTest(PatchewTestCase): def setUp(self): self.create_superuser() =20 + self.repo =3D self.create_git_repo("repo") self.p1 =3D self.add_project("QEMU", "qemu-devel@nongnu.org") create_test(self.p1, "a") self.p2 =3D self.add_project("UMEQ", "qemu-devel@nongnu.org") create_test(self.p2, "b") =20 self.cli_login() - self.cli_import('0001-simple-patch.mbox.gz') + self.cli_import('0013-foo-patch.mbox.gz') self.cli_logout() =20 - self.repo =3D os.path.join(self.get_tmpdir(), "repo") - os.mkdir(self.repo) - subprocess.check_output(["git", "init"], cwd=3Dself.repo) - for f in ["foo", "bar"]: - self.add_file_and_commit(f) self.update_head(self.p1) self.update_head(self.p2) base =3D subprocess.check_output(["git", "rev-parse", "HEAD~1"], cwd=3Dself.repo).decode() subprocess.check_output(["git", "tag", "test"], cwd=3Dself.repo) =20 - for msg in Message.objects.all(): - msg.set_property("git.repo", self.repo) - msg.set_property("git.tag", "test") - msg.set_property("git.base", base) - def add_file_and_commit(self, f): subprocess.check_output(["touch", f], cwd=3Dself.repo) subprocess.check_output(["git", "add", f], cwd=3Dself.repo) --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Thu Apr 25 01:03:20 2024 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 1532569678576661.1089252602641; Wed, 25 Jul 2018 18:47:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF0CC356C9; Thu, 26 Jul 2018 01:47:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB2E516BEE; Thu, 26 Jul 2018 01:47:57 +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 9F71F18037EC; Thu, 26 Jul 2018 01:47:57 +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 w6Q1luFe015112 for ; Wed, 25 Jul 2018 21:47:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id E42D2202704B; Thu, 26 Jul 2018 01:47:55 +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 7E4DA2026D68; Thu, 26 Jul 2018 01:47:54 +0000 (UTC) From: Fam Zheng To: patchew-devel@redhat.com Date: Thu, 26 Jul 2018 09:47:25 +0800 Message-Id: <20180726014725.13677-11-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 10/10] docker: Unlimited restart of systemd service 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 26 Jul 2018 01:47:57 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Sleeping for 60 seconds makes sure we don't hog the machine, and keep retrying helps us survive transient network issues. The patch is not tested, I just referenced systemd document for it. Signed-off-by: Fam Zheng --- scripts/playbooks/templates/docker.service.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/playbooks/templates/docker.service.j2 b/scripts/playbo= oks/templates/docker.service.j2 index 45d2871..afd5df1 100644 --- a/scripts/playbooks/templates/docker.service.j2 +++ b/scripts/playbooks/templates/docker.service.j2 @@ -2,6 +2,7 @@ Description=3DPatchew docker instance control service for {{ instance_name= }} Requires=3Ddocker.service After=3Ddocker.service +StartLimitIntervalSec=3D0 =20 [Service] Restart=3Dalways @@ -11,6 +12,7 @@ ExecStart=3D/usr/bin/docker run --privileged --name {{ in= stance_name }} \ -e PATCHEW_DATA_DIR=3D/data/patchew \ patchew:{{ instance_name }} ExecStop=3D/usr/bin/docker stop -t 10 {{ instance_name }} +RestartSec=3D60 =20 [Install] WantedBy=3Ddefault.target --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel