From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9399BA0C41 for ; Thu, 30 Sep 2021 11:15:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D18140DDA; Thu, 30 Sep 2021 11:15:35 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 7FF274067E for ; Thu, 30 Sep 2021 11:15:34 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 260F45C01B7; Thu, 30 Sep 2021 05:15:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 30 Sep 2021 05:15:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= LeLWBlQyIM2QrTh3i22bZTDi0MRpBG+4qp+fz19yXYU=; b=Umy9Gl+V9i8nfERw 5L/o8HNhFLs9VX17x8O1D6D4WAVipA1x69H28Ojae4ltbSuq4yfEOQ+UTbj/ipdO TUbrbydt+Inp1deboiJP4FhHrmp5WDoq0JD/FtCeky9zX0bEthRoy3z793PjdOkY An0g2sBqwZn6Xx5J8r8ni3Qo11DttTs+R0mxpB+0rrRX+7DpHhTcLILcNabuYraM o9SxyZTMs3czcccISZQv5B+f8TRvsGIvDVAbrALHre0wCXvMts0qYU8ajMpzpwro EqVjRvfEdtWsyCjGHnWwUWpl7vOpndqT16MW+zhnHMzOJKDRT6HmgC8pJvoa9wV0 vyEhrw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=LeLWBlQyIM2QrTh3i22bZTDi0MRpBG+4qp+fz19yX YU=; b=MOiGLEM2U+4nb0rzj3y8NErPPZJYBwawUnThv1Yd86n2djtADbEKcCUmd ThQq8jelosLc7Rjd8N5tlZtQ40EQUxNcmBWnAKsio/FneORqfjdV92TprDhCqtCI mZTJ2DeS4euSw0ipzM12MHKZENoA4LDzL3QhHqYpDFI4AUATMdV1J+GKboLvlY+n nuf+Peec6e/8xmXXf4ABHUU+3hCmHwyzetHLqxf6nStUCidF8qqfggjFiAc2qLTA f6sAxbsg1VJ7AXF9hRHyh13/SPaLrKIpgZOVErK+s3XICx+72uJUR7pz0o6WStX4 P/FaROGoBaTJqsp9Nft/2NEgfvFwg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekgedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkjghfggfgtgesthfure dttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeffvedugfekledtveetvd ehgeeltedvvdeifeeiiedtkeegveekffeihfdugfekvdenucffohhmrghinhepghhithhh uhgsrdgtohhmpdhprghttghhrdhphienucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Sep 2021 05:15:30 -0400 (EDT) From: Thomas Monjalon To: alialnu@nvidia.com Cc: ci@dpdk.org, jerinj@marvell.com, ferruh.yigit@intel.com, david.marchand@redhat.com, juraj.linkes@pantheon.tech Date: Thu, 30 Sep 2021 11:15:29 +0200 Message-ID: <24744594.yUaU8azXQc@thomas> In-Reply-To: <20210921143542.4412-6-alialnu@nvidia.com> References: <20210906154537.1299-1-alialnu@nvidia.com> <20210921143542.4412-1-alialnu@nvidia.com> <20210921143542.4412-6-alialnu@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-ci] [PATCH v2 05/10] tools: add functionality for setting pw delegates X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org Sender: "ci" 21/09/2021 16:35, alialnu@nvidia.com: > From: Ali Alnubani > > A new command was added to set patch delegates in Patchwork > based on the emails found in DPDK's MAINTAINERS file. > > Example usage: > $ export MAINTAINERS_FILE_PATH=/path/to/dpdk/MAINTAINERS > $ ./pw_maintainers_cli.py --type series set_pw_delegate SERIES_ID > > Signed-off-by: Ali Alnubani > --- > + def set_delegate(self, patch_list, delegate): > + """Set the delegate for a patch. > + Only tries to set a delegate for patches that don't have > + one set already. I'm not sure we should skip patches which are already delegated. If we use the command to explicitly delegate the patch, we should do it, right? The skip logic may be implemented at a higher level in the CI. > + Reference: > + https://github.com/getpatchwork/git-pw/blob/76b79097dc0a57c89b45dd53d9cacb7ff7b31bb2/git_pw/patch.py#L167 > + """ > + users = api.index('users', [('q', delegate)]) > + if len(users) != 1: > + # Zero or multiple users found > + print('Cannot choose a Patchwork user to delegate to from ' > + 'user list ({}). Skipping..'.format(users)) > + return > + for patch in patch_list: > + if patch['delegate']: > + print('Patch {} is already delegated to {}. ' > + 'Skipping..'.format( > + patch['id'], patch['delegate']['email'])) > + continue > + print("Delegating patch {} to {}.".format( > + patch['id'], users[0]['email'])) > + _ = api.update( > + 'patches', patch['id'], [('delegate', users[0]['id'])])