[LIVY-1067] Bump CI Python to 3.11.11 and fix python-api PEP 440 version - #540
Open
roczei wants to merge 1 commit into
Open
[LIVY-1067] Bump CI Python to 3.11.11 and fix python-api PEP 440 version#540roczei wants to merge 1 commit into
roczei wants to merge 1 commit into
Conversation
## What changes were proposed in this pull request?
Prepares the CI environment and the python-api package metadata for the
upcoming Spark 4 support commit. Both changes are also useful on the
existing Spark 3 build: the PEP 440 fix unblocks `pip3 install
livy-python-api` on modern pip (>= 24), and the Python bump keeps the
CI image on a version supported by both Spark 3.5 and Spark 4.1.
**CI Python bumped to 3.11.11**
dev/docker/livy-dev-base/Dockerfile pyenv Python bumped from 3.9.21 to
3.11.11, and .github/workflows/integration-tests.yaml pins
`pyenv global 3.11.11` explicitly. Rationale (per each Spark release's
python/setup.py): Spark 4.1 declares `python_requires=">=3.10"` with
classifiers listing 3.10/3.11/3.12/3.13/3.14, while Spark 3.5 declares
`python_requires=">=3.8"` with classifiers listing 3.8/3.9/3.10/3.11.
The intersection of the two supported ranges is 3.10 and 3.11; we pick
the higher one (3.11.11) so the same image serves both matrix profiles.
The old 3.9.21 was below the Spark 4.1 lower bound. Both the Dockerfile
and the workflow now document this choice inline so future bumps stay
in sync.
The CI Docker image (`ghcr.io/${owner}/livy-ci:latest`) had to be
rebuilt and pushed manually for the PR CI to pick up the new Python
before this PR is merged: `.github/workflows/build-ci-image.yaml` only
fires on push to master, so branch/PR runs would otherwise still pull
the stale image cached from the previous Dockerfile. Commands used
(from macOS Apple Silicon, cross-built for linux/amd64 to match the
GitHub Actions runners):
gh auth refresh --scopes write:packages,read:packages
gh auth token | docker login ghcr.io -u <owner> --password-stdin
docker buildx build --platform linux/amd64 \
-t ghcr.io/<owner>/livy-ci:latest --push \
dev/docker/livy-dev-base
After this PR merges to master, the workflow will republish the image
on any future Dockerfile change automatically, so this manual step is
only needed for the bootstrap run.
**python-api/setup.py PEP 440 version fix**
Version bumped from `1.0.0-SNAPSHOT` (Maven-style, not PEP 440
compliant) to `1.0.0.dev0` (the canonical Python "pre-release under
active development" form). Modern pip (>= 24) refuses to parse the old
value with `Invalid version: '1.0.0-SNAPSHOT'`, which surfaced as
`WARNING: Error parsing dependencies of livy-python-api` on every
`pip3 install` and blocked the `validate Python-API requests`
integration test from resolving its dependencies. The Maven POM
version (`python-api/pom.xml`) stays `1.0.0-SNAPSHOT` -- Maven and pip
have separate versioning conventions and only the pip-visible metadata
needs to change.
## How was this patch tested?
- `pip3 install ./python-api` no longer emits
`WARNING: Error parsing dependencies of livy-python-api: Invalid
version: '1.0.0-SNAPSHOT'`; the package installs cleanly on pip 24+.
- Rebuilt the CI Docker image locally with the pyenv 3.11.11 bump and
confirmed `python3 --version` reports `Python 3.11.11` inside the
container.
- GitHub Actions Integration Tests workflow runs `pyenv global 3.11.11`
successfully on the -Pspark3 -Pscala-2.12 matrix entry (this commit
does not yet add any Spark 4 entry).
## Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)
Contributor
Author
|
Hi @gyogal and @ArnavBalyan, This PR is ready for code review. Could you please take a look at this when you have a moment? Any feedback you provide would be greatly appreciated! Thank you! |
Contributor
|
The error message in the integration tests ( |
gyogal
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Prepares the CI environment and the python-api package metadata for the upcoming Spark 4 support commit. Both changes are also useful on the existing Spark 3 build: the PEP 440 fix unblocks
pip3 install livy-python-apion modern pip (>= 24), and the Python bump keeps the CI image on a version supported by both Spark 3.5 and Spark 4.1.CI Python bumped to 3.11.11
dev/docker/livy-dev-base/Dockerfile pyenv Python bumped from 3.9.21 to 3.11.11, and .github/workflows/integration-tests.yaml pins
pyenv global 3.11.11explicitly. Rationale (per each Spark release's python/setup.py): Spark 4.1 declarespython_requires=">=3.10"with classifiers listing 3.10/3.11/3.12/3.13/3.14, while Spark 3.5 declarespython_requires=">=3.8"with classifiers listing 3.8/3.9/3.10/3.11. The intersection of the two supported ranges is 3.10 and 3.11; we pick the higher one (3.11.11) so the same image serves both matrix profiles. The old 3.9.21 was below the Spark 4.1 lower bound. Both the Dockerfile and the workflow now document this choice inline so future bumps stay in sync.The CI Docker image (
ghcr.io/${owner}/livy-ci:latest) had to be rebuilt and pushed manually for the PR CI to pick up the new Python before this PR is merged:.github/workflows/build-ci-image.yamlonly fires on push to master, so branch/PR runs would otherwise still pull the stale image cached from the previous Dockerfile. Commands used (from macOS Apple Silicon, cross-built for linux/amd64 to match the GitHub Actions runners):After this PR merges to master, the workflow will republish the image on any future Dockerfile change automatically, so this manual step is only needed for the bootstrap run.
python-api/setup.py PEP 440 version fix
Version bumped from
1.0.0-SNAPSHOT(Maven-style, not PEP 440 compliant) to1.0.0.dev0(the canonical Python "pre-release under active development" form). Modern pip (>= 24) refuses to parse the old value withInvalid version: '1.0.0-SNAPSHOT', which surfaced asWARNING: Error parsing dependencies of livy-python-apion everypip3 installand blocked thevalidate Python-API requestsintegration test from resolving its dependencies. The Maven POM version (python-api/pom.xml) stays1.0.0-SNAPSHOT-- Maven and pip have separate versioning conventions and only the pip-visible metadata needs to change.How was this patch tested?
pip3 install ./python-apino longer emitsWARNING: Error parsing dependencies of livy-python-api: Invalid version: '1.0.0-SNAPSHOT'; the package installs cleanly on pip 24+.python3 --versionreportsPython 3.11.11inside the container.pyenv global 3.11.11successfully on the -Pspark3 -Pscala-2.12 matrix entry (this commit does not yet add any Spark 4 entry).Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)