Skip to content

Commit

Permalink
Bump default python to 3.10 (#1273)
Browse files Browse the repository at this point in the history
* use python 3.10 for gateway/ray deployments

Signed-off-by: Paul S. Schweigert <[email protected]>

* helm lint python version

Signed-off-by: Paul S. Schweigert <[email protected]>

* more places

Signed-off-by: Paul S. Schweigert <[email protected]>

* use python 3.10 in docker build action

Signed-off-by: Paul S. Schweigert <[email protected]>

* fix build containers test

Signed-off-by: Paul S. Schweigert <[email protected]>

* more changes

Signed-off-by: Paul S. Schweigert <[email protected]>

---------

Signed-off-by: Paul S. Schweigert <[email protected]>
  • Loading branch information
psschwei authored Apr 10, 2024
1 parent 10f6b19 commit 5ea210d
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/actions/helm-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
check-latest: true

- name: Set up chart-testing
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/build-containers-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ jobs:
- Dockerfile-ray-node
- gateway/Dockerfile
python:
- "3.8"
- "3.9"
- "3.10"
exclude:
# gateway is only built using python 3.9
# gateway is only built using python 3.10
- dockerfile: gateway/Dockerfile
python: "3.8"
- dockerfile: gateway/Dockerfile
python: "3.10"
python: "3.9"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/client-pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
release:
types: [published]


jobs:
release-package:
Expand All @@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'
- name: Install Deps
run: pip install -U twine wheel
- name: Build Artifacts
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/client-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
fail-fast: false # keep running if one leg fails
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: sleep 90
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'
- name: install dependencies
shell: bash
run: pip install client/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
include:
- image: "quantum-serverless-gateway:latest"
dockerfile: "./gateway/Dockerfile"
pyversion: "3.9"
pyversion: "3.10"
- image: "quantum-serverless-ray-node:latest-py39"
dockerfile: "Dockerfile-ray-node"
pyversion: "py39"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notebook-local-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'
- name: patch notebooks
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
include:
- image: "quantum-serverless-gateway:latest"
dockerfile: "./gateway/Dockerfile"
pyversion: "3.9"
pyversion: "3.10"
- image: "quantum-serverless-ray-node:latest-py39"
dockerfile: "Dockerfile-ray-node"
pyversion: "py39"
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ Add a new feature.
The new feature will provide the possibility to do something awesome.
```

From time to time, you want to check if your `main` branch is still up-to-date. If not, you will need to
[rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase)
From time to time, you want to check if your `main` branch is still up-to-date. If not, you will need to
[rebase](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase)
(or [merge](https://www.atlassian.com/git/tutorials/using-branches/git-merge)), then continue working:

```sh
Expand All @@ -218,8 +218,8 @@ git rebase main issue-1234-new-feature

### Adding tests

Our team upholds the philosophy that a healthy codebase will include the proper amount of testing.
From the project you are working on, you can run tests with `tox -epy39`.
Our team upholds the philosophy that a healthy codebase will include the proper amount of testing.
From the project you are working on, you can run tests with `tox -epy310`.
Note if you run this command from quantum-serverless top directory, it will build the project documentation.
For detailed testing guidelines using tox environments, please refer to [this documentation](./client/tests/README.md).

Expand Down Expand Up @@ -290,7 +290,7 @@ a core contributor.

## Code style

Code in this repository should conform to [PEP8](https://peps.python.org/pep-0008/) standards.
Code in this repository should conform to [PEP8](https://peps.python.org/pep-0008/) standards.
Style/lint checks are run to validate this. Line length must be limited to no more than 88 characters.

**Readability** is what we value most. We expect reviewers to pay special attention on readability
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-ray-node
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG IMAGE_PY_VERSION=py39
ARG IMAGE_PY_VERSION=py310

FROM rayproject/ray:2.9.3-$IMAGE_PY_VERSION AS ray-node-amd64

Expand Down
2 changes: 1 addition & 1 deletion charts/quantum-serverless/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ gateway:
type: ClusterIP
port: 8000
ray:
nodeImage: "icr.io/quantum-public/quantum-serverless-ray-node:0.9.0-py39"
nodeImage: "icr.io/quantum-public/quantum-serverless-ray-node:0.9.0-py310"
opensslImage: registry.access.redhat.com/ubi8/openssl:8.8-9
kubectlImage: alpine/k8s:1.29.2@sha256:a51aa37f0a34ff827c7f2f9cb7f6fbb8f0e290fa625341be14c2fcc4b1880f60
limits:
Expand Down
2 changes: 1 addition & 1 deletion client/tests/resources/test-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
testrayhead:
container_name: testrayhead
image: icr.io/quantum-public/quantum-serverless-ray-node:latest-py39
image: icr.io/quantum-public/quantum-serverless-ray-node:latest-py310
entrypoint: [
"ray", "start", "--head", "--port=6379",
"--dashboard-host=0.0.0.0", "--block"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
services:
ray-head:
container_name: ray-head
image: icr.io/quantum-public/quantum-serverless-ray-node:${VERSION:-0.9.0}-py39
image: icr.io/quantum-public/quantum-serverless-ray-node:${VERSION:-0.9.0}-py310
entrypoint: [
"ray", "start", "--head", "--port=6379",
"--dashboard-host=0.0.0.0", "--block"
Expand Down
2 changes: 1 addition & 1 deletion gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim-buster
FROM python:3.10.12-slim-buster

WORKDIR /usr/src/app

Expand Down
2 changes: 1 addition & 1 deletion gateway/main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
),
}
RAY_NODE_IMAGE = os.environ.get(
"RAY_NODE_IMAGE", "icr.io/quantum-public/quantum-serverless-ray-node:0.7.1-py39"
"RAY_NODE_IMAGE", "icr.io/quantum-public/quantum-serverless-ray-node:0.9.0-py310"
)
RAY_NODE_IMAGES_MAP = {
"default": RAY_NODE_IMAGE,
Expand Down

0 comments on commit 5ea210d

Please sign in to comment.