get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/136044/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 136044,
    "url": "http://patches.dpdk.org/api/patches/136044/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240122182611.1904974-5-luca.vizzarro@arm.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240122182611.1904974-5-luca.vizzarro@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240122182611.1904974-5-luca.vizzarro@arm.com",
    "date": "2024-01-22T18:26:11",
    "name": "[4/4] dts: log stderr with failed remote commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5e2f3e1295da773f3941a94985fdda8b6ed65454",
    "submitter": {
        "id": 3197,
        "url": "http://patches.dpdk.org/api/people/3197/?format=api",
        "name": "Luca Vizzarro",
        "email": "luca.vizzarro@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240122182611.1904974-5-luca.vizzarro@arm.com/mbox/",
    "series": [
        {
            "id": 30879,
            "url": "http://patches.dpdk.org/api/series/30879/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30879",
            "date": "2024-01-22T18:26:07",
            "name": "dts: error and usage improvements",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30879/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/136044/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/136044/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-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 65E7A4399C;\n\tMon, 22 Jan 2024 19:26:58 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7EC5942DB2;\n\tMon, 22 Jan 2024 19:26:39 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 4326D40E72\n for <dev@dpdk.org>; Mon, 22 Jan 2024 19:26:37 +0100 (CET)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F24DDFEC;\n Mon, 22 Jan 2024 10:27:22 -0800 (PST)",
            "from localhost.localdomain (unknown [10.57.90.210])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 351603F762;\n Mon, 22 Jan 2024 10:26:36 -0800 (PST)"
        ],
        "From": "Luca Vizzarro <luca.vizzarro@arm.com>",
        "To": "dev@dpdk.org",
        "Cc": "Luca Vizzarro <luca.vizzarro@arm.com>,\n =?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>,\n Paul Szczepanek <paul.szczepanek@arm.com>",
        "Subject": "[PATCH 4/4] dts: log stderr with failed remote commands",
        "Date": "Mon, 22 Jan 2024 18:26:11 +0000",
        "Message-Id": "<20240122182611.1904974-5-luca.vizzarro@arm.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240122182611.1904974-1-luca.vizzarro@arm.com>",
        "References": "<20240122182611.1904974-1-luca.vizzarro@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Add the executed command stderr to RemoteCommandExecutionError. So that\nit is logged as an error, instead of just as debug.\n\nReviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>\nSigned-off-by: Luca Vizzarro <luca.vizzarro@arm.com>\n---\n dts/framework/exception.py                     | 10 +++++++---\n dts/framework/remote_session/remote_session.py |  2 +-\n 2 files changed, 8 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/dts/framework/exception.py b/dts/framework/exception.py\nindex 658eee2c38..9fc3fa096a 100644\n--- a/dts/framework/exception.py\n+++ b/dts/framework/exception.py\n@@ -130,20 +130,24 @@ class RemoteCommandExecutionError(DTSError):\n     #: The executed command.\n     command: str\n     _command_return_code: int\n+    _command_stderr: str\n \n-    def __init__(self, command: str, command_return_code: int):\n+    def __init__(self, command: str, command_return_code: int, command_stderr: str):\n         \"\"\"Define the meaning of the first two arguments.\n \n         Args:\n             command: The executed command.\n             command_return_code: The return code of the executed command.\n+            command_stderr: The stderr of the executed command.\n         \"\"\"\n         self.command = command\n         self._command_return_code = command_return_code\n+        self._command_stderr = command_stderr\n \n     def __str__(self) -> str:\n-        \"\"\"Include both the command and return code in the string representation.\"\"\"\n-        return f\"Command {self.command} returned a non-zero exit code: {self._command_return_code}\"\n+        \"\"\"Include the command, its return code and stderr in the string representation.\"\"\"\n+        return (f\"Command '{self.command}' returned a non-zero exit code: \"\n+                f\"{self._command_return_code}\\n{self._command_stderr}\")\n \n \n class RemoteDirectoryExistsError(DTSError):\ndiff --git a/dts/framework/remote_session/remote_session.py b/dts/framework/remote_session/remote_session.py\nindex 2059f9a981..345439f2de 100644\n--- a/dts/framework/remote_session/remote_session.py\n+++ b/dts/framework/remote_session/remote_session.py\n@@ -157,7 +157,7 @@ def send_command(\n             )\n             self._logger.debug(f\"stdout: '{result.stdout}'\")\n             self._logger.debug(f\"stderr: '{result.stderr}'\")\n-            raise RemoteCommandExecutionError(command, result.return_code)\n+            raise RemoteCommandExecutionError(command, result.return_code, result.stderr)\n         self._logger.debug(f\"Received from '{command}':\\n{result}\")\n         self.history.append(result)\n         return result\n",
    "prefixes": [
        "4/4"
    ]
}