From patchwork Tue Aug 1 09:57:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simone Ballarin X-Patchwork-Id: 13336124 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06085EB64DD for ; Tue, 1 Aug 2023 09:58:13 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.574028.899201 (Exim 4.92) (envelope-from ) id 1qQm8i-0001UP-Ej; Tue, 01 Aug 2023 09:58:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 574028.899201; Tue, 01 Aug 2023 09:58:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8i-0001UG-Br; Tue, 01 Aug 2023 09:58:04 +0000 Received: by outflank-mailman (input) for mailman id 574028; Tue, 01 Aug 2023 09:58:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8h-0001NH-9v for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 09:58:03 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e62f2a7e-3051-11ee-8613-37d641c3527e; Tue, 01 Aug 2023 11:58:00 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id 1D9A84EE0737; Tue, 1 Aug 2023 11:58:01 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e62f2a7e-3051-11ee-8613-37d641c3527e From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 1/4] automation/eclair: add support for tag pipelines Date: Tue, 1 Aug 2023 11:57:01 +0200 Message-Id: <5e79b954062385c4d765c32347bcb45896d3ed5e.1690881495.git.simone.ballarin@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 The ECLAIR jobs fail when triggered by tag pipelines (e.g. xen-project/patchew/xen). This patch extends the integration to support such pipelines. Signed-off-by: Simone Ballarin Acked-by: Stefano Stabellini --- .../eclair_analysis/ECLAIR/action.settings | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation/eclair_analysis/ECLAIR/action.settings index 96426811a8..71c10d5141 100644 --- a/automation/eclair_analysis/ECLAIR/action.settings +++ b/automation/eclair_analysis/ECLAIR/action.settings @@ -41,7 +41,7 @@ github) push | workflow_dispatch) event=push # Extract the branch name from "refs/heads/" - branch="${GITHUB_REF#refs/heads/}" + ref="${GITHUB_REF#refs/heads/}" headCommitId="${GITHUB_SHA}" pushUser="${GITHUB_ACTOR}" ;; @@ -75,7 +75,13 @@ gitlab) ;; push | pipeline | web) event=push - branch="${CI_COMMIT_BRANCH}" + if [ -n "${CI_COMMIT_BRANCH:-}" ]; then + ref_kind=branch + ref="${CI_COMMIT_BRANCH}" + else + ref_kind=tag + ref="${CI_COMMIT_TAG}" + fi headCommitId="${CI_COMMIT_SHA}" pushUser="${GITLAB_USER_NAME}" ;; @@ -99,7 +105,7 @@ jenkins) jenkinsBotToken="${ECLAIR_BOT_TOKEN:-}" event=push - branch="${GIT_BRANCH}" + ref="${GIT_BRANCH}" headCommitId="${GIT_COMMIT}" pushUser=$(git show --pretty='format:%aN' -s) ;; @@ -111,7 +117,7 @@ esac if [ "${event}" = "push" ] && [ -n "${autoPRBranch:-}" ]; then # AUTO PR Feature enabled - if ! [ "${branch}" = "${autoPRBranch}" ] || + if ! [ "${ref}" = "${autoPRBranch}" ] || ! [ "${repository}" = "${autoPRRepository}" ]; then event=auto_pull_request fi @@ -123,17 +129,17 @@ pull_request) jobHeadline="ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${pullRequestUser} wants to merge ${pullRequestHeadRepo}:${pullRequestHeadRef} (${headCommitId}) into ${pullRequestBaseRef} (${baseCommitId})" ;; push) - subDir="${branch}" - jobHeadline="ECLAIR ${ANALYSIS_KIND} on repository ${repository}: branch ${branch} (${headCommitId})" - badgeLabel="ECLAIR ${ANALYSIS_KIND} ${branch}${variantHeadline} #${jobId}" + subDir="${ref}" + jobHeadline="ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${ref_kind} ${ref} (${headCommitId})" + badgeLabel="ECLAIR ${ANALYSIS_KIND} ${ref}${variantHeadline} #${jobId}" ;; auto_pull_request) git remote remove autoPRRemote || true git remote add autoPRRemote "${autoPRRemoteUrl}" git fetch -q autoPRRemote - subDir="${branch}" + subDir="${ref}" baseCommitId=$(git merge-base "autoPRRemote/${autoPRBranch}" HEAD) - jobHeadline="ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${pushUser} wants to merge ${repository}:${branch} (${headCommitId}) into ${autoPRRepository}/${autoPRBranch} (${baseCommitId})" + jobHeadline="ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${pushUser} wants to merge ${repository}:${ref} (${headCommitId}) into ${autoPRRepository}/${autoPRBranch} (${baseCommitId})" ;; *) echo "Unexpected event ${event}" >&2 From patchwork Tue Aug 1 09:57:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simone Ballarin X-Patchwork-Id: 13336125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE9ABC001DF for ; Tue, 1 Aug 2023 09:58:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.574029.899212 (Exim 4.92) (envelope-from ) id 1qQm8k-0001ka-MG; Tue, 01 Aug 2023 09:58:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 574029.899212; Tue, 01 Aug 2023 09:58:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8k-0001kR-JD; Tue, 01 Aug 2023 09:58:06 +0000 Received: by outflank-mailman (input) for mailman id 574029; Tue, 01 Aug 2023 09:58:05 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8j-0001NH-AG for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 09:58:05 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e7637744-3051-11ee-8613-37d641c3527e; Tue, 01 Aug 2023 11:58:02 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id 2029F4EE0740; Tue, 1 Aug 2023 11:58:03 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e7637744-3051-11ee-8613-37d641c3527e From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 2/4] automation/eclair: add direct link to reports Date: Tue, 1 Aug 2023 11:57:02 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 This patch adds direct links to the analysis findings in the console log. Signed-off-by: Simone Ballarin Acked-by: Stefano Stabellini --- .../eclair_analysis/ECLAIR/action.helpers | 84 ++++++++++++++----- 1 file changed, 65 insertions(+), 19 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/action.helpers b/automation/eclair_analysis/ECLAIR/action.helpers index 2ad6428eaa..df9bf2bd11 100644 --- a/automation/eclair_analysis/ECLAIR/action.helpers +++ b/automation/eclair_analysis/ECLAIR/action.helpers @@ -1,17 +1,26 @@ +esc=$(printf '\e') +cr=$(printf '\r') + if [ -n "${GITLAB_CI:-}" ]; then ci=gitlab + eol= + link_start="${esc}[33m" + link_end="${esc}[m" elif [ -n "${GITHUB_ACTION:-}" ]; then ci=github + eol="\\" + link_start= + link_end= elif [ -n "${JENKINS_HOME:-}" ]; then ci=jenkins + eol="
" + link_start= + link_end= else echo "Unexpected CI/CD context" >&2 exit 1 fi -esc=$(printf '\e') -cr=$(printf '\r') - open_section() { id=$1 title=$2 @@ -36,54 +45,86 @@ summary() { case "${ci}" in github) - nl="\\" + eol="\\" ;; gitlab) - nl= + eol= ;; jenkins) - nl="
" + eol="
" ;; *) - nl= + eol= ;; esac + currentDbReportsUrl="${eclairReportUrlPrefix}/fs${jobDir}/PROJECT.ecd;/by_service.html#service&kind" if [ -z "${newReports}" ]; then - fixedMsg= + fixedMsg="No fixed reports as there is no baseline" unfixedMsg="Unfixed reports: ${unfixedReports}" - countsMsg="${unfixedMsg}" + referenceReportsMsgTxt= + referenceReportsMsgLog= else fixedMsg="Fixed reports: ${fixedReports}" unfixedMsg="Unfixed reports: ${unfixedReports} [new: ${newReports}]" - countsMsg="${fixedMsg}${nl} -${unfixedMsg}" + case "${event}" in + pull_request | auto_pull_request) + referenceDbReportsUrl="${eclairReportUrlPrefix}/fs${jobDir}/base/PROJECT.ecd;/by_service.html#service&kind" + reference_kind=base + ;; + push) + referenceDbReportsUrl="${eclairReportUrlPrefix}/fs${jobDir}/prev/PROJECT.ecd;/by_service.html#service&kind" + reference_kind=previous + ;; + *) + echo "Unexpected event ${event}" >&2 + exit 1 + ;; + esac fi + case "${ci}" in jenkins) + if [ -n "${newReports}" ]; then + referenceReportsMsgTxt="Browse ${reference_kind} reports" + fi cat <"${summaryTxt}" -${countsMsg} ${nl} +${fixedMsg}${eol} +${unfixedMsg} ${eol}

