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 1F229439B6; Wed, 24 Jan 2024 15:39:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 166DC41156; Wed, 24 Jan 2024 15:39:24 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E5DD840E0F for ; Wed, 24 Jan 2024 15:39:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706107162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pu/o7dBK3NZRvlELy7k31z13oeQsiUzMchNky3+FJRw=; b=XrbT/p8W5acN4NRZO1tU8eSjVFwrA5jUc8G0M9rgYPVFk5HuXeWlxb7piC70HStGAX9bT+ zOtCn54DxoWZOSEMs209YrYbqDS5l+L+oEDLs3yW9Oieqs0mMjMzccO4MzyTZjuLNGf3JT um/mSEBLoXuOrP0PnvHeQu1jEYmGxo4= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-TFzFd7qIPq-MINyq-IpUQA-1; Wed, 24 Jan 2024 09:39:21 -0500 X-MC-Unique: TFzFd7qIPq-MINyq-IpUQA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a3081d2b68fso150448466b.0 for ; Wed, 24 Jan 2024 06:39:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706107159; x=1706711959; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pu/o7dBK3NZRvlELy7k31z13oeQsiUzMchNky3+FJRw=; b=e3zi8HCqPm1P12LSXXNPjJuorjr0zQy6S+CVK9latA5G7yfA6hDLI04w9tZvkQqDV+ d1XQDEM3xp6ENaEpQhqBS7Iux9THrvxwDSovFh2J5gTISIHCJhP3MgPNSqjCzSRUjn1g Sn2+oJ8ekozRlZXqmNI9d/25m5+dYe+mWpiJGvQVR9QqhFjTTEATt4SNincA3jRWPZct kOuGUPaZtUVZ8Ti4SJd6bVfcYKu832AhHOTEfFzTf0nqkN0NxMff1QMG+0Er/0FnpxZ+ ySKLL8fiuroUIBCZh7/2iehaeQFTt0hmQfowm8wRemBcV4cUlBKFdM5JxFpUykHizc2w DDHQ== X-Gm-Message-State: AOJu0YxSeRKBcuBZCrgZ0H+SaDrL2y17hOd6Ab8WEs/eta/ziipDzfit dV+cBvTBIJ2wQRIZ1SMtuIofv4+lGz+av1JYvbmpQmfSiBf0vv75L4qQ41K4fcZAhq7SDZU/dfj wKRUH5tx8qaLZs3eemN0+Z+4pvt4PCOqSKexWo8bGKgOMTxgqjrktxb5ROkU+Jk/Mkodplf/tua 4KtrXdd8hfLcHtb1L8sIk4cmza X-Received: by 2002:a17:907:8743:b0:a31:8de:e761 with SMTP id qo3-20020a170907874300b00a3108dee761mr1099769ejc.118.1706107159570; Wed, 24 Jan 2024 06:39:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5Wfl6mL4LPDqGp4eeJoru3MmvKBlk4VsvWNB73hXs5/E2hmCQUuEl/TJ1uWyp+Cm7jzu9gr2q2fmREOwRRn4= X-Received: by 2002:a17:907:8743:b0:a31:8de:e761 with SMTP id qo3-20020a170907874300b00a3108dee761mr1099764ejc.118.1706107159324; Wed, 24 Jan 2024 06:39:19 -0800 (PST) MIME-Version: 1.0 References: <20240124133804.73253-1-aconole@redhat.com> In-Reply-To: <20240124133804.73253-1-aconole@redhat.com> From: Michael Santana Date: Wed, 24 Jan 2024 09:39:07 -0500 Message-ID: Subject: Re: [PATCH] post_pw: Correct the patch ID detection. To: Aaron Conole Cc: ci@dpdk.org, Ilya Maximets X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Jan 24, 2024 at 8:38=E2=80=AFAM Aaron Conole w= rote: > > The patch ID detection regex can match on multiple instances of the > reported patch url. That will cause us to send a bad API request > into the patchwork server. Correct this by only trusting the first > value to be sent. > > Signed-off-by: Aaron Conole Acked-by: Michael Santana > --- > post_pw.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/post_pw.sh b/post_pw.sh > index a8111ff..f11c444 100755 > --- a/post_pw.sh > +++ b/post_pw.sh > @@ -63,7 +63,7 @@ send_post() { > context=3D"$(echo "$report" | sed -n 's/.*Test-Label: //p' | tr ' ' = '_' | tr ':' '-')" > state=3D"$(echo "$report" | sed -n 's/.*Test-Status: //p' | xargs)" > description=3D"$(echo "$report" | sed -ne 's/^_\(.*\)_$/\1/p')" > - patch_id=3D"$(echo "$report" | sed -ne 's@.*href.*/patch[es]*/\(.*\)= /\?".*@\1@ip' | sed 's@/@@')" > + patch_id=3D"$(echo "$report" | sed -ne 's@.*href.*/patch[es]*/\(.*\)= /\?".*@\1@ip' | sed 's@/@@' | head -n 1)" > target_url=3D"$link" > > api_url=3D"${pw_instance}/api/patches/${patch_id}/checks/" > -- > 2.41.0 >