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 8193F43699; Thu, 7 Dec 2023 14:34:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BEC340278; Thu, 7 Dec 2023 14:34:05 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8511D40270 for ; Thu, 7 Dec 2023 14:34:03 +0100 (CET) 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 3B76M5SA017036; Thu, 7 Dec 2023 05:34:02 -0800 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3uu8qe9btd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Dec 2023 05:34:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aKvgUinq+iTkza2tSPRglgguQbpH+WEnK4FPB3MOvFNAEZVxosixATl5zyWLSLZkq5ib02SqSczWqepi2PFlFxfEaJCJ4J2R7cX7uR8hEhDUIc0qKCMMSJDG2Ylz9DLlrPYZ1goefkb3G59wKcgZc2ei6la0yA8pQluGRxwW5nn65c8HHp+RiFMBdU2Sd1LKc7o9RmUkhDB0NA+lE6G9z2b5iZRS8q3ir0ymxGk5ipo7985+JeBqnUO6zOSYv2RjG/lcSvfOOBuyODeswhHWL5ozutXD49khnlw1bor0+HGY95DhAXOXZthiVoK0Kv6csOCnSJfNnINDiIriuTHoOA== 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=JDoIdX1zcvv4RmM43Ak74VpvrbV9ivelJn0j0ZTuiWw=; b=DGw57MwMO5fhFxYECvIrblsUV2clcs3+HEGg2KEJ9fMd924Aa+yrvFapNdFjck7upZ9sNGE4l986mZgieED4x3v8B+xcvHDCaGwWkAdms69RftAsOGfwmsXYvp1woyJ+2zUJYJtgtRqiivzT9oCEmYlJUukw+w+ypJ7dTBUzsw87/EHROPEvGAK7GE8dP590G0c+UPILVaqIgC3cHRSmWxGZJJuRcAjAdbZkpi1EZiSZe/4/nlgiIls9xuqYRW0di7ZPwHdfKfSALFxp7c+Zea/uDEUce4IU8HimyfZoCZxLwL6TJxDsJmteqiQOe15vetGwVoCHjpn5FzjeCF3FTg== 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=JDoIdX1zcvv4RmM43Ak74VpvrbV9ivelJn0j0ZTuiWw=; b=nmoFYZoI0GQrgVE5lI0+F1kgxzgTZbyMWQWQNMP9Wmo7r/l0X35SAD1D1rw4GqBpe3U+MFaTIcijJGkFEnoEKMw9Lu2RrG94KvQlRa/OdKwffzKrbRbG59kuZiSaCEfQ/U0z4eQwJXVhdUZhtZHTzdt9+EmKLzzQTks0M3CCSD4= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by CO6PR18MB3874.namprd18.prod.outlook.com (2603:10b6:5:341::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.25; Thu, 7 Dec 2023 13:33:58 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::2733:45f2:39cf:1e7a]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::2733:45f2:39cf:1e7a%6]) with mapi id 15.20.7091.011; Thu, 7 Dec 2023 13:33:58 +0000 From: Pavan Nikhilesh Bhagavatula To: Pavan Nikhilesh Bhagavatula , 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+p1cLBGMiMFgAEbceCAVvC94A== Date: Thu, 7 Dec 2023 13:33:58 +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_|CO6PR18MB3874:EE_ x-ms-office365-filtering-correlation-id: 56a17daa-19f6-4626-9652-08dbf7292a98 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8SoTneBggWA79p4eEsJiu4lML0G95q01dmmBJ5BAfIUhEUl8HfiuEneMjWETjcc12jSzaPa78lNDlORxc2n9m9K2HVtlsiDiso+IPnkrr/zZD9vLISSEQiizfVbNYmQF68dCct6568kRtzBo4neDouHzDLinC29TL/SzUt0+a53TZQ3QNMKw1/CMc+zTznG6CPbmjikHE7Ok7UR7WklIXsnxFafrXiEHDcs08zkhAAurvgIHGuthvgMEPX2mp5STdptoFNmbxFffxvjpRNGPJCfWgAhdwfLmkKyU01oZkn6Qrn/AEYBdnOhn92ozECnv3/R4yaNrOK1yeXG5AdxM+hdYjW/3SM63plHHas88VN/nrYUf9ndBKZm8zPsPdNVOkA9iF952NMeAsJ27cYN4x0erOugy+XDW8ZIQNwoBrifLKsctAqRHf4Dh4/n6fIAOU0a5IFRZFAefflJCYGssxYCMj4VgVB5xmp0RgVN7vNikMfm6gQQy83DAhdmFUJcZs5G7Wv+cjVXDLgsCyh9ugHFdN6Cl8lCXtQuF4hY2ukVycf8Xf1qiV4DgTs1mDkyWd3IUWOqvS6Nz16M2OHGNxG6WxnEG77mVQfeLvVg8ZqaX2b4VWNhBVF/UmAopu0le 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)(396003)(136003)(39860400002)(376002)(346002)(366004)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(6506007)(9686003)(7696005)(55016003)(53546011)(26005)(8936002)(8676002)(4326008)(38100700002)(52536014)(316002)(110136005)(66476007)(66946007)(64756008)(76116006)(66556008)(66446008)(54906003)(83380400001)(71200400001)(478600001)(122000001)(86362001)(5660300002)(2906002)(38070700009)(41300700001)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ik+G7cGH/G5F5xUAr9sW4D+K8z8O2rPhDKkzGpKNK7AA8liaN5hKpeJ/rMFK?= =?us-ascii?Q?MC4gSF8Q21jrljClzWaTzH+uuwplcGZ5RH92zx+AnVHA/9EU7zLAQwZktpTk?= =?us-ascii?Q?pavUZnUMGnObyp86CitsWlEseVQNhJmujgzmoceaRjAmrT1Itz86Q9gDIVh1?= =?us-ascii?Q?7lIV8dBxn6fcj4bTNoVcFGJqympcR2PQf0aet2fB42o2WkvJmEjgI7HzTNZh?= =?us-ascii?Q?DOM6359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0?= =?us-ascii?Q?nJMzHa+g7c7nKEsu6ewlTheUYYFkVwrc930Q7tJW0x8J6Ut9H29fjtvnE4oQ?= =?us-ascii?Q?H0tP/PWcwTn0OWlxozauR36GS3nf4zXsZ8LDcHbICinXmQ2Gr/mD8BAi4Dgy?= =?us-ascii?Q?BwLjNaaMXWSKXpV+lfzj4sE3QrnhzTSxgy5A6zOt8jwP/by/Lo9EJnqgmzqp?= =?us-ascii?Q?SmyAqxfaV5SM/X3N4YxvR4mJzx6+MKpANKeoioslXzQb3EUTC45L6Qi+dvRR?= =?us-ascii?Q?quX//+vEF4boz+50lPouHf7s3jgS0/6wLctMkGuN7wDalrw6l647lnrMlqkt?= =?us-ascii?Q?jkNFXxgPfyqjg1xI5To3XHUDVO0yTM9NVTUcahEt4pwBSOOf2LQrHjDuJyR+?= =?us-ascii?Q?a+iTc3ZsYJnBwVfgT1/ENT50O19TLok0rzz08iyrEEUwpvO0gnFuYdKI7bg4?= =?us-ascii?Q?1aEPwTjjwAysfF1+8kcLALtmiGQYsi5YnJhExIv4?= 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: 56a17daa-19f6-4626-9652-08dbf7292a98 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Dec 2023 13:33:58.3346 (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: eFFj/V31uteK6RIm9ofqkv2Wg3tcyMDktsbKXkFiYF+FtmdAEDBk2FnfapHL/YL6AsJh0zzvr9X8sNf7pc8i5FHe+JIg/WGBIrz5zrPIomY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB3874 X-Proofpoint-GUID: 0XG0h9T4PM1f0JSQaOEj1RDrJPdfPhoH X-Proofpoint-ORIG-GUID: 0XG0h9T4PM1f0JSQaOEj1RDrJPdfPhoH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-07_11,2023-12-07_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 > -----Original Message----- > From: Pavan Nikhilesh Bhagavatula > Sent: Friday, October 13, 2023 11:25 AM > 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 >=20 > > > 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.p= y > > > 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 goin= g > 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_ma= p) > > > 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-virt= io') > > > > Any reason why this whitespace is dropped here? Otherwise, the patch > > looks okay - but I don't think this line should be dropped. >=20 > The new line removal can be ignored. >=20 > > > > If you agree, I can correct when I merge it. > > >=20 > Yes, please. >=20 Ping > Thanks, > Pavan. >=20 > > > @@ -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 belo= ng > > > + # 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