shrirangmhalgi commented on code in PR #56479:
URL: https://github.com/apache/spark/pull/56479#discussion_r3411431206


##########
.github/workflows/benchmark.yml:
##########
@@ -156,6 +164,19 @@ jobs:
       # In order to get diff files
       with:
         fetch-depth: 0
+    - name: Check CPU model
+      run: |
+        CPU_MODEL=$(grep "model name" /proc/cpuinfo | head -1 | sed 's/model 
name\s*:\s*//')
+        echo "Runner CPU: $CPU_MODEL"
+        echo "::notice::Runner CPU: $CPU_MODEL"
+        if [ -n "${{ inputs.expected-cpu }}" ]; then

Review Comment:
   Nit: `${{ inputs.expected-cpu }}` is template-expanded before the shell 
runs, so special characters in the input would be interpreted as shell syntax. 
For `workflow_dispatch` this is low-risk (only committers can trigger), but the 
standard hygiene fix is to route through env: so it becomes a properly-quoted 
shell variable:
   
   ```yaml
   env:
     EXPECTED_CPU: ${{ inputs.expected-cpu }}
   run: |
     ...
     if echo "$CPU_MODEL" | grep -qF "$EXPECTED_CPU"; then
   ```



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