Skip to content

feat: bump up 3.12 and 3.13 #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 58 additions & 9 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Lint codes
run: |
make env
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9
- name: Check plugin doc
run: |
make env
Expand Down Expand Up @@ -128,17 +128,48 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

build-wheel:
name: Build Wheel
needs: [ license-and-lint, changes, plugin-doc-check ]
if: |
( always() && ! cancelled() ) &&
((github.event_name == 'schedule' && github.repository == 'apache/skywalking-python') || needs.changes.outputs.agent == 'true')
runs-on: ubuntu-latest
steps:
- name: Checkout source codes
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build Wheel
run: |
make env
make package
- id: get-path
run: |
echo "path=./dist/apache_skywalking-$(poetry version | sed 's/apache-skywalking //g')-py3-none-any.whl" >> $GITHUB_OUTPUT
- name: Upload Wheel
uses: actions/upload-artifact@v4
with:
name: apache_skywalking.whl
path: ${{ steps.get-path.outputs.path }}
retention-days: 1

docker-plugin:
# build docker image for plugin tests, with matrix of Python versions
name: Build Plugin Test Image
needs: [ license-and-lint, changes, plugin-doc-check, prep-plugin-and-unit-tests ]
needs: [ license-and-lint, changes, plugin-doc-check, build-wheel, prep-plugin-and-unit-tests ]
if: |
( always() && ! cancelled() ) &&
((github.event_name == 'schedule' && github.repository == 'apache/skywalking-python') || needs.changes.outputs.agent == 'true')
runs-on: ubuntu-latest
strategy:
matrix: # may support pypy in the future
python-version: [ "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ]
python-version: [ "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim", "3.13-slim" ]
fail-fast: false
env:
BASE_PYTHON_IMAGE: ${{ matrix.python-version }}
Expand All @@ -148,8 +179,14 @@ jobs:
with:
submodules: true
persist-credentials: false
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: apache_skywalking.whl
path: .
- name: Build SkyWalking Python agent base plugin image
run: |
ls -alh
docker build --build-arg BASE_PYTHON_IMAGE -t apache/skywalking-python-agent:latest-plugin --no-cache . -f tests/plugin/Dockerfile.plugin
docker save -o docker-images-skywalking-python-plugin-${{ matrix.python-version }}.tar apache/skywalking-python-agent:latest-plugin
- name: Upload docker image with specific python version
Expand All @@ -171,7 +208,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
test-path: ${{fromJson(needs.prep-plugin-and-unit-tests.outputs.matrix)}}
fail-fast: false
env:
Expand Down Expand Up @@ -203,23 +240,30 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: apache_skywalking.whl
path: .
- name: Run unit tests
run: |
make env
make poetry gen-basic
pip install $(ls apache_skywalking*.whl)[all]
poetry install --with=dev
poetry run pytest -v ${{ matrix.test-path }}

docker-e2e:
# build docker image for E2E tests, single Python version for now.
name: Build E2E Test Image
needs: [ license-and-lint, changes, plugin-doc-check ]
needs: [ license-and-lint, changes, plugin-doc-check, build-wheel ]
if: |
( always() && ! cancelled() ) &&
((github.event_name == 'schedule' && github.repository == 'apache/skywalking-python') || needs.changes.outputs.agent == 'true')
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-image-variant: [ "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ]
python-image-variant: [ "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim", "3.13-slim" ]
fail-fast: false
env:
BASE_PYTHON_IMAGE: ${{ matrix.python-image-variant }}
Expand All @@ -229,6 +273,11 @@ jobs:
with:
submodules: true
persist-credentials: false
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: apache_skywalking.whl
path: .
- name: Build SkyWalking Python agent base e2e image
run: |
docker build --build-arg BASE_PYTHON_IMAGE -t apache/skywalking-python-agent:latest-e2e --no-cache . -f tests/e2e/base/Dockerfile.e2e
Expand All @@ -251,7 +300,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
python-image-variant: [ "3.8-slim", "3.9-slim", "3.10-slim", "3.11-slim" ]
python-image-variant: [ "3.9-slim", "3.10-slim", "3.11-slim", "3.12-slim", "3.13-slim" ]
case:
- name: gRPC-single-process
path: tests/e2e/case/grpc/single/e2e.yaml
Expand Down
14 changes: 5 additions & 9 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,29 @@ D := docker

P := grpc http kafka

TARGETS := py3.8 py3.9 py3.10 py3.8-slim py3.9-slim py3.10-slim
TARGETS := py3.9 py3.10 py3.9-slim py3.10-slim

py3.8: BASE_PYTHON_IMAGE = python:3.8
py3.9: BASE_PYTHON_IMAGE = python:3.9
py3.10: BASE_PYTHON_IMAGE = python:3.10
py3.11: BASE_PYTHON_IMAGE = python:3.11
py3.8-slim: BASE_PYTHON_IMAGE = python:3.8-slim
py3.12: BASE_PYTHON_IMAGE = python:3.12
py3.13: BASE_PYTHON_IMAGE = python:3.13
py3.9-slim: BASE_PYTHON_IMAGE = python:3.9-slim
py3.10-slim: BASE_PYTHON_IMAGE = python:3.10-slim
py3.11-slim: BASE_PYTHON_IMAGE = python:3.11-slim
py3.12-slim: BASE_PYTHON_IMAGE = python:3.12-slim
py3.13-slim: BASE_PYTHON_IMAGE = python:3.13-slim

push-py3.8: BASE_PYTHON_IMAGE = python:3.8
push-py3.9: BASE_PYTHON_IMAGE = python:3.9
push-py3.10: BASE_PYTHON_IMAGE = python:3.10
push-py3.11: BASE_PYTHON_IMAGE = python:3.11
push-py3.8-slim: BASE_PYTHON_IMAGE = python:3.8-slim
push-py3.9-slim: BASE_PYTHON_IMAGE = python:3.9-slim
push-py3.10-slim: BASE_PYTHON_IMAGE = python:3.10-slim
push-py3.11-slim: BASE_PYTHON_IMAGE = python:3.11-slim

push-py3.8: BUILDER_PYTHON_IMAGE = python:3.8
push-py3.9: BUILDER_PYTHON_IMAGE = python:3.9
push-py3.10: BUILDER_PYTHON_IMAGE = python:3.10
push-py3.11: BUILDER_PYTHON_IMAGE = python:3.11
push-py3.8-slim: BUILDER_PYTHON_IMAGE = python:3.8
push-py3.9-slim: BUILDER_PYTHON_IMAGE = python:3.9
push-py3.10-slim: BUILDER_PYTHON_IMAGE = python:3.10
push-py3.11-slim: BUILDER_PYTHON_IMAGE = python:3.11
Expand All @@ -55,8 +53,6 @@ PUSH_TARGETS := $(TARGETS:%=push-%)
build: $(TARGETS)
push: $(PUSH_TARGETS)



$(TARGETS):
cd ..; \
for p in $(P); do \
Expand Down
2 changes: 1 addition & 1 deletion docs/en/setup/Container.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source**

This image hosts the SkyWalking Python agent package on top of official Python base images (full & slim) providing support from
Python 3.8 - 3.11.
Python 3.8 - 3.13.

## How to use this image

Expand Down
Loading
Loading