Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/132216/?format=api
https://patches.dpdk.org/api/patches/132216/?format=api", "web_url": "https://patches.dpdk.org/project/ci/patch/20230929131714.12525-1-pbhagavatula@marvell.com/", "project": { "id": 5, "url": "https://patches.dpdk.org/api/projects/5/?format=api", "name": "CI", "link_name": "ci", "list_id": "ci.dpdk.org", "list_email": "ci@dpdk.org", "web_url": "", "scm_url": "git://dpdk.org/tools/dpdk-ci", "webscm_url": "https://git.dpdk.org/tools/dpdk-ci/", "list_archive_url": "https://inbox.dpdk.org/ci", "list_archive_url_format": "https://inbox.dpdk.org/ci/{}", "commit_url_format": "" }, "msgid": "<20230929131714.12525-1-pbhagavatula@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/ci/20230929131714.12525-1-pbhagavatula@marvell.com", "date": "2023-09-29T13:17:14", "name": "[v2] pw_maintainers_cli: enhance ci tree selection", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6164012e5d79af3310e1d4c9139ef99e293f2b50", "submitter": { "id": 1183, "url": "https://patches.dpdk.org/api/people/1183/?format=api", "name": "Pavan Nikhilesh Bhagavatula", "email": "pbhagavatula@marvell.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/ci/patch/20230929131714.12525-1-pbhagavatula@marvell.com/mbox/", "series": [ { "id": 29696, "url": "https://patches.dpdk.org/api/series/29696/?format=api", "web_url": "https://patches.dpdk.org/project/ci/list/?series=29696", "date": "2023-09-29T13:17:14", "name": "[v2] pw_maintainers_cli: enhance ci tree selection", "version": 2, "mbox": "https://patches.dpdk.org/series/29696/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/132216/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/132216/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ci-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D2C8442672;\n\tFri, 29 Sep 2023 15:17:26 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CC6A7402AA;\n\tFri, 29 Sep 2023 15:17:26 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id E449840287\n for <ci@dpdk.org>; Fri, 29 Sep 2023 15:17:24 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 38TCPgVP005336; Fri, 29 Sep 2023 06:17:23 -0700", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tdxk08bcr-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 29 Sep 2023 06:17:23 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Fri, 29 Sep 2023 06:17:21 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Fri, 29 Sep 2023 06:17:21 -0700", "from MININT-80QBFE8.corp.innovium.com (MININT-80QBFE8.marvell.com\n [10.28.164.106])\n by maili.marvell.com (Postfix) with ESMTP id 57DBE5B6923;\n Fri, 29 Sep 2023 06:17:19 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=AZdN0qHBJznoHpMI0cPxc5MVyK7dTGD3IqSamYMdXwk=;\n b=gfd6bHlsoEjMHAy7pgYOwn+yA+EqnU8SIhN+xSgeln7iJHTloSd6CWUGe1YNQp6yOVF4\n rPjUJhE+FXejdt3DFws5xfcMO9rCTubQQN79cZVeodkF8aHxhtnjwIZpwEfzSVGQpHfb\n suQyQ43wzIhPYUQOAMGRKxte/AEZdZ7FgdFQKbdDnRmNzfI0Yaw1TO+6T7/94FJgxjYA\n xBRe1nNPHSerkE30PHRNABBqIzh/LwIQz8+hCzZQH03YtAPpp9M9GL7psvzls1piKgfI\n nUBRW9w407MTuRrKuvFWZ5AfNKzf2uL3efXmeXa6xFr/uOQKeEgCHrLbnd37wKd8Ji2b Ag==", "From": "<pbhagavatula@marvell.com>", "To": "<jerinj@marvell.com>, <alialnu@nvidia.com>, <aconole@redhat.com>,\n <thomas@monjalon.net>, <david.marchand@redhat.com>", "CC": "<ci@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>", "Subject": "[PATCH v2] pw_maintainers_cli: enhance ci tree selection", "Date": "Fri, 29 Sep 2023 18:47:14 +0530", "Message-ID": "<20230929131714.12525-1-pbhagavatula@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230929083443.9925-1-pbhagavatula@marvell.com>", "References": "<20230929083443.9925-1-pbhagavatula@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "NUI0rwCjfvqQnqmWXGZ5MhBTJJtljrCk", "X-Proofpoint-ORIG-GUID": "NUI0rwCjfvqQnqmWXGZ5MhBTJJtljrCk", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-09-29_11,2023-09-28_03,2023-05-22_02", "X-BeenThere": "ci@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK CI discussions <ci.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/ci>,\n <mailto:ci-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/ci/>", "List-Post": "<mailto:ci@dpdk.org>", "List-Help": "<mailto:ci-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/ci>,\n <mailto:ci-request@dpdk.org?subject=subscribe>", "Errors-To": "ci-bounces@dpdk.org" }, "content": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nWhen longest prefix match doesnt find a suitable tree, remove the\ntrees of files belonging to 'drivers/common' and check if there\nis any unique tree for the patchset.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n v2 Chnages:\n - Find tree by removing 'drivers/common' instead of count based\n approach.\n\n tools/pw_maintainers_cli.py | 31 ++++++++++++++++++++++++++-----\n 1 file changed, 26 insertions(+), 5 deletions(-)\n\n--\n2.25.1", "diff": "diff --git a/tools/pw_maintainers_cli.py b/tools/pw_maintainers_cli.py\nindex c7b5ba0..ef60df8 100755\n--- a/tools/pw_maintainers_cli.py\n+++ b/tools/pw_maintainers_cli.py\n@@ -203,13 +203,15 @@ class Maintainers(object):\n \"\"\"\n Return a git tree that matches a list of files.\"\"\"\n tree_list = []\n+ file_tree_map = {}\n for _file in files:\n _tree = self._get_tree(_file)\n # Having no tree means that we accept those changes going through a\n # subtree (e.g. release notes).\n if _tree:\n tree_list.append(_tree)\n- tree = self.get_common_denominator(tree_list)\n+ file_tree_map[_file] = _tree\n+ tree = self.get_common_denominator(tree_list, file_tree_map)\n if not tree:\n tree = 'git://dpdk.org/dpdk'\n return tree\n@@ -268,7 +270,7 @@ class Maintainers(object):\n self.matched[matching_pattern] = tree\n return tree\n\n- def get_common_denominator(self, tree_list):\n+ def get_common_denominator(self, tree_list, file_tree_map):\n \"\"\"Finds a common tree by finding the longest common prefix.\n Examples for expected output:\n dpdk-next-virtio + dpdk = dpdk\n@@ -278,7 +280,6 @@ class Maintainers(object):\n \"\"\"\n # Make sure the list is unique.\n tree_list = list(set(tree_list))\n-\n # Rename dpdk-next-virtio internally to match dpdk-next-net\n _tree_list = [\n tree.replace('dpdk-next-virtio', 'dpdk-next-net-virtio')\n@@ -286,11 +287,31 @@ class Maintainers(object):\n common_prefix = \\\n os.path.commonprefix(_tree_list).rstrip('-').replace(\n 'dpdk-next-net-virtio', 'dpdk-next-virtio')\n- # There is no 'dpdk-next' named tree.\n- if common_prefix.endswith('dpdk-next') or common_prefix.endswith('/'):\n+ # There is no 'dpdk-next' named tree, remove files that belong\n+ # to 'drivers/common' and see if we find a tree.\n+ if common_prefix.endswith('dpdk-next'):\n+ common_prefix = self.get_filtered_tree(file_tree_map)\n+ elif common_prefix.endswith('/'):\n common_prefix = 'git://dpdk.org/dpdk'\n return common_prefix\n\n+ def get_common_files(self, files):\n+ match_list = []\n+ for f in files:\n+ if re.match(r\"drivers\\/common\", f) is not None:\n+ match_list.append(f)\n+ return match_list\n+\n+ def get_filtered_tree(self, file_tree_map):\n+ # Get list of files that are in 'drivers/common'\n+ common_list = self.get_common_files(file_tree_map.keys())\n+ for c in common_list:\n+ file_tree_map.pop(c, None)\n+ tree_list = list(set(file_tree_map.values()))\n+ if len(tree_list) == 1:\n+ return tree_list[0]\n+ return None\n+\n\n if __name__ == '__main__':\n \"\"\"Main procedure.\"\"\"\n", "prefixes": [ "v2" ] }{ "id": 132216, "url": "