Copilot commented on code in PR #12557:
URL: https://github.com/apache/gluten/pull/12557#discussion_r3608669529


##########
.github/workflows/velox_backend_x86.yml:
##########
@@ -1207,10 +1207,13 @@ jobs:
           path: ./cpp/build/
       - name: Prepare
         run: |
-          dnf install -y python3.11 python3.11-pip python3.11-devel && \
-          ls -la /usr/bin/python3.11 && \
-          alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 
1 && \
-          alternatives --set python3 /usr/bin/python3.11 && \
+          # Spark 4.1 python UDF tests require Python >= 3.10, which is not
+          # packaged for CentOS 8; install it via miniconda instead.
+          curl -fsSL -o /tmp/miniconda.sh 
https://repo.anaconda.com/miniconda/Miniconda3-py311_24.7.1-0-Linux-x86_64.sh 
&& \
+          bash /tmp/miniconda.sh -b -p /opt/miniconda3 && \
+          ln -sf /opt/miniconda3/bin/python3.11 /usr/bin/python3 && \
+          ln -sf /opt/miniconda3/bin/pip3 /usr/bin/pip3 && \
+          python3 --version && \
           pip3 install setuptools==77.0.3 && \
           pip3 install pyspark==3.5.5 cython && \
           pip3 install pandas==2.2.3 pyarrow==20.0.0

Review Comment:
   Avoid mutating global /usr/bin/python3 and /usr/bin/pip3 via symlinks. This 
can have hard-to-debug side effects on other tooling in the container (and is 
unnecessary here). Prefer invoking the Miniconda Python directly (python -m 
pip) for installs and version checks.



##########
.github/workflows/velox_backend_x86.yml:
##########
@@ -1207,10 +1207,13 @@ jobs:
           path: ./cpp/build/
       - name: Prepare
         run: |
-          dnf install -y python3.11 python3.11-pip python3.11-devel && \
-          ls -la /usr/bin/python3.11 && \
-          alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 
1 && \
-          alternatives --set python3 /usr/bin/python3.11 && \
+          # Spark 4.1 python UDF tests require Python >= 3.10, which is not
+          # packaged for CentOS 8; install it via miniconda instead.
+          curl -fsSL -o /tmp/miniconda.sh 
https://repo.anaconda.com/miniconda/Miniconda3-py311_24.7.1-0-Linux-x86_64.sh 
&& \
+          bash /tmp/miniconda.sh -b -p /opt/miniconda3 && \

Review Comment:
   The workflow downloads and executes the Miniconda installer directly from 
the internet. For supply-chain safety, add an integrity check (e.g., pinned 
SHA-256 verification) before executing the script.



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