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 BA03C42350; Fri, 13 Oct 2023 07:55:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 992A6402CC; Fri, 13 Oct 2023 07:55:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 91BEB402AE for ; Fri, 13 Oct 2023 07:55:11 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39CMtxrO005026; Thu, 12 Oct 2023 22:55:10 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tpt1a93me-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Oct 2023 22:55:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T5Mps0ZrxJc1Wl8F0z/Y72Vn+Srhm47dQ6UL5FNKxlRv5HePMLTJE/fX4ZMYK0SvoH61zhoGyyEihD6hYkPfQSoL/YjP2/LlQOEkqI2iwG+APGHeC5hT6+PkgfxfvWRmBL3PukEB7JcqEElnMrxqNJHlIq5LgRBHvIUxjjJrE9ian4umNt+Fb5Vfb4n0NMdp4KJ557G08REXIXVdYjEsasY7Zqy+Cg1dZY+cDb++GSnM72wQxHQDt9HydtwF5K9uTkyBKe6T+GX1bVgNBG1x9P+Fc1ZvL6bikV4zf6SSajk7jl4fGnCtvCqQigqQG8bHm1gzkS1ZldAjMPVwikiH4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WrfLXG+HznvOsMb+/u3wLX9k486pFaSAZh6o/2IEAgs=; b=M+E62Vf0yHfpc2Kd06dCIxhCo9uD7uGo6vq7juTibOHHdiDODgAp8S56uiezRZH3MoUiOp5qE9j1SK+0bKxDy2U/USi/kOZJUks4deY3XmrsBMM/STBqtpEelOwHJBMrRJQJc59C45EaNn1dfcPx4J/0c0+Qu1ikVmvMkULFhRX6OHOWFB9d9W8MsCznQodTWVyl8LCGcqFMAEVsLSeuL3ibLLL5ko9Y/pLP5dJspV1G9yvpiy9jdwCXEdLerNwYI6tDNqtpx7tnWb15cQ9t21l6UIY672der46MkiosuD7AZrduQQdDwwTtRL3oFjexoFWMX5FbDscRUKImqRb3FA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WrfLXG+HznvOsMb+/u3wLX9k486pFaSAZh6o/2IEAgs=; b=cdP3eqlpVj0P+wJRSUq5kklITBoeBDxJuEhvPZX5dhEaPpCWUjfmtdsOt6rRE+lurxs6bFRgudRUalSh0UIe/E05lUxmD9D2T/uoq+/5HyQfup307hhFfNWhNpevNx4z0SWTqoUPHgMXQuQ5znA2bjPPyA81toprwgvdzK3RIU4= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by MW3PR18MB3673.namprd18.prod.outlook.com (2603:10b6:303:57::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.45; Fri, 13 Oct 2023 05:55:07 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::b37e:6093:1c74:6f35]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::b37e:6093:1c74:6f35%5]) with mapi id 15.20.6863.043; Fri, 13 Oct 2023 05:55:07 +0000 From: Pavan Nikhilesh Bhagavatula To: Aaron Conole CC: Jerin Jacob Kollanukkaran , "alialnu@nvidia.com" , "thomas@monjalon.net" , "david.marchand@redhat.com" , "ci@dpdk.org" Subject: RE: [EXT] Re: [PATCH v2] pw_maintainers_cli: enhance ci tree selection Thread-Topic: [EXT] Re: [PATCH v2] pw_maintainers_cli: enhance ci tree selection Thread-Index: AQHZ8tdKo+ZtLTc0zUGJ3/sda+p1cLBGMiMFgAEbceA= Date: Fri, 13 Oct 2023 05:55:07 +0000 Message-ID: References: <20230929083443.9925-1-pbhagavatula@marvell.com> <20230929131714.12525-1-pbhagavatula@marvell.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR18MB4086:EE_|MW3PR18MB3673:EE_ x-ms-office365-filtering-correlation-id: 463c1eb0-38b1-4e3c-8caa-08dbcbb0f405 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IYj9L0ljndhZkB4UPxABpy9DQ7CEqc/J4B1m/u9NdSB9SvBfKPexuxNGZGtxZDXSe6kXaU/3a6VqlRTYqPFhxQiJOb1pg5i+rpE2mkV0fTZ0OKOKv4KSmPchkD7ICEIsZLkv5C6Fego+NP7DH60VWlz3eXfpDR24mpgaGZXbRusj5b9Q9fwxO3U2EqPyd0+a+4WBa2rTR1Q071OvcJgiiAd5ZvTSFyuWe+r2DqGveAk1PjxRBHM3lJb5HODleNADoX/h6ofvW1tmBrg2uM214lqVTSUHnWnziWRFRUMQWarQUeQlbk/SK/KbRB3HY/+0ypAO8z/J/ckRe5CYr0bOvizr5FtUyCn5Xz0mYf2FFsNg6CuXEwbrKLrjDuRKzwQHl4dLjYqB9qXvjZzsrxPGE4uxoOWEntnAoF6LxzTuBA9ZNJ96vYXDu8byscVgMSZ7Aj/NFdDxQTUKTLAiljK8OXrqcNOJzDoaXR+WBAJH2et22haeN9Ejqn8VkNN40stKi0X41Zczp1MUJ5IEJz2zfqiNiycHkde5TC/4Zmfr4SW+vj7MT9HVQQKwdDUsk3L2KYCuxBRzLb5NJ8AcYeR5sJvo4qYnOV3ds3JEr1Xs0a05nTpL+1o3Kiwe5ZMe/iRn x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(396003)(346002)(366004)(376002)(230922051799003)(1800799009)(64100799003)(186009)(451199024)(6916009)(83380400001)(316002)(52536014)(55016003)(122000001)(38100700002)(8676002)(76116006)(38070700005)(8936002)(86362001)(33656002)(54906003)(4326008)(66556008)(64756008)(66446008)(66476007)(66946007)(6506007)(71200400001)(7696005)(41300700001)(2906002)(9686003)(5660300002)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LFG4+T4AO0Jbx5dDytQ+70UXMX0kyeXtK4ZeEiU7nujnnxby/CTa+fyiQ4nH?= =?us-ascii?Q?JjnIgyiGhQ2u9VbqS3lrgtH8XzC8kAFnWA5EiFDZyQtSJzvf9tCXRuiX7FqW?= =?us-ascii?Q?NZSelmFoQ7f6v6LDSC156q80evoSiUXjiH7dPRDECVjkPJ2oGRyTIhIwvRbb?= =?us-ascii?Q?hN8Gj6RDMAx0I0A6YhiDOdhdh9vxUahQjmIA/YSiR5GUptJfgv1FMGGSHE85?= =?us-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klNyOuMDcx1X0RbacpgCjocvp?= =?us-ascii?Q?xuSxNMEbuEO/k1kWAI4PpFyE5LFV4QChXB8XNpy61skIWkEBA0EbDucUdFU+?= =?us-ascii?Q?Z4OvwOasS1N4V6/Tbc3ZXgEQh9crSXlqsY2kcxS4owRHuJ9iR0uDoQokJLKY?= =?us-ascii?Q?4DSagdiiFyZXustcwdVRjjjy+blt3ijCCGWhg0OkF+gFXkLHtiedRKxG4aSm?= =?us-ascii?Q?E5Pb5TwHOE7dUwTtSwVKIiYdEvrsqOxmJNnmcRVjNYGODDGgwMnlw0TXVJ81?= =?us-ascii?Q?0UIhnda6ZpXoRvhkQ9dVLVr8qQ82nPR9pR4vy5C6oNRT+EYADAlfKN0sfgmz?= =?us-ascii?Q?2R8XNQqxfLlZTQKPgQrMqs0IXn6T0ddv2tANvRfp1zpB/38hEqmmseSt9Uqw?= =?us-ascii?Q?gu+BSMTXBSeLu42lEmOzVf0ogjyGXUg66A9g/VMRcDG3dAcGlnjR+sm3NbvM?= =?us-ascii?Q?s/Wg4RHX9VS7ghFQSVs=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 463c1eb0-38b1-4e3c-8caa-08dbcbb0f405 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2023 05:55:07.1660 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NeXX4lAK3rnu4KPRZCVXk+m/QAST3IOUW8Gn/MIvYpszez9YMnuXi76er6oE2Qb3CPvWkYG+6uWoxd00+07+7+HPK7Vq0MPWLsJcgXUh+Tk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR18MB3673 X-Proofpoint-GUID: rYGUFxHVcoxxaIqhkmM8AXpoLbX4uu8r X-Proofpoint-ORIG-GUID: rYGUFxHVcoxxaIqhkmM8AXpoLbX4uu8r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-13_03,2023-10-12_01,2023-05-22_02 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 > > From: Pavan Nikhilesh > > > > When longest prefix match doesnt find a suitable tree, remove the > > trees of files belonging to 'drivers/common' and check if there > > is any unique tree for the patchset. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > v2 Chnages: > > - Find tree by removing 'drivers/common' instead of count based > > approach. > > > > tools/pw_maintainers_cli.py | 31 ++++++++++++++++++++++++++----- > > 1 file changed, 26 insertions(+), 5 deletions(-) > > > > diff --git a/tools/pw_maintainers_cli.py b/tools/pw_maintainers_cli.py > > index c7b5ba0..ef60df8 100755 > > --- a/tools/pw_maintainers_cli.py > > +++ b/tools/pw_maintainers_cli.py > > @@ -203,13 +203,15 @@ class Maintainers(object): > > """ > > Return a git tree that matches a list of files.""" > > tree_list =3D [] > > + file_tree_map =3D {} > > for _file in files: > > _tree =3D self._get_tree(_file) > > # Having no tree means that we accept those changes going = through > a > > # subtree (e.g. release notes). > > if _tree: > > tree_list.append(_tree) > > - tree =3D self.get_common_denominator(tree_list) > > + file_tree_map[_file] =3D _tree > > + tree =3D self.get_common_denominator(tree_list, file_tree_map) > > if not tree: > > tree =3D 'git://dpdk.org/dpdk' > > return tree > > @@ -268,7 +270,7 @@ class Maintainers(object): > > self.matched[matching_pattern] =3D tree > > return tree > > > > - def get_common_denominator(self, tree_list): > > + def get_common_denominator(self, tree_list, file_tree_map): > > """Finds a common tree by finding the longest common prefix. > > Examples for expected output: > > dpdk-next-virtio + dpdk =3D dpdk > > @@ -278,7 +280,6 @@ class Maintainers(object): > > """ > > # Make sure the list is unique. > > tree_list =3D list(set(tree_list)) > > - > > # Rename dpdk-next-virtio internally to match dpdk-next-net > > _tree_list =3D [ > > tree.replace('dpdk-next-virtio', 'dpdk-next-net-virtio= ') >=20 > Any reason why this whitespace is dropped here? Otherwise, the patch > looks okay - but I don't think this line should be dropped. The new line removal can be ignored. >=20 > If you agree, I can correct when I merge it. >=20 Yes, please. Thanks,=20 Pavan. > > @@ -286,11 +287,31 @@ class Maintainers(object): > > common_prefix =3D \ > > os.path.commonprefix(_tree_list).rstrip('-').replace( > > 'dpdk-next-net-virtio', 'dpdk-next-virtio') > > - # There is no 'dpdk-next' named tree. > > - if common_prefix.endswith('dpdk-next') or > common_prefix.endswith('/'): > > + # There is no 'dpdk-next' named tree, remove files that belong > > + # to 'drivers/common' and see if we find a tree. > > + if common_prefix.endswith('dpdk-next'): > > + common_prefix =3D self.get_filtered_tree(file_tree_map) > > + elif common_prefix.endswith('/'): > > common_prefix =3D 'git://dpdk.org/dpdk' > > return common_prefix > > > > + def get_common_files(self, files): > > + match_list =3D [] > > + for f in files: > > + if re.match(r"drivers\/common", f) is not None: > > + match_list.append(f) > > + return match_list > > + > > + def get_filtered_tree(self, file_tree_map): > > + # Get list of files that are in 'drivers/common' > > + common_list =3D self.get_common_files(file_tree_map.keys()) > > + for c in common_list: > > + file_tree_map.pop(c, None) > > + tree_list =3D list(set(file_tree_map.values())) > > + if len(tree_list) =3D=3D 1: > > + return tree_list[0] > > + return None > > + > > > > if __name__ =3D=3D '__main__': > > """Main procedure.""" > > -- > > 2.25.1