Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/136048/?format=api
https://patches.dpdk.org/api/patches/136048/?format=api", "web_url": "https://patches.dpdk.org/project/ci/patch/20240122234034.3883647-2-aconole@redhat.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": "<20240122234034.3883647-2-aconole@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/ci/20240122234034.3883647-2-aconole@redhat.com", "date": "2024-01-22T23:40:33", "name": "[v3,1/2] treewide: Add a User Agent for CURL requests", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "76720c2ed20d7960c8de7958343ff2dd004d3b7d", "submitter": { "id": 332, "url": "https://patches.dpdk.org/api/people/332/?format=api", "name": "Aaron Conole", "email": "aconole@redhat.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/ci/patch/20240122234034.3883647-2-aconole@redhat.com/mbox/", "series": [ { "id": 30881, "url": "https://patches.dpdk.org/api/series/30881/?format=api", "web_url": "https://patches.dpdk.org/project/ci/list/?series=30881", "date": "2024-01-22T23:40:32", "name": "Reduced checks API usage", "version": 3, "mbox": "https://patches.dpdk.org/series/30881/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/136048/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/136048/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 6C6F7439A0;\n\tTue, 23 Jan 2024 00:40:45 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4E228406A2;\n\tTue, 23 Jan 2024 00:40:45 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 85AD8402DC\n for <ci@dpdk.org>; Tue, 23 Jan 2024 00:40:43 +0100 (CET)", "from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73])\n by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-112-xyIv9R44MTmBDIHrIFQn2g-1; Mon,\n 22 Jan 2024 18:40:39 -0500", "from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com\n [10.11.54.3])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A6EF52815E25;\n Mon, 22 Jan 2024 23:40:38 +0000 (UTC)", "from RHTPC1VM0NT.redhat.com (unknown [10.22.33.141])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 71F4F1121306;\n Mon, 22 Jan 2024 23:40:38 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1705966843;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=MePjdnrl0MWSI4QGnI/23uMdpPjGMAhFZZKpL+6A6tY=;\n b=XmOSMtVXLhj/3ughuMS0j10+L8fQEixR1RBvqsPu5g1qTLIWjJCdQ5jmJZtWzVNuq8hCzm\n x0Wkmw1w37jUvlx83h14487nlYK6UOAbeqHw3eGaynqAWJXtAcMJ2InQkK/BzuSWY9x1Te\n OxdtmcNXFoLD+FLzG3e2pCAlBe5+iVE=", "X-MC-Unique": "xyIv9R44MTmBDIHrIFQn2g-1", "From": "Aaron Conole <aconole@redhat.com>", "To": "ci@dpdk.org", "Cc": "Michael Santana <msantana@redhat.com>, Ilya Maximets <i.maximets@ovn.org>,\n Jeremy Kerr <jk@ozlabs.org>", "Subject": "[PATCH v3 1/2] treewide: Add a User Agent for CURL requests", "Date": "Mon, 22 Jan 2024 18:40:33 -0500", "Message-ID": "<20240122234034.3883647-2-aconole@redhat.com>", "In-Reply-To": "<20240122234034.3883647-1-aconole@redhat.com>", "References": "<20240122234034.3883647-1-aconole@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.11.54.3", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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": "This will help identifying robot usage across PW instances.\n\nAcked-by: Michael Santana <msantana@redhat.com>\nSigned-off-by: Aaron Conole <aconole@redhat.com>\n---\nv2: Added the pw-ci prefix to all curl commands\nv3: no change\n\n ci_mon | 2 +-\n github_get_logs.sh | 8 ++++----\n github_mon | 2 +-\n github_restart | 6 ++++--\n jenkins_lib.sh | 5 +++--\n post_pw.sh | 8 ++++----\n pw_mon | 14 +++++++-------\n 7 files changed, 24 insertions(+), 21 deletions(-)", "diff": "diff --git a/ci_mon b/ci_mon\nindex 2e30da4..94ec1a3 100755\n--- a/ci_mon\n+++ b/ci_mon\n@@ -159,7 +159,7 @@ for I in travis github obs dummy; do\n author=$(echo $SERIES_LINE | cut -d\\| -f4)\n email=$(echo $SERIES_LINE | cut -d\\| -f5)\n \n- PATCHDATA=$(curl -s $url)\n+ PATCHDATA=$(curl -A \"(pw-ci) ci-mon-${PROJECT}\" -s $url)\n \n patch_id=\"$(get_patch_id_by_series_id_and_sha \"$series_id\" \"$shasum\" \"$pw_chk_instance\")\"\n if [ \"X$patch_id\" == \"X\" ]; then\ndiff --git a/github_get_logs.sh b/github_get_logs.sh\nindex 9f44840..9ebbdc2 100755\n--- a/github_get_logs.sh\n+++ b/github_get_logs.sh\n@@ -74,14 +74,14 @@ print_errored_logs_for_commit () {\n run_id=\"$(echo \"$run_meta\" | jq -r \".id\")\"\n \n # Get the real logs url, download logs, and unzip logs\n- logs_url=\"$(curl -s -S -H \"${AUTH}\" -H \"${APP}\" \"${redirect_url}\" -I | \\\n+ logs_url=\"$(curl -A \"(pw-ci) github-logs-crawler\" -s -S -H \"${AUTH}\" -H \"${APP}\" \"${redirect_url}\" -I | \\\n grep -i 'Location: '| sed 's/Location: //i' | tr -d '\\r')\"\n- curl -s -S \"$logs_url\" -o \"build_logs_series_${series_id}.zip\"\n+ curl -A \"(pw-ci) github-logs-crawler\" -s -S \"$logs_url\" -o \"build_logs_series_${series_id}.zip\"\n unzip -o -q \"build_logs_series_${series_id}.zip\" -d \"build_logs_series_${series_id}\"\n \n # Get the names of the failed jobs and the steps that failed\n tmp_url=\"$GITHUB_API/repos/$repo_name/actions/runs/${run_id}/jobs\"\n- jobs_results=\"$(curl -s -S -H \"${AUTH}\" -H \"${APP}\" \"${tmp_url}\")\"\n+ jobs_results=\"$(curl -A \"(pw-ci) github-logs-crawler\" -s -S -H \"${AUTH}\" -H \"${APP}\" \"${tmp_url}\")\"\n jobs_results=\"$(echo \"$jobs_results\" | jq \"[.jobs[] | \\\n select(.conclusion==\\\"failure\\\") | {name, failed_step: .steps[] | \\\n select(.conclusion==\\\"failure\\\") | {name, conclusion, number}}]\")\"\n@@ -135,7 +135,7 @@ repo_name=$(echo \"$repo_name\" | sed -e 's@%2F@/@g' -e 's,%40,@,g')\n \n # Get GHA runs\n tmp_url=\"$GITHUB_API/repos/$repo_name/actions/runs?per_page=9000\"\n-all_runs=\"$(curl -s -S -H \"${AUTH}\" -H \"${APP}\" \"${tmp_url}\")\"\n+all_runs=\"$(curl -A \"(pw-ci) github-logs-crawler\" -s -S -H \"${AUTH}\" -H \"${APP}\" \"${tmp_url}\")\"\n runs=$(echo $all_runs | jq -rc \".workflow_runs[] | select(.head_branch == \\\"series_$series_id\\\")\")\n not_found=\"$(echo \"$runs\" | jq -rc \".message\")\"\n if [ \"$not_found\" == \"Not Found\" ]; then\ndiff --git a/github_mon b/github_mon\nindex 8670ce8..d1e54a8 100755\n--- a/github_mon\n+++ b/github_mon\n@@ -117,7 +117,7 @@ while IFS=\"|\" read -r series_id patch_id patch_url patch_name sha patchwork_inst\n tmp_url=\"$GITHUB_API/repos/$repo_name/actions/runs?per_page=9000\"\n if [ \"$tmp_url\" != \"$prev_url\" ]; then\n prev_url=\"$tmp_url\"\n- all_runs=\"$(curl -s -S -H \"${AUTH}\" -H \"${APP}\" \"${tmp_url}\")\"\n+ all_runs=\"$(curl -A \"(pw-ci) github-mon-${pw_project}\" -s -S -H \"${AUTH}\" -H \"${APP}\" \"${tmp_url}\")\"\n fi\n \n runs=$(echo \"$all_runs\" | jq -rc \".workflow_runs[] | select(.head_branch == \\\"series_$series_id\\\")\")\ndiff --git a/github_restart b/github_restart\nindex d5d63b9..f4e9ebd 100755\n--- a/github_restart\n+++ b/github_restart\n@@ -114,7 +114,8 @@ if [ \"X$runid\" == \"X\" ]; then\n fi\n \n comma=\"\"\n- for job in $(curl -s -S -H \"${AUTH}\" -H \"${APP}\" \\\n+ for job in $(curl -A \"(pw-ci) github-restart-${pw_project}\" -s -S -H \"${AUTH}\" \\\n+ -H \"${APP}\" \\\n \"https://api.github.com/repos/${reponame}/actions/runs?head_sha=${sha}\" | \\\n jq -rc \".workflow_runs[] ${workflow_select} .id\")\n do\n@@ -126,7 +127,8 @@ fi\n echo -n \"{\\\"results\\\":[\"\n comma=\"\"\n for job in $(echo \"$runid\" | sed 's/,/ /'); do\n- result=$(curl -s -X POST -L -S -H \"${AUTH}\" -H \"${APP}\" \\\n+ result=$(curl -A \"(pw-ci) github-restart-${pw_project}\" -s -X POST -L -S \\\n+ -H \"${AUTH}\" -H \"${APP}\" \\\n \"https://api.github.com/repos/${reponame}/actions/runs/$job/rerun\")\n msg=$(echo \"$result\" | jq -rc '.message')\n \ndiff --git a/jenkins_lib.sh b/jenkins_lib.sh\nindex fc7cb1d..e3826c8 100644\n--- a/jenkins_lib.sh\n+++ b/jenkins_lib.sh\n@@ -41,12 +41,12 @@ if [ \"X$jenkins_token\" != \"X\" ]; then\n jenkins_credentials=\"$jenkins_user:$jenkins_token\"\n fi\n \n-jenkins_crumb_value=$(curl -s \"http://${jenkins_credentials}@${jenkins_url}/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\\\":\\\",//crumb)\")\n+jenkins_crumb_value=$(curl -A \"(pw-ci) jenkins-sub-${PROJECT}\" -s \"http://${jenkins_credentials}@${jenkins_url}/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\\\":\\\",//crumb)\")\n \n function jenkins_check_for_job() {\n local jenkins_job=jenkins_${pw_project}_job\n \n- curl -s -f -X GET \\\n+ curl -A \"(pw-ci) jenkins-sub-${PROJECT}\" -s -f -X GET \\\n \"http://${jenkins_credentials}@${jenkins_url}/job/${!jenkins_job}/config.xml\" >/dev/null\n }\n \n@@ -86,6 +86,7 @@ function jenkins_submit_series() {\n }'\n \n curl -s -f -X POST \\\n+ -A \"(pw-ci) jenkins-sub-${PROJECT}\" \\\n -H \"${jenkins_crumb_value}\" \\\n --data token=\"${!jenkins_job_token}\" \\\n --data-urlencode json=\"$json_data\" \\\ndiff --git a/post_pw.sh b/post_pw.sh\nindex e98e8ab..9163ea1 100755\n--- a/post_pw.sh\n+++ b/post_pw.sh\n@@ -53,7 +53,7 @@ send_post() {\n return 0\n fi\n \n- report=\"$(curl -sSf \"${link}\")\"\n+ report=\"$(curl -A \"(pw-ci) pw-post\" -sSf \"${link}\")\"\n if [ $? -ne 0 ]; then\n echo \"Failed to get proper server response on link ${link}\" 1>&2\n return 0\n@@ -79,7 +79,7 @@ send_post() {\n fi\n \n # Get reports from patch\n- checks=\"$(curl -sSf -X GET \\\n+ checks=\"$(curl -A \"(pw-ci) pw-post\" -sSf -X GET \\\n --header \"Content-Type: application/json\" \\\n \"$api_url\")\"\n if [ $? -ne 0 ]; then\n@@ -105,7 +105,7 @@ send_post() {\n \\\"description\\\": \\\"$description\\\"\\\n }\"\n \n- curl -sSf -X POST \\\n+ curl -A \"(pw-ci) pw-post\" -sSf -X POST \\\n -H \"Authorization: Token ${token}\" \\\n --header \"Content-Type: application/json\" \\\n --data \"$data\" \\\n@@ -120,7 +120,7 @@ send_post() {\n }\n \n year_month=\"$(date +\"%Y-%B\")\"\n-reports=\"$(curl -sSf \"${mail_archive}${year_month}/thread.html\" | \\\n+reports=\"$(curl -A \"(pw-ci) pw-post\" -sSf \"${mail_archive}${year_month}/thread.html\" | \\\n grep -i 'HREF=' | sed -e 's@[0-9]*<LI><A HREF=\"@\\|@' -e 's@\">@\\|@')\"\n if [ $? -ne 0 ]; then\n echo \"Failed to get proper server response on link ${reports}\" 1>&2\ndiff --git a/pw_mon b/pw_mon\nindex ee77256..068fe1a 100755\n--- a/pw_mon\n+++ b/pw_mon\n@@ -146,7 +146,7 @@ function check_new_series() {\n \n GET_URL=\"http://${INSTANCE}/api/series/?project=${PROJECT}&since=${SINCE}\"\n \n- response=$(curl -s \"$userpw\" \"$GET_URL\")\n+ response=$(curl -A \"(pw-ci) pw-mon-${PROJECT}\" -s \"$userpw\" \"$GET_URL\")\n \n series_info=$(echo \"$response\" | jq -rc '.[] | (.id|tostring) + \";\" + .url + \";\" + .submitter.name + \";\" + .submitter.email + \";\" + (.received_all|tostring)')\n \n@@ -162,7 +162,7 @@ function check_new_series() {\n function check_completed_series() {\n get_uncompleted_jobs_as_line \"$pw_instance\" \"$pw_project\" | while IFS=\\| read -r id url submitter_name submitter_email; do\n echo \"Checking on series: $id\"\n- local RESPONSE=$(curl -s \"$userpw\" \"$url\" | jq -rc '.received_all')\n+ local RESPONSE=$(curl -A \"(pw-ci) pw-mon-${PROJECT}\" -s \"$userpw\" \"$url\" | jq -rc '.received_all')\n if [ \"$RESPONSE\" = \"true\" ]; then\n echo \"Setting series $id to completed\"\n series_id_set_complete \"$pw_instance\" \"$id\"\n@@ -183,8 +183,8 @@ function check_superseded_series() {\n local pw_instance=\"$1\"\n series_get_active_branches \"$pw_instance\" | while IFS=\\| read -r series_id project url repo branchname; do\n # first query the patch states\n- local last_patch_url=$(curl -s \"$userpw\" \"$url\" | jq -rc '.patches[-1].url')\n- local patch_state=$(curl -s \"$userpw\" \"$last_patch_url\" | jq -rc '.state')\n+ local last_patch_url=$(curl -A \"(pw-ci) pw-mon-${PROJECT}\" -s \"$userpw\" \"$url\" | jq -rc '.patches[-1].url')\n+ local patch_state=$(curl -A \"(pw-ci) pw-mon-${PROJECT}\" -s \"$userpw\" \"$last_patch_url\" | jq -rc '.state')\n \n # now check to see if the patch should even be reported...\n if [ \"$patch_state\" = \"superseded\" -o \"$patch_state\" = \"rejected\" -o \"$patch_state\" = \"accepted\" \\\n@@ -214,7 +214,7 @@ function check_patch_for_retest_request() {\n local pw_project=\"$2\"\n local patch_url=\"$3\"\n \n- local patch_json=$(curl -s \"$userpw\" \"$patch_url\")\n+ local patch_json=$(curl -A \"(pw-ci) pw-mon-${PROJECT}\" -s \"$userpw\" \"$patch_url\")\n local patch_comments_url=$(echo \"$patch_json\" | jq -rc '.comments')\n local patch_id=$(echo \"$patch_json\" | jq -rc '.id')\n local series_id=$(echo \"$patch_json\" | jq -rc '.series[].id')\n@@ -231,7 +231,7 @@ function check_patch_for_retest_request() {\n fi\n \n if [ \"Xnull\" != \"X$patch_comments_url\" ]; then\n- local comments_json=$(curl -s \"$userpw\" \"$patch_comments_url\")\n+ local comments_json=$(curl -A \"(pw-ci) pw-mon-${PROJECT}\" -s \"$userpw\" \"$patch_comments_url\")\n local seq_end=$(echo \"$comments_json\" | jq -rc 'length')\n if [ \"$seq_end\" -a $seq_end -gt 0 ]; then\n seq_end=$((seq_end-1))\n@@ -250,7 +250,7 @@ function check_series_needs_retest() {\n local pw_instance=\"$1\"\n local pw_project=\"$2\"\n \n- local series_list=$(curl -s \"$userpw\" \"http://${pw_instance}/api/series/?project=${pw_project}&state=new&state=rfc&state=under-review&archived=false&order=-id\")\n+ local series_list=$(curl -A \"(pw-ci) pw-mon-${PROJECT}\" -s \"$userpw\" \"http://${pw_instance}/api/series/?project=${pw_project}&state=new&state=rfc&state=under-review&archived=false&order=-id\")\n local n=$(echo \"$series_list\" | jq -rc 'length')\n \n if [ \"Xnull\" == \"X$n\" -o \"X\" == \"X$n\" ]; then\n", "prefixes": [ "v3", "1/2" ] }{ "id": 136048, "url": "