mumrah commented on code in PR #17148:
URL: https://github.com/apache/kafka/pull/17148#discussion_r1751200478


##########
.github/workflows/ci-complete.yml:
##########
@@ -41,8 +41,12 @@ permissions:
 jobs:
   upload-build-scan:
     # Skip this workflow if CI was run for anything other than "pull_request" 
(like "push").
-    # Also skip this workflow if the PR was from apache/kafka. Those will have 
already published the build scan in CI.
-    if: ${{ github.event.workflow_run.event == 'pull_request' && 
github.event.workflow_run.head_repository.full_name != 'apache/kafka' }}
+    # Skip this workflow if the PR was from apache/kafka. Those will have 
already published the build scan in CI.
+    # Skip this workflow if the run was skipped or cancelled
+    if: |
+      github.event.workflow_run.event == 'pull_request' && 
+      github.event.workflow_run.head_repository.full_name != 'apache/kafka' &&
+       (github.event.workflow_run.conclusion == 'success' || 
github.event.workflow_run.conclusion == 'failure')

Review Comment:
   > With this filter, the build scan must be existent, right? 
   
   Except in cases where gradle exited abnormally (i.e., no build run). I guess 
this could happen in a PR that has a syntax error in build.gradle. In this 
case, the CI workflows will all be failed and this workflow would fail too.
   
   We could use "Handle missing scan" to set an error status on the "Gradle 
Build Scan" checks. Seems reasonable to me



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to