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 5F8A7A0A02 for ; Thu, 20 May 2021 21:16:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FE0C40143; Thu, 20 May 2021 21:16:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 52A2F40041 for ; Thu, 20 May 2021 21:16:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621538201; 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=cqU2d2v+ZKuSdcEKOLB8pz2WOYFEY0mCiLtMf75ijnE=; b=hqdFne8WTzbbV3dmYxygX4mKSkhRBAaTubaKvEjC9XQmyuVNaZCNUAuLjQP1ZJ7RNHljGz WamzK7iJWiNSNRWc9mLwX2FCaneOpQgFxTWBPr7HoO5XCntCaG6rBqP8gzGsKwNXZy42B1 8/QJ+tjGEhzcx6l1mShcV6O7QUY0GkQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-tw5byr3ZPSSJzZ5ua-dwMA-1; Thu, 20 May 2021 15:16:39 -0400 X-MC-Unique: tw5byr3ZPSSJzZ5ua-dwMA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9D5068143E5; Thu, 20 May 2021 19:16:06 +0000 (UTC) Received: from RHTPC1VM0NT (ovpn-118-71.rdu2.redhat.com [10.10.118.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 235745C261; Thu, 20 May 2021 19:16:04 +0000 (UTC) From: Aaron Conole To: Juraj =?utf-8?Q?Linke=C5=A1?= Cc: Michael Santana , "ci@dpdk.org" , Bruce Richardson , Thomas Monjalon , "Lincoln Lavoie" References: Date: Thu, 20 May 2021 15:16:03 -0400 In-Reply-To: ("Juraj =?utf-8?Q?Linke=C5=A1=22's?= message of "Thu, 20 May 2021 09:37:16 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=aconole@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-ci] [RFC pw-ci] pw_mon: check for recheck requested comments 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 Sender: "ci" Juraj Linke=C5=A1 writes: >> -----Original Message----- >> From: Aaron Conole >> Sent: Wednesday, May 19, 2021 4:18 PM >> To: Michael Santana >> Cc: ci@dpdk.org; Juraj Linke=C5=A1 ; Bruce R= ichardson >> ; Thomas Monjalon ; >> Lincoln Lavoie >> Subject: [RFC pw-ci] pw_mon: check for recheck requested comments >>=20 >> ENOTREADY: Missing the actual recheck logic... needs some input / >> design before committing to anything. >>=20 >> When a developer wants to ask for a test case recheck (for example, mayb= e to >> rerun the github-actions test suite), we scan for the specific >> line: >>=20 >> ^Recheck-request: .*$ >>=20 >> The line would break up as: >>=20 >> Recheck-request: [context] >>=20 >> where '[context]' is the name of the check (as it appears in the UI). >> For example, if we look at a patch that has 'github-robot', we can reque= st a >> recheck of the series by sending an email reply with the line: >>=20 >> Recheck-request: github-robot >>=20 > > Do we want to support multiple contexts for one recheck request? Seems > very useful since there could be multiple failed contexts. I think it makes sense. Usually there's only one or two, but I can see the need to re-run all of them. Maybe we want something like: ^Recheck-request: ([a-zA-Z-],? ?)+$ So change the above to be: where '[context]' is the name of the check (as it appears in the UI), or a comma separated list of check names. For example, if we look at a patch that has 'github-robot', we can request= a recheck of the series by sending an email reply with the line: Recheck-request: github-robot Thoughts? >> It is important to use the 'msgid' field to distinguish recheck requests= . >> Otherwise, we will continuously reparse the same recheck request and loo= p >> forever. > > How do you use this? Is this the message-id header? Or in-reply-to? This is the Message-ID header. We want to prevent a rescan on a future run from being considered again. The idea would be to keep message-id of the comment in the table related to rechecks. >> Additionally, we've discussed using a counter to limit the recheck >> requests to a single 'recheck' per test name. >>=20 > > I think that if we're able to specify multiple contexts, then there's > not really any reason to run multiple rechecks per patchset. Okay, that makes sense. >> As an additional change, we run after the 'superseded' and 'completed' >> checks, to ensure that we don't bother parsing comments from older serie= s that >> aren't relevant any longer. >>=20 >> Signed-off-by: Aaron Conole >> --- >> Submitting to the ci@dpdk.org mailing list for inputs / comments, etc. >>=20 >> diff --git a/pw_mon b/pw_mon >> index 28feb8b..26c667d 100755 >> --- a/pw_mon >> +++ b/pw_mon >> @@ -154,7 +154,35 @@ function check_superseded_series() { >> done >> } >>=20 >> +function run_recheck() { >> + local recheck_name=3D$(echo "$7" | sed 's,^Recheck-request: ,,') >> + echo "# recheck for $recheck_name requested...." >> +} >> + >> +function check_series_needs_retest() { >> + local pw_instance=3D"$1" >> + >> + series_get_active_branches "$pw_instance" | while IFS=3D\| read -r = series_id >> project url repo branchname; do >> + local patch_comments_url=3D$(curl -s "$userpw" "$url" | jq -rc = '.comments') >> + if [ "Xnull" !=3D "X$patch_comments_url" ]; then >> + local comments_json=3D$(curl -s "$userpw" "$patch_comments_= url") >> + local seq_end=3D$(echo "$comments_json" | jq -rc 'length') >> + if [ "$seq_end" -a $seq_end -gt 0 ]; then >> + seq_end=3D$((seq_end-1)) >> + for comment_id in $(seq 0 $seq_end); do >> + local recheck_requested=3D$(echo "$comments_json" |= jq -rc >> ".[$comment_id].content" | grep "^Recheck-request: ") >> + if [ "X$recheck_requested" !=3D "X" ]; then >> + local msgid=3D$(echo "$comments_json" | jq -rc >> ".[$comment_id].msgid") >> + run_recheck "$pw_instance" "$series_id" "$proje= ct" "$url" >> "$repo" "$branchname" "$recheck_requested" "$msgid" >> + fi >> + done >> + fi >> + fi >> + done >> +} >> + >> check_undownloaded_series "$pw_instance" "$pw_project" >> check_completed_series "$pw_instance" "$pw_project" >> check_new_series "$pw_instance" "$pw_project" >> check_superseded_series "$pw_instance" >> +check_series_needs_retest "$pw_instance" >> --- >>=20