From nobody Fri Mar 29 05:14:03 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1555495798; cv=none; d=zoho.com; s=zohoarc; b=eA0v0PfldqS1n3O3FAqFWX2g+kxVI/BxEUr2Mq4HoCU97mMIq6dmht5Y1Crc/1ivtBn9vDviSJWpj5Chzsr4FdyT2maOSfYL5Hz8qYgQjk4HxNXfFDQVw6/2JOGEATPrOdlNRdGB5ZsoxZ6f5RhKQzIBkyO0w/lQkDUFdKrJanU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555495798; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=r1jeimVfqOA1AZ65j0YLX+LFiVZDyMKpNcHYu979b8k=; b=jMDzsKPobbyQMz575j7nQpJJPf8OTCXTKTOhZmOMAu8H5FeALSTLejXB8qcg5Dc+SzP7bU5Hd96WjONpLH1r5ajz112ibNfRQ7JvaKmHvOItS3joaE9fbhv3UXGyhSUWhxjo3qkiBoDs7FzYAllZrllT31eivbIa+/Lj+kr7s4E= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555495798077327.2986099605963; Wed, 17 Apr 2019 03:09:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2B9F86677; Wed, 17 Apr 2019 10:09:56 +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 B56295C220; Wed, 17 Apr 2019 10:09:56 +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 A8F2941F3D; Wed, 17 Apr 2019 10:09:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HA9tAi013034 for ; Wed, 17 Apr 2019 06:09:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22B1E1001E9A; Wed, 17 Apr 2019 10:09:55 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C8DA1001E98 for ; Wed, 17 Apr 2019 10:09:53 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6573C30821E2 for ; Wed, 17 Apr 2019 10:09:52 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id y13so31199221wrd.3 for ; Wed, 17 Apr 2019 03:09:52 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id c13sm4949719wrx.88.2019.04.17.03.09.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 03:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/uYYGWd17YBdkF6Py+f5um2r5gfWGO1OQXq+XggriIo=; b=o72pqgHqcFOGeZbkCtnbiP8xpSoQPsR3Sr9EnBNezY+tWmgGIpuFcW6HjLrx0avfXj BZRKkkNFYxnxEG89jBgvTINRHL1z/tOcTdvfnxC1p7dbn3s9GzW83/XhmbvKOd2TZJhp TwR8jsX0fs24kXJl/L0BixM62W223OxOsTHuE/02PE+uTXrbIbz2UZpZhida+WbFcR9+ w50rkf22K9VMgJANeBVqY929f8YcaO6eIvN8sKHiGT6AI3WseFGjXOZ+5eDj69pEbQ/o 27lFBgexpC7U2TV5jICeS2xgrbJkvaGBeoJ5S/K5biOrIy2TkPXgsb8essfh/FCHJlu1 kWww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/uYYGWd17YBdkF6Py+f5um2r5gfWGO1OQXq+XggriIo=; b=Lz4/czoTSYsRD7k8Djc/8frUj0fJXGvyxE61kicHrrdM9l3oTHI2qa8roCLrgnMeIw RSSHRp/R96O2j4b0imbVjW1H3I1VNELr3/LcAr9PlfHkXh1pYqQQfoqeTwHZ8R6IbNix B5Lbu1gRaGuFV7UbtRcB/2AoHk4kzCm66lQCpzhNJESAPT7p+GIBK5p4uYGCpuMVd9h+ ssMv8qkPaQto20x4dEPA6NhY0psmw5dMrFsKypsgHNekj/L4Innmxg8E56LsuHnPIVv3 WfuRDdEjX3TS9e6SMUux/1ifj/eIBWhO0+aRBLqebdGsU3u5unHpZ0NSHIPL38v8Al58 Feog== X-Gm-Message-State: APjAAAU0NhyBEL5oR0AHmISlsLkWWks0b7KU10v+i5IfKkd7lrPHBt5v i3z+sW/UTweEydLHl5dhZrwV7ZJZ X-Google-Smtp-Source: APXvYqwZnlWw7Z0FJq8FPxohRIjbDtpOI/FBk6ixs0ntkabj5LDinHnV8t12l22CbjFjnNkz58vmMg== X-Received: by 2002:adf:fec3:: with SMTP id q3mr56866499wrs.173.1555495790846; Wed, 17 Apr 2019 03:09:50 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 12:09:42 +0200 Message-Id: <20190417100948.8810-2-pbonzini@redhat.com> In-Reply-To: <20190417100948.8810-1-pbonzini@redhat.com> References: <20190417100948.8810-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 17 Apr 2019 10:09:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 17 Apr 2019 10:09:52 +0000 (UTC) for IP:'209.85.221.68' DOMAIN:'mail-wr1-f68.google.com' HELO:'mail-wr1-f68.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.234 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.221.68 mail-wr1-f68.google.com 209.85.221.68 mail-wr1-f68.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 1/7] test_import: remove unnecessary assert 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: , 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Apr 2019 10:09:56 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The git.need-apply property does not exist anymore, the test is passing only because the default passed to get_property is True. Signed-off-by: Paolo Bonzini --- tests/test_import.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_import.py b/tests/test_import.py index b5fe327..8fd706f 100755 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -86,7 +86,6 @@ class ImportTest(PatchewTestCase): sh =3D Message.objects.series_heads() self.assertEqual(len(sh), 1) s =3D sh[0] - self.assertTrue(s.get_property("git.need-apply", True)) self.assertTrue(s.project.name, sp.name) =20 self.cli_import("0020-libvirt.mbox.gz") --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Mar 29 05:14:03 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1555495800; cv=none; d=zoho.com; s=zohoarc; b=hxTp1ieO94US25I1bmfmgyZ2JIW71oNe5cNa0a7UDoWnUpakjjP5PToG/NO0nnujFvHgHcxRH/rdMoPOhw9dQxn+1gM2YoiS4wxUzm+Fm85BzHSbSwcBVncZDIVHbugJQDVo/4Hw+9PWcK42zAedG0KTofK1LAFvF9zXtoDKReM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555495800; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZKwlyl9LZYPRNyDXBsCidq7Y3Z9RFwWYgXTUtc/32cE=; b=mdvGeJ/gGI8CA9xnJdpmDXfM3KjH6+iMd/OP170KNbPybwtkql/+3OCRmCPxdmhMtqOF/jljoU3i/kfrJ86zEsNBsnYiITrwN2G+ks70C+eWF2GQvn4ZwyC9zbO92m0oxw9HF4uo82+5VFOZxPN+DPdfYm2R42IbvYb5ia9E5r0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555495800173793.6431377873535; Wed, 17 Apr 2019 03:10:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E190B308AA12; Wed, 17 Apr 2019 10:09:58 +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 D2CC6600CC; Wed, 17 Apr 2019 10:09:58 +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 C718D41F3D; Wed, 17 Apr 2019 10:09:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HA9vn6013049 for ; Wed, 17 Apr 2019 06:09:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 394F060C67; Wed, 17 Apr 2019 10:09:57 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E34660C64 for ; Wed, 17 Apr 2019 10:09:55 +0000 (UTC) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3B94859FC for ; Wed, 17 Apr 2019 10:09:53 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id h4so31164227wre.7 for ; Wed, 17 Apr 2019 03:09:53 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id c13sm4949719wrx.88.2019.04.17.03.09.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 03:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vrd0e9JLmw/u9gAilOTX9ozl0q0+wqTOs8wpZ89MINE=; b=oldre1xrlUE5DuQOdIqMnjT/hctsoMCbERv2Do0ftLJqtUF4qVG2le9/k6l+eU1UKS +7so2itDcGg3hs5/pcu30SLiefkSHzZX0QUp03x7fEEc23ZL9Rw0GjgKAeqU+QAEgAZf LUlukde4xf1C85MS1Kd73B9gl8tdp8t0cwG5GxCucX/lNCmD/wO17/V0lKg3aqLTKDvV 8USxOVClSyXu3Fw940yy+kGgJhWho+fsPLyyskKttRIHrrhVU5vAXYLiRJA1+03LYfEI 1j/PMwO1aLIgv9tL5GzJHVyeeX6aG5+MylQQ8/SDMf1oJI4nsZuaLqnh5WPel84jM71f Zzqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Vrd0e9JLmw/u9gAilOTX9ozl0q0+wqTOs8wpZ89MINE=; b=nMtLzXeWhH9S/zNrpoCfZEmnX/NkSycvtK2ASOiZvX725xi+t5zWs7T9ldarneercD KDVldeLUhrnlZCAayRHqIbF4IYmUrcaU1/ZLzcFJtlaoLXOIZMLXX5OgzkHagzUlfxKh wpzILUYjyt4flMcMJfsmAIvEo7PHq5GRIgfpPAvzsn1DYIBE2D3MEizzeMOC3EqgkKga aiN6aDXcPRuwZEai3vM6leq2xLCtv/dDsPVtYnPOGMumQQnI1gbZP3NQak9VNEzZPEJZ 4vxkRwNznvZeTQgGqzGFkWf4GM4CP0IG7hug4Db879SXAWzqcWppKmv14waWzUXhjYO3 IRxg== X-Gm-Message-State: APjAAAWxM1rJizk3D7V00hcT9rs8Zkzpi56+NkjSfSLNpbLNbMjlvlsG 5T6anBQeN7Uo9IaZL1Emo7/uW4ql X-Google-Smtp-Source: APXvYqydApoKjXi+ky9RugjP/YBpj86qfpS14kQVKfBWPqG2ISZHVCMzdy/u1HHPkn9CD732Q+ZFtA== X-Received: by 2002:a5d:4a8d:: with SMTP id o13mr43672479wrq.209.1555495791970; Wed, 17 Apr 2019 03:09:51 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 12:09:43 +0200 Message-Id: <20190417100948.8810-3-pbonzini@redhat.com> In-Reply-To: <20190417100948.8810-1-pbonzini@redhat.com> References: <20190417100948.8810-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Apr 2019 10:09:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Apr 2019 10:09:54 +0000 (UTC) for IP:'209.85.221.50' DOMAIN:'mail-wr1-f50.google.com' HELO:'mail-wr1-f50.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.24 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.221.50 mail-wr1-f50.google.com 209.85.221.50 mail-wr1-f50.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 2/7] tags: remove reviewed property 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: , 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 17 Apr 2019 10:09:58 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Just rely on the presence/absence of the reviewers property. Signed-off-by: Paolo Bonzini --- .../0046_reviewed_message_property.py | 29 +++++++++++++++++++ mods/tags.py | 5 ++-- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 api/migrations/0046_reviewed_message_property.py diff --git a/api/migrations/0046_reviewed_message_property.py b/api/migrati= ons/0046_reviewed_message_property.py new file mode 100644 index 0000000..f90a71b --- /dev/null +++ b/api/migrations/0046_reviewed_message_property.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations + +def delete_reviewed(apps, schema_editor): + MessageProperty =3D apps.get_model('api', 'MessageProperty') + MessageProperty.objects.filter(name=3D'reviewed').delete() + +def add_reviewed(apps, schema_editor): + Message =3D apps.get_model('api', 'Message') + MessageProperty =3D apps.get_model('api', 'MessageProperty') + props =3D MessageProperty.objects.filter(name=3D'reviewers') + for p in props: + if p.value: + new_prop =3D MessageProperty(message=3Dp.message, name=3D'revi= ewed', value=3DTrue) + new_prop.save() + +class Migration(migrations.Migration): + + dependencies =3D [ + ('api', '0045_message_maintainers'), + ] + + operations =3D [ + migrations.RunPython(delete_reviewed, + reverse_code=3Dadd_reviewed), + ] diff --git a/mods/tags.py b/mods/tags.py index 1ac27a7..e31db26 100644 --- a/mods/tags.py +++ b/mods/tags.py @@ -99,7 +99,6 @@ series cover letter, patch mail body and their replies. series_reviewers =3D _find_reviewers(series) reviewers =3D reviewers.union(series_reviewers) if num_reviewed =3D=3D series.get_num()[1] or series_reviewers: - series.set_property("reviewed", True) series.set_property("reviewers", list(reviewers)) if updated: emit_event("TagsUpdate", series=3Dseries) @@ -124,8 +123,8 @@ series cover letter, patch mail body and their replies. def prepare_message_hook(self, request, message, detailed): if not message.is_series_head: return - if message.get_property("reviewed"): - reviewers =3D message.get_property("reviewers") + reviewers =3D message.get_property("reviewers", []) + if reviewers: message.status_tags.append({ "title": "Reviewed by " + ", ".join([x for x, y in reviewe= rs]), "type": "success", --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Mar 29 05:14:03 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1555495800; cv=none; d=zoho.com; s=zohoarc; b=b4t0IQPX767bj50Veg1V0UUgiG2Vi5UXW6Nxn6C8fauWgZpvxH5HVnRrBC04zFC1xLy5CUZNANARL9KGFqg2cghd9Ilj3xNEh8gfzd7GzHl2EQOcOzSy6bJCwLCtNObvYZunszWagcUz2YKqPh1mnfYlawcXVdcJMCiuTlVW9lY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555495800; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=H9M0HyhCDLPpb2mR35r8qRSKUPZj2Syo7xyb7OmLahE=; b=UIQK892DKn/4oUV7acmuoUywjYjbJaHz0M5TZlT2SUjdZGoUxu0hMoxOEIO6e5ttTVHmdl4Psez74WrbC5FXXEcSb4zXzk8Cc2MoMaycx0jNTCDbgo7dPb89nkM8MIGS0+oGi02YcZGnVLlf0HKZhUqz689UdWMiCwulWGz+Iwk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555495800149211.70282801034057; Wed, 17 Apr 2019 03:10:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D9D503082128; Wed, 17 Apr 2019 10:09:58 +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 CC57D1001E98; Wed, 17 Apr 2019 10:09:58 +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 C35C0181AC45; Wed, 17 Apr 2019 10:09:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HA9vKu013054 for ; Wed, 17 Apr 2019 06:09:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 81EA260143; Wed, 17 Apr 2019 10:09:57 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A928600CC for ; Wed, 17 Apr 2019 10:09:55 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B5936697A for ; Wed, 17 Apr 2019 10:09:54 +0000 (UTC) Received: by mail-wm1-f48.google.com with SMTP id w15so2844513wmc.3 for ; Wed, 17 Apr 2019 03:09:54 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id c13sm4949719wrx.88.2019.04.17.03.09.52 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 03:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ctdIdb60/pW685uyYUC0xMS8IXid10kUUzixvX9hX/A=; b=PuzOB+HFfrNek8BbE6wu84NIiuSoMOMJI+8vgYQguy0dU3rehAqBD6BhONIMHSw5oE azr9asLmcEzmnSayDiJjP3Lg6efSx6aDdpTFnNPRqNlWUv/O8IaWrcJCTXfPTyxYls/g ghL2+JOczrHk+GrkAy+o9vOmQDVt8wwSwxaTeZo8R9Tgiph1Jtx+iz1PmLoWt0lG0Hbk v4XRHl1wqosV6Nj/qUYTbSho5fpAdSPzmeR5Nc2DY5poHAD+3bGgkK8AM1l5A2vmwZTY kQpWRUHgKI8YCZnZuX9xY1lCP5PD4RBnG9hJ/MSLSvQyta83xZ3e7A0g4bMT9VjhSfSx NZ9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ctdIdb60/pW685uyYUC0xMS8IXid10kUUzixvX9hX/A=; b=Z9m2hB+K48yarvHSBzWwwE5INePdigSJn2T1ZHjX7qS7fsqtIlvya5GuvPwuW+X3Cg yD1R49V9ZoirhKP7j8QTSO5n72d3KXiFJ6G750ezzqbJaaqyVlOCAi/u/qM34Du80xlZ bRHDy9pSPPMJXuILT92FnWzIvnWN+tJxjKqWllUeL/C8/9U5373HCUDLoUX46acH0L6Z inApRcgtSF3JJ8hLNvHloKIXxIRxuuc7V/o0hGAxZS85J2d7D64lgFWa31Symn96FwDu JfUFYMsHaeMFYXh3HfKBdRh12Ka8rZTLVIfYCJAd3RUtQ+aDVE+jsEebjYuF1p+jRwzI 7Vtw== X-Gm-Message-State: APjAAAU9dXoMYMDxZb2drlmpKFtX9Y42rzTDUjJtHz8P1ul+1jKZcc9I 0bRlRt6u1MrS8tmCf2sIt6AJkpsE X-Google-Smtp-Source: APXvYqx1F43RxpxjQ+0BGNNbvNx7rhW/d8s6jqugTu/IhLlG2poRARTH8+/LtSeQ19ffSzkJkQtKBA== X-Received: by 2002:a1c:e085:: with SMTP id x127mr29779641wmg.87.1555495793008; Wed, 17 Apr 2019 03:09:53 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 12:09:44 +0200 Message-Id: <20190417100948.8810-4-pbonzini@redhat.com> In-Reply-To: <20190417100948.8810-1-pbonzini@redhat.com> References: <20190417100948.8810-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 17 Apr 2019 10:09:54 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 17 Apr 2019 10:09:54 +0000 (UTC) for IP:'209.85.128.48' DOMAIN:'mail-wm1-f48.google.com' HELO:'mail-wm1-f48.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.24 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.128.48 mail-wm1-f48.google.com 209.85.128.48 mail-wm1-f48.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 3/7] testing: do not consult the testing.started property 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: , 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 17 Apr 2019 10:09:58 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The right way to check whether to show reset links is to look for results that are in running/success/failure state, similar to what is done for messages. The testing.started property in fact does not exist anymore. Signed-off-by: Paolo Bonzini --- mods/testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/testing.py b/mods/testing.py index 80f5cad..e390e30 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -405,7 +405,7 @@ class TestingModule(PatchewModule): self.check_active_testers(project) =20 if project.maintained_by(request.user) \ - and project.get_property("testing.started"): + and self.get_testing_results(project, ~Q(status=3DResult.P= ENDING)).exists(): project.extra_ops +=3D self._build_reset_ops(project) =20 def get_capability_probes(self, project): --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Mar 29 05:14:03 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1555495802; cv=none; d=zoho.com; s=zohoarc; b=etJ3IILyOyrfSXvN86i4RgqciAYB3SLh2NMT1HpgIzeuAO9E0jPBJ0GO7aVijTBcwgz4Wtjto2X2eYXs+CmSkGH5A18E49G4wKd5OzxTp6Qw3AW31IMJLEm7R0LAKR7DyE3Qg5ovaQNd9sKSVTPwZbUlpPv+HOvS1nctqxQiZuU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555495802; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=DxOZsVwUemIJ5fHMoHKSaVGLt2jzylY4r2JGwgOkhbo=; b=FdmTRpHLRzNUZcbHUMl2wp0y/ix3ON8Sw5Zogf8zESx7VDWNbeazrdGeZQNI7CSV5kXeDdlCri25TkP30a3x8x11Iek67ejwTPAtHQQG+cP4dUqNqD6tpQ/iPSbKV0YALN4+wgnyoRzoMZVlG3XeWMKATAPgBPRvslUiQ+eiDRo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555495802502541.5330051551384; Wed, 17 Apr 2019 03:10:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C46D3092673; Wed, 17 Apr 2019 10:10:01 +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 3F2FD1001E8C; Wed, 17 Apr 2019 10:10:01 +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 2EC3541F3D; Wed, 17 Apr 2019 10:10:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HA9xiM013077 for ; Wed, 17 Apr 2019 06:09:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6516419C71; Wed, 17 Apr 2019 10:09:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EB9619C58 for ; Wed, 17 Apr 2019 10:09:56 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D255536961 for ; Wed, 17 Apr 2019 10:09:55 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id y197so2871699wmd.0 for ; Wed, 17 Apr 2019 03:09:55 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id c13sm4949719wrx.88.2019.04.17.03.09.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 03:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qELwC6ud+IXgGkmmgoYHp+SpyCvRSVl/jDwKyochCyw=; b=kWmWOmeeES43oCDmJwgUj9+pO5NzbuOQCOXENAsWMh1w/DoDjv+00Xd9NI7RkqRAr8 NUPk+V8yoLhy+p7Bd2Z3S0H8pnLR9KekI2yzLF45jv5VNjYPKE5FCi5kvdWov8KyRabB ouKqkAzxx+PnSE6RKnlfOPB6kdIA3cnLANy/BdkdX9Smq1r0jHMcqLSOSBsa8sCxmLBE sN9KkdDAljsQ47hUgprbch2iJ2k9kmFrtFHrJNJu1CFnP6UqGTR0WInIZ9qwKkcLfCEQ LoRjMy4V+1EPNRa0yawS8iLxr94ciux+nab9K3mHbhufdjycEoSHfyE3K2szbWRb/3Vk Ahvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qELwC6ud+IXgGkmmgoYHp+SpyCvRSVl/jDwKyochCyw=; b=p3Zg7fhtEXxQSLlKNh+SEYYmyIF8pLhHQxxu9SBvi2yBJe22KxOyuBYLubHL5c9JtL gEaH+y9tR+93vlj/0ydqXOxdbzE8WcFMeUTW+WKld6z2ySyBCaeq4gvuMGUhBS7PppRj c+MjkZR0RN16qj2aNt0WE9pC6mOwMWXUCr6e2dAmLdfDx/EeuLR8a6vu1lO0GAOmyp4A G01R4zt+OJ79EU8RonzMNHS3LAdiz3knDe0ZBLZcmdJ0uCMdhmVxMAdP5nj9/cefFTlO /hFi32CRsIzB2gg6BzqZDMBPfkIo8s273f3+8mvjT3KfPpuE5f0uNB5EZah37fD/hSv2 81rg== X-Gm-Message-State: APjAAAXmCGHhSNa4Twa8WWDrM8o1dHUCe7dIDckhKx2aCrA8+YO3uW1a JzlFCnMMmSSzGf0AeqJKVFUy4qsb X-Google-Smtp-Source: APXvYqxxMQAxyu8IZHRHxNJjlPoB92TRlXGqzAS7l3IpFzooskvSB5X/vygMSeas+Y2exEJlcvnXVw== X-Received: by 2002:a1c:7f10:: with SMTP id a16mr31333864wmd.30.1555495794267; Wed, 17 Apr 2019 03:09:54 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 12:09:45 +0200 Message-Id: <20190417100948.8810-5-pbonzini@redhat.com> In-Reply-To: <20190417100948.8810-1-pbonzini@redhat.com> References: <20190417100948.8810-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 17 Apr 2019 10:09:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 17 Apr 2019 10:09:56 +0000 (UTC) for IP:'209.85.128.68' DOMAIN:'mail-wm1-f68.google.com' HELO:'mail-wm1-f68.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.244 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_FILL_THIS_FORM_SHORT) 209.85.128.68 mail-wm1-f68.google.com 209.85.128.68 mail-wm1-f68.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 4/7] api, patchew-cli: remove commands to directly access properties 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: , 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 17 Apr 2019 10:10:01 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" set-properties was completely unused; get-project-properties was not needed for the Javascript interface, only for the "project property" command. The Django admin is enough if one needs that kind of fine-grained access. --- api/views.py | 23 -------------------- patchew-cli | 61 ---------------------------------------------------- 2 files changed, 84 deletions(-) diff --git a/api/views.py b/api/views.py index 48a3587..d323ba3 100644 --- a/api/views.py +++ b/api/views.py @@ -111,16 +111,6 @@ class AddProjectView(APILoginRequiredView): p.save() =20 =20 -class GetProjectPropertiesView(APILoginRequiredView): - name =3D "get-project-properties" - - def handle(self, request, project): - po =3D Project.objects.get(name=3Dproject) - if not po.maintained_by(request.user): - raise PermissionDenied("Access denied to this project") - return po.get_properties() - - class UpdateProjectHeadView(APILoginRequiredView): name =3D "update-project-head" allowed_groups =3D ["importers"] @@ -135,19 +125,6 @@ class UpdateProjectHeadView(APILoginRequiredView): return ret =20 =20 -class SetPropertyView(APILoginRequiredView): - name =3D "set-properties" - allowed_groups =3D ["importers"] - - def handle(self, request, project, message_id, properties): - mo =3D Message.objects.filter(project__name=3Dproject, - message_id=3Dmessage_id).first() - if not mo: - raise Http404("Message not found") - for k, v in properties.items(): - mo.set_property(k, v) - - class SetProjectPropertiesView(APILoginRequiredView): name =3D "set-project-properties" allowed_groups =3D ["maintainers"] diff --git a/patchew-cli b/patchew-cli index 7fa7d49..efc6f13 100755 --- a/patchew-cli +++ b/patchew-cli @@ -346,42 +346,10 @@ class ProjectCommand(SubCommand): finally: shutil.rmtree(wd) =20 - def project_property(self, argv): - parser =3D argparse.ArgumentParser() - parser.add_argument("name", help=3D"Name of the project") - parser.add_argument("prop", nargs=3D"?", help=3D"Name of the prope= rty") - parser.add_argument("--delete", "-d", action=3D"store_true", - help=3D"""delete the property with the given n= ame. - Must give a property name""") - parser.add_argument("value", nargs=3D"?", help=3D"Value of the pro= perty to set") - args =3D parser.parse_args(argv) - if not args.value and not args.delete: - # Get property and print them or the specified one - r =3D self.api_do("get-project-properties", - project=3Dargs.name) - if not args.prop: - for k, v in iter(r.items()) if r else []: - print(k, v) - else: - if r and args.prop in r: - print(args.prop, r[args.prop]) - else: - print("Property Not found:", args.prop) - if r and list(r.keys()): - print("There are:", ", ".join(list(r.keys()))) - else: - if args.delete: - args.value =3D None - # Set property - self.api_do("set-project-properties", project=3Dargs.name, - properties=3D{args.prop: args.value}) - def do(self, args, argv): if argv: if argv[0] =3D=3D "add": return self.add_project(argv[1:]) - elif argv[0] =3D=3D "property": - return self.project_property(argv[1:]) elif argv[0] =3D=3D "info": return self.show_project(argv[1:]) elif argv[0] =3D=3D "update": @@ -420,35 +388,6 @@ class UntestCommand(SubCommand): self.api_do("untest", terms=3Dargs.term) return 0 =20 -class SetPropertyCommand(SubCommand): - name =3D "set-property" - want_argv =3D True - - def arguments(self, parser): - parser.add_argument("--project", "-p", required=3DTrue, - help=3D"Project name") - parser.add_argument("--message-id", "-m", required=3DTrue, - help=3D"Project name") - parser.add_argument("--file", action=3D"store_true", - help=3D"Read property values from given file") - parser.add_argument("--json", action=3D"store_true", - help=3D"Read property values as json") - - def do(self, args, argv): - if not argv: - return 0 - if len(argv) % 2: - print("Name and value unpaired:", argv[-1]) - props =3D dict(list(zip(argv[::2], argv[1::2]))) - if args.file: - props =3D dict([(k, open(v, "r").read()) for k, v in props.ite= ms()]) - if args.json: - props =3D dict([(k, json.loads(v)) for k, v in props.items()]) - self.api_do("set-properties", project=3Dargs.project, - message_id=3Dargs.message_id, - properties=3Dprops) - return 0 - class TesterCommand(SubCommand): name =3D "tester" want_argv =3D True --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Mar 29 05:14:03 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1555495800; cv=none; d=zoho.com; s=zohoarc; b=Zw8t/mfh+DiSnxqcldSXDl4sLcH0Fm/DQPiSKOb6p1Kf2qVjhOsVwGRti0Z2claXNuLSMwnNioHP7G7i6IdQp8hBiMZ1BWQ2tTXVZzUsQKo55Us9+OHvEc3n+FOuSI3qiRnq7irXVMlewZBCsej/Qz6RM68CxiJ5VQQMP2U6FfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555495800; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=XHB9cfwmtrvGcZR8w5+WDUMyygIJnDDC/cSd3/lSaTU=; b=LEXPU/A1d23wVI5nMC6067ht6cqKMblEg1NegJCl4BWHxMggF76KNMK27l8nv//9QE3/om90IV0J89zmaTvaPfBDLCG7PPbUc0xGNLKtf4JmgToIhJx9RctAaox6ZRcEmWjRNcXYLVFzpz73+3brk4PYceVO8BZXEzykPC8QycI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555495800186588.8083880501657; Wed, 17 Apr 2019 03:10:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05A9459464; Wed, 17 Apr 2019 10:09:59 +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 EEF485C224; Wed, 17 Apr 2019 10:09:58 +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 E4488181AC45; Wed, 17 Apr 2019 10:09:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HA9vP3013059 for ; Wed, 17 Apr 2019 06:09:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id ACD8C60143; Wed, 17 Apr 2019 10:09:57 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A451A600CC for ; Wed, 17 Apr 2019 10:09:57 +0000 (UTC) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B550085528 for ; Wed, 17 Apr 2019 10:09:56 +0000 (UTC) Received: by mail-wm1-f53.google.com with SMTP id c1so2660998wml.4 for ; Wed, 17 Apr 2019 03:09:56 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id c13sm4949719wrx.88.2019.04.17.03.09.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 03:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X5tkjrjE3hnkAzqtQEFGFyC1kYC5H+QXI60Qf+7hGqg=; b=o8SGM7uVUHXzbGFwi2my8mKkmWMkAnA1r3gAda5jYZIq0jTX6NAapIc/XEbfgtKIMb aN6JeqN8D360TAKTSIN7Mysw0dpoR9F+Fj3eWq1sFiqMVI/uf6t9WHaTM4Jghb+ZxzO/ 8McU/t/v/AwpQGP5xrTGwFjlkCPUdUiMrVqvMGJLoDhLNPpfOVyamdO8/48Z56JOFsxc /3ExL55dB37+etipkbbXJz5602LFmTZkJwih3JPzZdDedNcn8BUVuLsJTeUtwfPOLKUP L0O09R36ZO9VXIrbYeMHQq6NTQXOgwB35g3ziXHC1+ZMFP9iBNWvfamMXo83JIGK6lFs ILug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=X5tkjrjE3hnkAzqtQEFGFyC1kYC5H+QXI60Qf+7hGqg=; b=fqT2rJMf6NvYG14vSHXd/dk0Wv0DQ2ZltV6aIr1HegwTCoTF8ELWFUR7GyIHwSHBGg fN7JtMp8M/wlaEgMuJPn16nOUjocjV9Zk4riPW3E5i43Fi0GfLlV7F+r/NQ7np2MZZNG EJCeXGy3hKEVE+61YJe4MU+fDIVpHG6UhSJVWVd2Grrc+bUIUtXQocB9YUOQ6F/zHhF/ g6OGgsCTwI/+gWOseCFSDoSj5W9lVbSZr77TA7uHcsaacmwSdXeroAxY3mughH8UTuSc yphKEC3DyZvGqOVg4N0doLmVkBOXBWhRByZKYtxuNZp4TM0AwZEOjZ2tXFqszC9FWmGn NX4Q== X-Gm-Message-State: APjAAAXFtH3Vl59Y7k/uGJxw9IjLRF9hJfXbcLQcPsD1VyiGijQIjR+Z aYoMcNzxfX1/h76x07GIaxB63Qlw X-Google-Smtp-Source: APXvYqx60/TOgwSF2k7R5fLxccfbSZ6gbueoxEu9AYSTKYQ9qiVvmbmjk6uC9luytF/bYxwoovVj8Q== X-Received: by 2002:a1c:35c3:: with SMTP id c186mr30130710wma.135.1555495795059; Wed, 17 Apr 2019 03:09:55 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 12:09:46 +0200 Message-Id: <20190417100948.8810-6-pbonzini@redhat.com> In-Reply-To: <20190417100948.8810-1-pbonzini@redhat.com> References: <20190417100948.8810-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 17 Apr 2019 10:09:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 17 Apr 2019 10:09:57 +0000 (UTC) for IP:'209.85.128.53' DOMAIN:'mail-wm1-f53.google.com' HELO:'mail-wm1-f53.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.234 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.128.53 mail-wm1-f53.google.com 209.85.128.53 mail-wm1-f53.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 5/7] tests: remove case insensitive tags test 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: , 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 17 Apr 2019 10:09:59 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" I am not sure what this is testing, and it is the only user of properties s= earch. Signed-off-by: Paolo Bonzini --- tests/data/0002-unusual-cased-tags.mbox.gz | Bin 2166 -> 0 bytes tests/test_import.py | 11 ----------- 2 files changed, 11 deletions(-) delete mode 100644 tests/data/0002-unusual-cased-tags.mbox.gz diff --git a/tests/data/0002-unusual-cased-tags.mbox.gz b/tests/data/0002-u= nusual-cased-tags.mbox.gz deleted file mode 100644 index 3968ed24c891b6b9f07e4837421280f1efa70e87..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2166 zcmV-+2#NO}iwFpRGICb{128Z!GA(s(b#rxLY%OD9b7f>LbYW+6E^T6OcmSnX`*Y$r z68<^C%Wj(Ub;cz-?fYgr^xzj}kZYLpoJ?I#%wePf;cyPQPbE-xUHX-+0JX zpHFNE_{3!~@DY5albi(fiAKcZdF)eh6!Ul-=3DTZvkQoS*osEs?lhwdK+8; z2~8&~%V+?C#sN*C3gAbK#u;IW{cOQAhmuzvdXwqu+VJ7F^gEz22FDXhMk${hzKplF z#P4tezYP%HL5S-QBPKGTF6S_uEKg(7ceBujgTJr!w-q2ZNXKAHKUB7d_uD}|RKc6W zWTr|05x7W#sO(Ky7J_p<=3DsUmy(9Kp`Yg?VRZW^Z5GE}Q$v@NUC>@>A@^Br9Ccpr>5 z{3nkQVZ8;qWj9;4t^?89ng*4AcTj!dCHLJZ06ccB9d9f^|%yXZbrD6|K=3D*)ZDL&jdblC*O{+twT4H8U3vai=3DeDC8I*A~ zA-~_1L9H>`D%Dq_(%QSD>QaxnF`?2Y^m;4E!fBDX6C!*!jJ3BHt%hn?54PFvw2d+yF9Ul^HdZxewTh6O8*=3D&i6~EiBRuV&+ zLf9f=3DB z#TmJCj>++vV>Daj{PdbQ7sn0DgbI%9_zygmiK^6d!xz*FK20+=3DVm?wbr1Wb}1@dnR z@AFjjkswBFRxRzGttjcFd!lLWo@QC^l)XVt5jJZLn^wZsh8lv4{PTWr`htJlK+OeB z#awI|3_?F4dXwmlh8nx`Ef6I#t(K}II*kGwboj?{tsw83s#z}|n-LY&kT)GY5@Mhk zW=3DFGLuZ8BK7J8}N?RxG6K8F+&^rFZVxufrF5T%RA+wc;$jeL!FU^I)nQ$jcLmK2h_DXr@Z5+)3BT86A5g8hT$dh6d3eds{rSSke zk-nDbPvjbFa)QMC0ZX0n7~N12dtK?L=3Dv_c@OSFqEM!AxB7O7sVQa4W-g~0n**D8P8SN0C%=3DZxDMyYqquHhllLC;>Xm*CrQE z9H)MWz%CrvW#26&>R~pCHjLL73M8xG>KASty@>aMM#(P8?>US|m}Ifs`8#0A4=3Df(> zpF(Q`t5e^G-{}(`hClLX1P6~(d~7!BJ{(6LaxsT<1dO?GP>hb)*o~N5iYR-9T@R0I zj~n*(;o64K;wz!dTo{N7ENG;5hi} z^!i=3D-(}(vT4HIeg{Ymlo-0P9E6BIbTb$S4|-7CNq=3DXZ^vJ~S{EJX4yjVY9KYPCl?S z7sScjEEnjZq6|VNV2Zb*ETqWQNIi7s)1rsn2qrwpk%d^yG8iEeavCLFWN40eE5Ro; z3z0Du8VM>t#NdKJuyB#AZFwj2g7j&a(y^rXw1Sr{H;TkQ>I8f#%odfV1gX513RU_< z;j5p{lZ+2TSA@d_0SZ80T|dil;anQRFqjXR5C3r=3DB#-08PM$U0Oj#0W#wJt+=3DIl7%$1xsPYSn#c%H5V0q+KCZMG4qwglor`a<{(AuD5GeVOaDtFip2< z>Md3Et#;7Tnz;9CEz^`i?AE5#YPDB19vuN`?BjMVe{fJH4nL7O)DE#i_|#B&`9yvk z`Pi%3YQm3lS#Ybdh}}eld_zEap^*miE9L~Zbl+RNM=3D0uIjV*?m>qX1=3Dm5p7hNKu#D z-&Pg(;iCJgDg~dyV20Y{gCK9WSlVe&h2{GG;~2RuvQ^vL)FFD*xC?Yn4Av z@BZu$Zi~bXkFU;$c%#CLRJFQXEC1@hLOBg`@$yh8DN&vc7*Yll_v6w(+`gDk;n(_F sL0bH;)4Ouwe@Zd8P0s(?2mz1KQV4+r#ZWt{rYOq)0Uh~Y*gF&e0E}xe*#H0l diff --git a/tests/test_import.py b/tests/test_import.py index 8fd706f..9e870e8 100755 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -33,17 +33,6 @@ class ImportTest(PatchewTestCase): a =3D '[Qemu-devel] [PATCH] quorum: Only compile when supported\n'= * 2 self.check_cli(["search"], stdout=3Da.strip()) =20 - def test_case_insensitive(self): - self.cli_import("0002-unusual-cased-tags.mbox.gz") - a, b =3D self.check_cli(["search", "-r", "-o", "subject,properties= "]) - ao =3D json.loads(a)[0] - self.assertEqual(["Fam Zheng", "famz@redhat.com"], - ao["properties"]["reviewers"][0]) - self.assertIn('Reviewed-By: Fam Zheng ', - ao["properties"]["tags"]) - self.assertIn('tESTed-bY: Fam Zheng ', - ao["properties"]["tags"]) - def test_non_utf_8(self): self.cli_import("0005-non-utf-8.mbox.gz") =20 --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Mar 29 05:14:03 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1555495804; cv=none; d=zoho.com; s=zohoarc; b=GaCjS5Jdzf/E77bhvYjcUj0FUhJaKYMQGjf8gR1u6muR2bFRvCU20xNI5VU5fGiqRnoLy70hzJG6fVnDzeVg3ctddTC3GCcy9wZLEhxuXWHJjXPsVkhtmvJP8GbPKiiV3UscLOuutYQPcOsS2K4nXkabqLy/oHN/16rduVzhQm4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555495804; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=6TK5teC6x07XFur4IciLjQyaURBl2Riewkc8ruajkHs=; b=avKEIed2JdMqGvwPp33yoGhuUXrbknM9kvsffnpA/iIT2yuBVnIk4YYd6niBWg1SujMwSFsLkdZI/Qych11t3ivDpq7SZK1qQK9uYjGseVJZXs5s599hLx6oZ/Ftm/D0N0C345BnE5x6n8fvAfS1IN0bOmSivt7LQiYw7tHcuNk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555495804603950.3878929437622; Wed, 17 Apr 2019 03:10:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5D0028762D; Wed, 17 Apr 2019 10:10:03 +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 4AAE36014E; Wed, 17 Apr 2019 10:10:03 +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 2FF8D41F3E; Wed, 17 Apr 2019 10:10:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HAA1Ja013089 for ; Wed, 17 Apr 2019 06:10:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 34A475C22C; Wed, 17 Apr 2019 10:10:01 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D16E5C224 for ; Wed, 17 Apr 2019 10:09:59 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7B01308624C for ; Wed, 17 Apr 2019 10:09:57 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id y197so2871858wmd.0 for ; Wed, 17 Apr 2019 03:09:57 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id c13sm4949719wrx.88.2019.04.17.03.09.55 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 03:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BOyXiSSA3dRy2VgcoREXsmS8OHiZvBZVrUc+8GXT+LQ=; b=gT5owW3NMKgMdPCx1KCKCnci5LqsoHbmHJgP8vACwOSb2UMxVOxbHhHbzUrGVaXmqp umYQKq17Ggch3+pg1d13pRu4OKfAY6BvtMQhhKfivE8Ava5F2Iw9OUduYfCB7akCF20G P9YGZCO92y/h1ZQk1J50tR0ZwTN32/Tz9CcTgXw2WiohTvkv5zTU+yOpZaLxLr1w8cyN 7n9lsjh11VIplD6hq1rRWC7MHQg99Nl3BdJxETMGz/AWNYTZyYo9Jw+HXJOKoKQr1/Vl 3KU6qR1xlUIQje/d6YmurM46/82lYnCepFCLEeiUDuDBSmuFPwI4Sl8jSmgAOQA2WnUE VqPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BOyXiSSA3dRy2VgcoREXsmS8OHiZvBZVrUc+8GXT+LQ=; b=A1DAwZfyRiINMBYOtqdnVsuuebvhSd451xvWyqRpO6RkbbrP0fVrS/IHuWxCl+MNQS at87CgVb1nhVts7T4yZhx0HNCNzHsjFh2hyL+Om+WoDAUSm6HRZLJy38BWYSIYE8UYSB nklht332qVSjHkoxIJaa5FkjKM79rAZVR98ib9kSd9rVLaO4ELUXIqysU2r70vKM8qLb msbGMOxSO7Wl24pZaLB92rrS0tBrUKBy69Z2wHGT4zGWtrltbUv9hQ6Kj3fEdymWpggg dQbMY726sbe0sGAIkg+E9eCndu2W7ycb0xbFjfo8YV3Gps+hMp1EMd2Jbsza2yPO3rhh yRBg== X-Gm-Message-State: APjAAAUuzBgarONMYy6QAngio8FRsttvqyzMgQ8ZP3et1EkqvUPPTcXh YKJNYp1m2pzaMXVtYU8y++yPtah9 X-Google-Smtp-Source: APXvYqzy53kpSGWb+OqWfqwb0/8SVRzP6jjVs3+L1UkYRoKmM5TUGf0vvKOtH6SMtAYrIA1CUt5LFA== X-Received: by 2002:a1c:e0d6:: with SMTP id x205mr31509841wmg.28.1555495796170; Wed, 17 Apr 2019 03:09:56 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 12:09:47 +0200 Message-Id: <20190417100948.8810-7-pbonzini@redhat.com> In-Reply-To: <20190417100948.8810-1-pbonzini@redhat.com> References: <20190417100948.8810-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 17 Apr 2019 10:09:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 17 Apr 2019 10:09:58 +0000 (UTC) for IP:'209.85.128.54' DOMAIN:'mail-wm1-f54.google.com' HELO:'mail-wm1-f54.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.24 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.128.54 mail-wm1-f54.google.com 209.85.128.54 mail-wm1-f54.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 6/7] git: do not return properties from applier-get 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: , 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 17 Apr 2019 10:10:03 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Properties that are of interest to the applier are already returned directly in the applier-get reply; the applier is only using properties to retrieve tags from old servers that do not have commit 32bddb4 ("models: convert tags from property to field", 2018-10-30). It is not needed anymore, remove it to hide properties from the API. Signed-off-by: Paolo Bonzini --- api/views.py | 2 -- mods/git.py | 4 +++- patchew-cli | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/api/views.py b/api/views.py index d323ba3..22d5cb5 100644 --- a/api/views.py +++ b/api/views.py @@ -180,8 +180,6 @@ def prepare_series(request, s, fields=3DNone): r["message-id"] =3D s.message_id if want_field("patches"): r["patches"] =3D [prepare_patch(x) for x in s.get_patches()] - if want_field("properties"): - r["properties"] =3D get_properties(s) if want_field("tags"): r["tags"] =3D s.tags if want_field("is_complete"): diff --git a/mods/git.py b/mods/git.py index d0b1f87..e91ca8c 100644 --- a/mods/git.py +++ b/mods/git.py @@ -257,13 +257,15 @@ class ApplierGetView(APILoginRequiredView): return None =20 response =3D prepare_series(request, m, fields=3D["project", "mess= age-id", "patches", - "properties", "tags"= ]) + "tags"]) =20 po =3D m.project for prop in ["git.push_to", "git.public_repo", "git.url_template"]: if po.get_property(prop): response[prop] =3D po.get_property(prop) base =3D _instance.get_base(m) + # For backwards compatibility with old clients + response["properties"] =3D {} if base: response["git.repo"] =3D base.data["repo"] response["git.base"] =3D base.data["tag"] diff --git a/patchew-cli b/patchew-cli index efc6f13..bfff69c 100755 --- a/patchew-cli +++ b/patchew-cli @@ -681,9 +681,7 @@ class ApplyCommand(SubCommand): subprocess.check_output(["git", "log", "-n", "1", "--format=3D%b"], cwd=3Drepo)= \ .decode('utf-8').splitlines() - # old servers do not have "tags" directly in the response - for t in set(p["properties"].get("tags", []) + p.get("tags", [= ]) + \ - s["properties"].get("tags", []) + s.get("tags", [= ])): + for t in set(p.get("tags", []) + s.get("tags", [])): if t in commit_message_lines: continue filter_cmd +=3D "echo '%s';" % t --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Mar 29 05:14:03 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; dkim=fail; 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 ARC-Seal: i=1; a=rsa-sha256; t=1555495807; cv=none; d=zoho.com; s=zohoarc; b=R6COyi/cNVtI6Mb1mAf2RuKwPkg7oJAdeMGTqKnLqljNBv8wFpVcXQjd9Rfb3EYvmMU0fCPk0AzAwNHCDOLz0WoWX9YDG2wcRUnL0bQUdCfJvYzBkEEsDKiJLQwI8kA7Q1vYe8tuF/iup/uIHoU406pSPkPHYiSOxTKchbS0Ea8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555495807; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=81Cmz6QK54GbQpFeIfSpl065G2QhWKnkC2Ic7eKQMAM=; b=AvXhPecySHsoRlkHFJjiCHR+N/jn9DAiNbiCR8uThD8TKjTAIzzJoCmBsDtajQEXgGT2kpd+o4ub9UYg7wHZ0wggpnUXCsTJu3paSgIFVEJ9KttlNl7IJFPOyPZHEuXdb+MHDDjn/MufyPImGoz8h1HhJdCojjoEmiHw+EMDKTc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555495807718309.81932091360886; Wed, 17 Apr 2019 03:10:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 804EE66991; Wed, 17 Apr 2019 10:10:06 +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 718C460143; Wed, 17 Apr 2019 10:10:06 +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 64B1A181AC45; Wed, 17 Apr 2019 10:10:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HAA5Ra013107 for ; Wed, 17 Apr 2019 06:10:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id CE4511001E9F; Wed, 17 Apr 2019 10:10:05 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4E091001E8C for ; Wed, 17 Apr 2019 10:10:05 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 97433C049D7C for ; Wed, 17 Apr 2019 10:09:58 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id c1so2661095wml.4 for ; Wed, 17 Apr 2019 03:09:58 -0700 (PDT) Received: from donizetti.redhat.com ([2001:b07:6468:f312:ac27:aac4:c65c:6eb]) by smtp.gmail.com with ESMTPSA id c13sm4949719wrx.88.2019.04.17.03.09.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 03:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z8VpLMMSCbQWtvtNJVfCHemDzBifOTWUFjp6x9Uxd+s=; b=kgGce+oPpUmtsSm14jogQcKnIotSxSP1g3HpZQOz5BNOr964mUIdiIjbqx8uEaTiPn voWOAdJ4FjsraCZwknpkJ48WLVSwmi5MrYvvZ7tIVHbXIZmfASuF/463R5TgvNXjGfhh QkLwicnTRVCYuOxHyqiMuNMuHZ5lDF12MizM2mBS6uKspHplI9+Qa8bDGms0ScRvvcTG bkZkP59fzsDGQ/Di/mC6OZfr+qMeg5B9yC2BJNo6nJlWBm53A1x1bSqqA0UVvZKnTn70 0CLSAZVuxWfq4AcMB0ciKYmJagqHe+19XzJBGJSuDQlJYw4wLUZrTWVuJoSAp7JINBn6 Tqeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Z8VpLMMSCbQWtvtNJVfCHemDzBifOTWUFjp6x9Uxd+s=; b=f5S2/2bp46UmyWhhvGqZIYPoSR5qLMPvz8tMiKulh05YF/CwW3hGDOrjZ9HpZzEuRF Kcdodk+EWWGpEO9gqmCKNwgEzWjPrvczJX6oxdGx4e1Yi1JL+FcIzxr8aEeAcEFH6qP8 XzD2TTLewHgUlGC6akwaAg4Refu6ZVBF1xJvc4lUWHZ+KPEvN8LH/roo5mXHdgXXDFBY RggFoi4WqJSCQ/U2R+d24cSx9TR4mrWP856IvGhi3RhpQ/ymxHhOUAA5fKdTKTIeNPPJ ncqqA5Z0yXFxGolococ+HdpTYCQbtIwOlA1pWPOepecVFnLo/h+Zuo8pRNAxPE+f03OS bJew== X-Gm-Message-State: APjAAAVIk4hUGMku/HoWK58A7VGffBqZEQ1hrdAWY/J86NuK51VmBZNn vs1/a1jfu+59KU4MWRTq39FIPokm X-Google-Smtp-Source: APXvYqyc9nz8zJGZOCtTnsmMnMv+oASXPeuAt9dTeZKGDPjRZw0zi8lYqpLLpdgTsbievKg0CSGkhQ== X-Received: by 2002:a1c:988d:: with SMTP id a135mr32646259wme.24.1555495796966; Wed, 17 Apr 2019 03:09:56 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Wed, 17 Apr 2019 12:09:48 +0200 Message-Id: <20190417100948.8810-8-pbonzini@redhat.com> In-Reply-To: <20190417100948.8810-1-pbonzini@redhat.com> References: <20190417100948.8810-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 17 Apr 2019 10:09:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 17 Apr 2019 10:09:58 +0000 (UTC) for IP:'209.85.128.54' DOMAIN:'mail-wm1-f54.google.com' HELO:'mail-wm1-f54.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.25 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS, T_FILL_THIS_FORM_SHORT) 209.85.128.54 mail-wm1-f54.google.com 209.85.128.54 mail-wm1-f54.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 7/7] mods: refactor extraction of properties into a dictionary 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: , 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 17 Apr 2019 10:10:06 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Both the email and testing modules have code to extract the configuration from project properties into a dictionary. Generalize that code, using the project_property_schema to drive the conversion. This will be useful in order to support YAML-based configuration and also to de-JSONify project properties. --- mod.py | 34 ++++++++++++++++++++++++++++++++++ mods/email.py | 14 +------------- mods/testing.py | 13 +------------ 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/mod.py b/mod.py index 696dda1..3481a73 100644 --- a/mod.py +++ b/mod.py @@ -152,6 +152,40 @@ class PatchewModule(object): tmpl +=3D self._render_template(request, project, TMPL_END) return tmpl =20 + def _get_map_scm(self, project, prop_name, scm): + prefix =3D prop_name + "." + result =3D {} + for p, v in project.get_properties().items(): + if not p.startswith(prefix): + continue + name =3D p[len(prefix):] + name =3D name[:name.rfind(".")] + if name in result: + continue + assert scm.item.name =3D=3D '{name}' + value =3D self._get_one(project, prefix + name, scm.item) + if isinstance(value, dict): + value["name"] =3D name + result[name] =3D value + return result + + def _get_one(self, project, prop_name, scm): + if type(scm) =3D=3D MapSchema: + return self._get_map_scm(project, prop_name, scm) + elif type(scm) =3D=3D ArraySchema: + prefix =3D prop_name + "." + result =3D {} + for i in scm.members: + assert i.name !=3D '{name}' + result[i.name] =3D self._get_one(project, prefix + i.name,= i) + return result + else: + return project.get_property(prop_name) + + def get_module_properties(self, project): + scm =3D self.project_property_schema + return self._get_one(project, scm.name, scm) + _loaded_modules =3D {} =20 def _module_init_config(cls): diff --git a/mods/email.py b/mods/email.py index 91c7d28..7ee7724 100644 --- a/mods/email.py +++ b/mods/email.py @@ -188,19 +188,7 @@ Email information is configured in "INI" style: return "<%s@patchew.org>" % uuid.uuid1() =20 def get_notifications(self, project): - ret =3D {} - for k, v in project.get_properties().items(): - if not k.startswith("email.notifications."): - continue - tn =3D k[len("email.notifications."):] - if "." not in tn: - continue - an =3D tn[tn.find(".") + 1:] - tn =3D tn[:tn.find(".")] - ret.setdefault(tn, {}) - ret[tn][an] =3D v - ret[tn]["name"] =3D tn - return ret + return self.get_module_properties(project)["notifications"] =20 def on_event(self, event, **params): class EmailCancelled(Exception): diff --git a/mods/testing.py b/mods/testing.py index e390e30..05493f0 100644 --- a/mods/testing.py +++ b/mods/testing.py @@ -298,18 +298,7 @@ class TestingModule(PatchewModule): ret =3D {} if isinstance(obj, Message): obj =3D obj.project - for k, v in obj.get_properties().items(): - if not k.startswith("testing.tests."): - continue - tn =3D k[len("testing.tests."):] - if "." not in tn: - continue - an =3D tn[tn.find(".") + 1:] - tn =3D tn[:tn.find(".")] - ret.setdefault(tn, {}) - ret[tn][an] =3D v - ret[tn]["name"] =3D tn - return ret + return self.get_module_properties(obj)["tests"] =20 def _build_reset_ops(self, obj): if isinstance(obj, Message): --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel