From: Michael Santana <msantana@redhat.com>
To: Aaron Conole <aconole@redhat.com>
Cc: ci@dpdk.org, Ilya Maximets <i.maximets@ovn.org>
Subject: Re: [PATCH] post_pw: Correct the patch ID detection.
Date: Wed, 24 Jan 2024 09:39:07 -0500 [thread overview]
Message-ID: <CABVNPRp=CeCS4QfUX5tKW_huO56EYnRv=M9uP=M1W9v45iGgzg@mail.gmail.com> (raw)
In-Reply-To: <20240124133804.73253-1-aconole@redhat.com>
On Wed, Jan 24, 2024 at 8:38 AM Aaron Conole <aconole@redhat.com> wrote:
>
> 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 <aconole@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
> ---
> 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="$(echo "$report" | sed -n 's/.*Test-Label: //p' | tr ' ' '_' | tr ':' '-')"
> state="$(echo "$report" | sed -n 's/.*Test-Status: //p' | xargs)"
> description="$(echo "$report" | sed -ne 's/^_\(.*\)_$/\1/p')"
> - patch_id="$(echo "$report" | sed -ne 's@.*href.*/patch[es]*/\(.*\)/\?".*@\1@ip' | sed 's@/@@')"
> + patch_id="$(echo "$report" | sed -ne 's@.*href.*/patch[es]*/\(.*\)/\?".*@\1@ip' | sed 's@/@@' | head -n 1)"
> target_url="$link"
>
> api_url="${pw_instance}/api/patches/${patch_id}/checks/"
> --
> 2.41.0
>
next prev parent reply other threads:[~2024-01-24 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 13:38 Aaron Conole
2024-01-24 14:39 ` Michael Santana [this message]
2024-01-24 15:55 ` Aaron Conole
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABVNPRp=CeCS4QfUX5tKW_huO56EYnRv=M9uP=M1W9v45iGgzg@mail.gmail.com' \
--to=msantana@redhat.com \
--cc=aconole@redhat.com \
--cc=ci@dpdk.org \
--cc=i.maximets@ovn.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).