EnricoMi commented on PR #36888:
URL: https://github.com/apache/spark/pull/36888#issuecomment-1158568912

   Yes, the idea was to define the strategy matrix as JSON in `precondition`. 
GitHub gives this working example:
   https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson
   
   Then, module sets would be defined once in one place. There, it could run 
`is-changed.py` for each of the module sets and add that to the JSON. Here is a 
sketch: 
https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson
   
   Ideally, individual jobs of the `build` and `pyspark` matrix then would be 
skipped as easily as this:
   ```yaml
   build:
     strategy:
       matrix: ${{ fromJSON( needs.precondition.outputs.spark-matrix ) }}
     if: matrix.run != 'false' && matrix.changed != 'false'
   ```
   
   But this is not allowed, `matrix` does not work in the `if` clause: 
https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability


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