All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] automation: fix eclair scanning for merge requests
@ 2024-08-01 22:06 Stefano Stabellini
  2024-08-03  6:17 ` Nicola Vetrini
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2024-08-01 22:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Simone Ballarin, nicola.vetrini, consulting, sstabellini

The ECLAIR jobs part of the Gitlab CI pipeline fail reliably when the
pipeline is started from a merge request. This is the error:

Unexpected event pull_request

The error is a consequence of action.settings setting event=pull_request
for merge_request_event. Given that we don't need any special behavior
from ECLAIR for merge requests, just run the regular scan, change
action.settings to set event=push for merge_request_event (same as for
pipeline triggered by git push).

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>

---
Example of a failure:
https://gitlab.com/xen-project/hardware/xen/-/jobs/7486162928

Example of a success with this patch applies:
https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/1397672866

diff --git a/automation/eclair_analysis/ECLAIR/action.settings b/automation/eclair_analysis/ECLAIR/action.settings
index 1577368b61..1bfb22b1c1 100644
--- a/automation/eclair_analysis/ECLAIR/action.settings
+++ b/automation/eclair_analysis/ECLAIR/action.settings
@@ -64,14 +64,11 @@ gitlab)
 
     case "${CI_PIPELINE_SOURCE}" in
     merge_request_event)
-        event=pull_request
-        pullRequestId="${CI_MERGE_REQUEST_IID}"
-        pullRequestHeadRef="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
-        pullRequestHeadRepo="${CI_MERGE_REQUEST_SOURCE_PROJECT_PATH}"
-        pullRequestBaseRef="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}"
-        pullRequestUser="${GITLAB_USER_LOGIN}"
+        event=push
+        ref_kind=branch
+        ref="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
         headCommitId="${CI_COMMIT_SHA}"
-        baseCommitId="${CI_MERGE_REQUEST_DIFF_BASE_SHA}"
+        pushUser="${GITLAB_USER_NAME}"
         ;;
     push | pipeline | web | schedule)
         event=push


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-06 19:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 22:06 [PATCH] automation: fix eclair scanning for merge requests Stefano Stabellini
2024-08-03  6:17 ` Nicola Vetrini
2024-08-06  1:03   ` Stefano Stabellini
2024-08-06  6:35     ` Simone Ballarin
2024-08-06 18:25       ` Stefano Stabellini
2024-08-06 19:15         ` Simone Ballarin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.