${jobHeadline}

-Browse analysis results +Browse analysis summary +Browse current reports +${referenceReportsMsgTxt} EOF ;; *) + if [ -n "${newReports}" ]; then + referenceReportsMsgTxt="Browse ${reference_kind} reports: ${referenceDbReportsUrl}" + fi cat <"${summaryTxt}" Analysis Summary -${jobHeadline}${nl} -${countsMsg}${nl} -[Browse analysis](${indexHtmlUrl}) +${jobHeadline}${eol} +${fixedMsg}${eol} +${unfixedMsg}${eol} +Browse analysis summary: ${indexHtmlUrl} +Browse current reports: ${currentDbReportsUrl} +${referenceReportsMsgTxt} EOF ;; esac + analysisSummaryMsgLog="Browse analysis summary: ${link_start}${indexHtmlUrl}${link_end}" + currentReportsMsgLog="Browse current reports: ${link_start}${currentDbReportsUrl}${link_end}" + if [ -n "${newReports}" ]; then + referenceReportsMsgLog="Browse ${reference_kind} reports: ${link_start}${referenceDbReportsUrl}${link_end}" + fi case ${ci} in github) cat "${summaryTxt}" >"${GITHUB_STEP_SUMMARY}" @@ -93,8 +134,11 @@ EOF # Generate summary and print it (GitLab-specific) cat < X-Patchwork-Id: 13336126 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E412FEB64DD for ; Tue, 1 Aug 2023 09:58:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.574030.899222 (Exim 4.92) (envelope-from ) id 1qQm8l-00021w-V0; Tue, 01 Aug 2023 09:58:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 574030.899222; Tue, 01 Aug 2023 09:58:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8l-00021k-Rw; Tue, 01 Aug 2023 09:58:07 +0000 Received: by outflank-mailman (input) for mailman id 574030; Tue, 01 Aug 2023 09:58:06 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8k-0001NH-KZ for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 09:58:06 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e83784b4-3051-11ee-8613-37d641c3527e; Tue, 01 Aug 2023 11:58:04 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id 8062B4EE0741; Tue, 1 Aug 2023 11:58:04 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e83784b4-3051-11ee-8613-37d641c3527e From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 3/4] automation/eclair: add scheduled pipelines Date: Tue, 1 Aug 2023 11:57:03 +0200 Message-Id: <76f3cdddcba485e8124659566b2f992b3b14da17.1690881495.git.simone.ballarin@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 This patch introduces six new ECLAIR jobs that run only when triggered by a GitLab scheduled pipeline. Signed-off-by: Simone Ballarin Reviewed-by: Stefano Stabellini --- .../eclair_analysis/ECLAIR/action.settings | 2 +- automation/gitlab-ci/analyze.yaml | 65 +++++++++++++++++-- 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation/eclair_analysis/ECLAIR/action.settings index 71c10d5141..528bc24c72 100644 --- a/automation/eclair_analysis/ECLAIR/action.settings +++ b/automation/eclair_analysis/ECLAIR/action.settings @@ -73,7 +73,7 @@ gitlab) headCommitId="${CI_COMMIT_SHA}" baseCommitId="${CI_MERGE_REQUEST_DIFF_BASE_SHA}" ;; - push | pipeline | web) + push | pipeline | web | schedule) event=push if [ -n "${CI_COMMIT_BRANCH:-}" ]; then ref_kind=branch diff --git a/automation/gitlab-ci/analyze.yaml b/automation/gitlab-ci/analyze.yaml index 3d8166572b..3325ef9d9a 100644 --- a/automation/gitlab-ci/analyze.yaml +++ b/automation/gitlab-ci/analyze.yaml @@ -8,6 +8,8 @@ ENABLE_ECLAIR_BOT: "n" AUTO_PR_BRANCH: "staging" AUTO_PR_REPOSITORY: "xen-project/xen" + script: + - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" artifacts: when: always paths: @@ -23,8 +25,6 @@ eclair-x86_64: LOGFILE: "eclair-x86_64.log" VARIANT: "X86_64" RULESET: "Set1" - script: - - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" allow_failure: true eclair-ARM64: @@ -33,6 +33,63 @@ eclair-ARM64: LOGFILE: "eclair-ARM64.log" VARIANT: "ARM64" RULESET: "Set1" - script: - - ./automation/scripts/eclair 2>&1 | tee "${LOGFILE}" + allow_failure: true + +.eclair-analysis:on-schedule: + extends: .eclair-analysis + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + +eclair-x86_64-Set1:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "X86_64" + RULESET: "Set1" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-x86_64-Set2:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "X86_64" + RULESET: "Set2" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-x86_64-Set3:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "X86_64" + RULESET: "Set3" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-ARM64-Set1:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "ARM64" + RULESET: "Set1" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-ARM64-Set2:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "ARM64" + RULESET: "Set2" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" + allow_failure: true + +eclair-ARM64-Set3:on-schedule: + extends: .eclair-analysis:on-schedule + variables: + VARIANT: "ARM64" + RULESET: "Set3" + ANALYSIS_KIND: "${RULESET}-scheduled" + LOGFILE: "eclair-${VARIANT}-${RULESET}.log" allow_failure: true From patchwork Tue Aug 1 09:57:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simone Ballarin X-Patchwork-Id: 13336127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83B26C04A94 for ; Tue, 1 Aug 2023 09:58:18 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.574031.899232 (Exim 4.92) (envelope-from ) id 1qQm8n-0002J4-6R; Tue, 01 Aug 2023 09:58:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 574031.899232; Tue, 01 Aug 2023 09:58:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8n-0002Iu-3S; Tue, 01 Aug 2023 09:58:09 +0000 Received: by outflank-mailman (input) for mailman id 574031; Tue, 01 Aug 2023 09:58:07 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQm8l-0000wJ-Fv for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 09:58:07 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e9cfcd28-3051-11ee-b259-6b7b168915f2; Tue, 01 Aug 2023 11:58:07 +0200 (CEST) Received: from beta.station (net-188-218-251-179.cust.vodafonedsl.it [188.218.251.179]) by support.bugseng.com (Postfix) with ESMTPSA id 733144EE0737; Tue, 1 Aug 2023 11:58:06 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e9cfcd28-3051-11ee-b259-6b7b168915f2 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Simone Ballarin , Doug Goldstein , Stefano Stabellini Subject: [XEN PATCH 4/4] automation/eclair: avoid failure in case of missing merge point Date: Tue, 1 Aug 2023 11:57:04 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 In the context of an auto pull request, when a common merge point is not found the integration will continue the analysis without failing. Signed-off-by: Simone Ballarin Acked-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/action.settings | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation/eclair_analysis/ECLAIR/action.settings index 528bc24c72..f96368ffc7 100644 --- a/automation/eclair_analysis/ECLAIR/action.settings +++ b/automation/eclair_analysis/ECLAIR/action.settings @@ -138,7 +138,9 @@ auto_pull_request) git remote add autoPRRemote "${autoPRRemoteUrl}" git fetch -q autoPRRemote subDir="${ref}" - baseCommitId=$(git merge-base "autoPRRemote/${autoPRBranch}" HEAD) + if ! baseCommitId=$(git merge-base "autoPRRemote/${autoPRBranch}" HEAD); then + baseCommitId=no_merge_point + fi jobHeadline="ECLAIR ${ANALYSIS_KIND} on repository ${repository}: ${pushUser} wants to merge ${repository}:${ref} (${headCommitId}) into ${autoPRRepository}/${autoPRBranch} (${baseCommitId})" ;; *)