Skip to content

Commit 038a1aa

Browse files
committed
chore(ci): Pin Java 17 for lowest-direct cell
PySpark 3.4 (the declared floor) doesn't run on Java 21, the default JDK on ubuntu-latest runners -- it hits NoSuchMethodException on java.nio.DirectByteBuffer.<init>(long, int), removed in JDK 21. Pin the lowest-direct cell to Java 17 so the resolved pyspark==3.4.0 can actually start. The default cell (which resolves to a current pyspark 4.x) keeps the runner's default Java 21. Signed-off-by: Seth Fitzsimmons <seth@mojodna.net>
1 parent 2427000 commit 038a1aa

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/check-python-code.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
# Default resolution exercises the committed lock against every
3232
# supported Python minor version. The lowest-direct cell pins each
3333
# direct dependency to its declared floor (see UV_RESOLUTION below)
34-
# and runs only on the Python floor.
34+
# and runs only on the Python floor, since the resolved-low pyspark
35+
# 3.4 wheels exist for 3.10/3.11 only.
3536
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3637
resolution: [default]
3738
include:
@@ -56,9 +57,19 @@ jobs:
5657
with:
5758
python-version: ${{ matrix.python }}
5859

60+
# PySpark 3.4 (the declared minimum) does not support Java 21, which is
61+
# the default JDK on ubuntu-latest runners. Pin to Java 17 for the
62+
# lowest-direct cell so the resolved pyspark==3.4.0 can actually start.
63+
- name: Set up JDK 17
64+
if: matrix.resolution == 'lowest-direct'
65+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
66+
with:
67+
distribution: temurin
68+
java-version: '17'
69+
5970
# UV_RESOLUTION=lowest-direct makes `uv sync` re-resolve every direct
6071
# dependency to the lowest version permitted by pyproject.toml. This
61-
# exercises the declared floor (e.g. pydantic==2.12.0) instead of
72+
# exercises the declared floor (e.g. pyspark==3.4.0) instead of
6273
# whatever the committed lock happens to point at. Failures here mean
6374
# a direct dep's minimum needs to be bumped. Set via GITHUB_ENV only
6475
# in the relevant cell so default cells run with no UV_RESOLUTION at

0 commit comments

Comments
 (0)