Baunsgaard commented on code in PR #16945:
URL: https://github.com/apache/iceberg/pull/16945#discussion_r3475179150


##########
.github/workflows/delta-conversion-ci.yml:
##########
@@ -78,7 +78,7 @@ jobs:
     strategy:
       max-parallel: 15
       matrix:
-        jvm: [17, 21]
+        jvm: ${{ fromJson((github.event_name == 'pull_request' && 
contains(github.event.pull_request.labels.*.name, 'full-ci') == false) && 
'[17]' || '[17,21]') }}

Review Comment:
   There are some options if you want:
   
   Option 1: across lines with the '>-' prepend. It does not move the logic out 
but it splits the line at least. 
   ```
     matrix:
       # PRs run JDK 17 only; push/tag and 'full-ci'-labeled PRs run 17 + 21.
       jvm: >-
         ${{ fromJson(
           (github.event_name == 'pull_request'
             && !contains(github.event.pull_request.labels.*.name, 'full-ci'))
           && '[17]'
           || '[17,21]'
         ) }}
   ```
   
   Option 2: Use exclude:
   ```
     matrix:
       jvm: [17, 21]
       # On PRs without the 'full-ci' label, drop JDK 21.
       exclude:
         - jvm: >-
             ${{ (github.event_name == 'pull_request'
               && !contains(github.event.pull_request.labels.*.name, 'full-ci'))
               && 21 || 0 }}
   ```
   
   Alternatively as @ajantha-bhat says, the original PR setup the planner job, 
but it actively increase the number of actions run. I lean towards what it is 
currently with a oneliner, but Option 1 where the statement is split seems fine 
too.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to