Copilot commented on code in PR #797:
URL: https://github.com/apache/tsfile/pull/797#discussion_r3230915127


##########
.github/workflows/wheels.yml:
##########
@@ -144,6 +144,54 @@ jobs:
             python -c "import tsfile, tsfile.tsfile_reader as r; 
print('import-ok:')"
           CIBW_BUILD_VERBOSITY: "1"
         run: cibuildwheel --output-dir wheelhouse python
+
+      - name: Build wheels via cibuildwheel (Linux cp314)
+        if: matrix.platform != 'macos'
+        env:
+          CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
+#          CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_archs_windows }}
+
+          CIBW_BUILD: "cp314-*"
+          CIBW_SKIP: "pp* *-musllinux*"
+
+          CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
+          CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28"
+
+          MACOSX_DEPLOYMENT_TARGET: "12.0"
+
+          CIBW_BEFORE_ALL_LINUX: |
+            set -euxo pipefail
+            if command -v yum >/dev/null 2>&1; then
+              yum install -y wget tar gzip pkgconfig libuuid-devel 
libblkid-devel
+            elif command -v dnf >/dev/null 2>&1; then
+              dnf install -y wget tar gzip pkgconfig libuuid-devel 
libblkid-devel
+            else
+              echo "No supported package manager found (expected yum or dnf)." 
; exit 1
+            fi
+            ARCH="$(uname -m)"
+            mkdir -p /opt/java
+            if [ "$ARCH" = "x86_64" ]; then
+              
JDK_URL="https://download.oracle.com/java/17/archive/jdk-17.0.12_linux-x64_bin.tar.gz";
+            else
+              # aarch64
+              
JDK_URL="https://download.oracle.com/java/17/archive/jdk-17.0.12_linux-aarch64_bin.tar.gz";
+            fi
+            curl -L -o /tmp/jdk17.tar.gz "$JDK_URL"
+            tar -xzf /tmp/jdk17.tar.gz -C /opt/java
+            export JAVA_HOME=$(echo /opt/java/jdk-17.0.12*)

Review Comment:
   The Linux cp314 step downloads an Oracle JDK tarball via curl without any 
integrity/authenticity verification (checksum/signature). This is a 
supply-chain risk and can also introduce non-reproducible builds if the 
upstream content changes. Prefer installing OpenJDK 17 from the manylinux 
image’s package manager (yum/dnf) or verify the tarball against a pinned 
SHA-256 before extracting.
   



##########
.github/workflows/wheels.yml:
##########
@@ -144,6 +144,54 @@ jobs:
             python -c "import tsfile, tsfile.tsfile_reader as r; 
print('import-ok:')"
           CIBW_BUILD_VERBOSITY: "1"
         run: cibuildwheel --output-dir wheelhouse python
+
+      - name: Build wheels via cibuildwheel (Linux cp314)
+        if: matrix.platform != 'macos'
+        env:
+          CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
+#          CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_archs_windows }}
+
+          CIBW_BUILD: "cp314-*"
+          CIBW_SKIP: "pp* *-musllinux*"
+
+          CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
+          CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28"
+
+          MACOSX_DEPLOYMENT_TARGET: "12.0"
+
+          CIBW_BEFORE_ALL_LINUX: |
+            set -euxo pipefail
+            if command -v yum >/dev/null 2>&1; then
+              yum install -y wget tar gzip pkgconfig libuuid-devel 
libblkid-devel
+            elif command -v dnf >/dev/null 2>&1; then
+              dnf install -y wget tar gzip pkgconfig libuuid-devel 
libblkid-devel
+            else
+              echo "No supported package manager found (expected yum or dnf)." 
; exit 1
+            fi

Review Comment:
   The cp314 Linux cibuildwheel step repeats the full `CIBW_BEFORE_ALL_LINUX` 
script that already exists in the cp39–cp313 step. Keeping two near-identical 
multi-line scripts is hard to maintain and easy to let drift (package list/JDK 
URL/Maven flags). Consider factoring the shared script into a single job-level 
env/YAML anchor and reusing it in both steps (only overriding the manylinux 
image / build selector).



##########
.github/workflows/wheels.yml:
##########
@@ -144,6 +144,54 @@ jobs:
             python -c "import tsfile, tsfile.tsfile_reader as r; 
print('import-ok:')"
           CIBW_BUILD_VERBOSITY: "1"
         run: cibuildwheel --output-dir wheelhouse python
+
+      - name: Build wheels via cibuildwheel (Linux cp314)
+        if: matrix.platform != 'macos'

Review Comment:
   Both Linux cibuildwheel steps use `if: matrix.platform != 'macos'`. Since 
the matrix only defines `linux` and `macos`, this currently works, but it’s 
less explicit and could accidentally include additional non-macOS platforms if 
added later. Prefer `if: matrix.platform == 'linux'` for clarity and 
future-proofing.
   



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