Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/build_publish_lambda_layer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-minor: ["9", "10", "11", "12", "13"]
python-minor: ["10", "11", "12", "13"]
apm-env: ["lambda"]
steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -80,6 +80,6 @@ jobs:
with:
artifact-name: solarwinds_apm_lambda.zip
component-version: ${{ needs.get_apm_python_version.outputs.sw-apm-version }}
runtimes: "python3.9 python3.10 python3.11 python3.12 python3.13"
runtimes: "python3.10 python3.11 python3.12 python3.13"
publish-dest: ${{ inputs.publish-dest }}
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/run_tox_lint_format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-minor: ["9", "10", "11", "12", "13"]
python-minor: ["10", "11", "12", "13"]
steps:
- uses: actions/checkout@v6
- name: Setup Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tox_ruff_format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-minor: ["9", "10", "11", "12", "13"]
python-minor: ["10", "11", "12", "13"]
steps:
- uses: actions/checkout@v6
- name: Setup Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tox_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-minor: ["9", "10", "11", "12", "13"]
python-minor: ["10", "11", "12", "13"]
apm-env: ["test"]
steps:
- uses: actions/checkout@v6
Expand Down
66 changes: 34 additions & 32 deletions .github/workflows/verify_install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,9 @@ jobs:
strategy:
matrix:
hostname:
- py3.9-alpine3.13
- py3.9-alpine3.16
- py3.9-alpine3.17
- py3.9-centos8
- py3.9-debian10
- py3.9-debian11
- py3.9-rhel8
- py3.10-alpine3.13
- py3.10-alpine3.16
- py3.10-alpine3.17
- py3.10-amazon2023
- py3.10-debian10
- py3.10-debian11
- py3.10-ubuntu22.04
Expand All @@ -78,28 +70,12 @@ jobs:
- x64
- arm64
include:
- hostname: py3.9-alpine3.13
image: python:3.9-alpine3.13
- hostname: py3.9-alpine3.16
image: python:3.9-alpine3.16
- hostname: py3.9-alpine3.17
image: python:3.9-alpine3.17
- hostname: py3.9-centos8
image: centos:8
- hostname: py3.9-debian10
image: python:3.9-buster
- hostname: py3.9-debian11
image: python:3.9-bullseye
- hostname: py3.9-rhel8
image: registry.fedoraproject.org/f33/python3
- hostname: py3.10-alpine3.13
image: python:3.10-alpine3.13
- hostname: py3.10-alpine3.16
image: python:3.10-alpine3.16
- hostname: py3.10-alpine3.17
image: python:3.10-alpine3.17
- hostname: py3.10-amazon2023
image: amazonlinux:2023
- hostname: py3.10-debian10
image: python:3.10-buster
- hostname: py3.10-debian11
Expand Down Expand Up @@ -136,12 +112,6 @@ jobs:
image: python:3.13-alpine3.20
exclude:
# Note: JavaScript Actions (checkout) in Alpine only supported in x64
- hostname: py3.9-alpine3.13
arch: arm64
- hostname: py3.9-alpine3.16
arch: arm64
- hostname: py3.9-alpine3.17
arch: arm64
- hostname: py3.10-alpine3.13
arch: arm64
- hostname: py3.10-alpine3.16
Expand Down Expand Up @@ -171,16 +141,48 @@ jobs:
steps:
- if: contains(matrix.image, 'amazonlinux') || contains(matrix.image, 'aws-lambda-python')
name: Install AmazonLinux deps to use checkout
run: dnf install -y tar gzip
run: |
if command -v dnf >/dev/null 2>&1; then
dnf install -y tar gzip
else
yum install -y tar gzip
fi
# Use checkout@v4 for Alpine versions < 3.17 that don't support Node.js 24
- if: contains(matrix.hostname, 'alpine3.13') || contains(matrix.hostname, 'alpine3.14') || contains(matrix.hostname, 'alpine3.15') || contains(matrix.hostname, 'alpine3.16')
uses: actions/checkout@v4
# Else use latest checkout
- if: ${{ !(contains(matrix.hostname, 'alpine3.13') || contains(matrix.hostname, 'alpine3.14') || contains(matrix.hostname, 'alpine3.15') || contains(matrix.hostname, 'alpine3.16')) }}
- if: ${{ !(contains(matrix.hostname, 'alpine3.13') || contains(matrix.hostname, 'alpine3.14') || contains(matrix.hostname, 'alpine3.15') || contains(matrix.hostname, 'alpine3.16') || contains(matrix.hostname, 'amazon2-')) }}
uses: actions/checkout@v6
- name: Setup and run install test
working-directory: ./tests/docker/install
run: APM_ROOT=$GITHUB_WORKSPACE ./_helper_run_install_tests.sh
shell: sh
env:
MODE: ${{ github.event.inputs.install-registry }}

# Amazon Linux 2 (Python 3.10) - uses docker run instead of container job to avoid GLIBC 2.26 issues
install-tests-amazon2:
runs-on: ${{ contains(matrix.image, 'arm64') && fromJSON('{"group":"apm-arm-runner"}') || 'ubuntu-latest' }}
strategy:
matrix:
image:
- amazon/aws-lambda-python:3.10-arm64
- amazon/aws-lambda-python:3.10-x86_64
steps:
- uses: actions/checkout@v6
- name: Run install test in Amazon Linux 2 container
run: |
docker run --rm \
--entrypoint sh \
-v $GITHUB_WORKSPACE:/code/python-solarwinds \
-w /code/python-solarwinds/tests/docker/install \
-e MODE="${{ github.event.inputs.install-registry }}" \
-e PYTHON_VERSION="3.10" \
-e SOLARWINDS_APM_VERSION="${{ github.event.inputs.solarwinds-version }}" \
-e SW_APM_COLLECTOR_PROD="${{ secrets.SW_APM_COLLECTOR_PROD }}" \
-e SW_APM_COLLECTOR_STAGING="${{ secrets.SW_APM_COLLECTOR_STAGING }}" \
-e SW_APM_SERVICE_KEY_PROD="${{ secrets.SW_APM_SERVICE_KEY_PROD }}" \
-e SW_APM_SERVICE_KEY_STAGING="${{ secrets.SW_APM_SERVICE_KEY_STAGING }}" \
-e APM_ROOT=/code/python-solarwinds \
${{ matrix.image }} \
-c "set -x && ./_helper_run_install_tests.sh"
1 change: 0 additions & 1 deletion .github/workflows/verify_install_macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/verify_install_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ check-zip:
# Create package source distribution archive
sdist:
@echo -e "Generating python agent sdist package"
@python3.9 -m build --sdist
@python3.10 -m build --sdist
@echo -e "\nDone."

# Check local package source distribution archive contents, without install
Expand All @@ -48,10 +48,10 @@ check-sdist-local:
@cd ./tests/docker/install && MODE=local APM_ROOT=$(CURR_DIR) ./_helper_check_sdist.sh
@cd $(CURR_DIR)

# Build the Python library package bdist (wheel) for 64 bit linux systems using Python 3.9
# Build the Python library package bdist (wheel) for 64 bit linux systems using Python 3.10
wheel:
@echo -e "Generating Python library wheel for 64 bit systems"
@/opt/python/cp39-cp39/bin/pip -v wheel . -w ./dist/ --no-deps
@/opt/python/cp310-cp310/bin/pip -v wheel . -w ./dist/ --no-deps
@echo -e "\nDone."

# Check local package wheel contents, without install
Expand All @@ -72,13 +72,13 @@ install-lambda-modules:
@echo -e "Creating target directory ${target_dir} for AWS Lambda layer artifacts."
mkdir -p ${target_dir}/python
@echo -e "Install setuptools"
/opt/python/cp39-cp39/bin/pip install setuptools
/opt/python/cp310-cp310/bin/pip install setuptools
@echo -e "Install upstream dependencies to include in layer"
/opt/python/cp39-cp39/bin/pip install -t ${target_dir}/python -r lambda/requirements.txt
/opt/python/cp310-cp310/bin/pip install -t ${target_dir}/python -r lambda/requirements.txt
@echo -e "Install upstream dependencies without deps to include in layer"
@/opt/python/cp39-cp39/bin/pip install -t ${target_dir}/nodeps -r lambda/requirements-nodeps.txt --no-deps
@/opt/python/cp310-cp310/bin/pip install -t ${target_dir}/nodeps -r lambda/requirements-nodeps.txt --no-deps
@echo -e "Install solarwinds_apm to be packed up in zip archive to target directory."
@/opt/python/cp39-cp39/bin/pip install . -t ${target_dir}/nodeps --no-deps
@/opt/python/cp310-cp310/bin/pip install . -t ${target_dir}/nodeps --no-deps
@echo -e "Moving no-deps dependencies, needed for full opentelemetry/instrumentation path"
@cp -r ${target_dir}/nodeps/* ${target_dir}/python
@rm -rf ${target_dir}/nodeps
Expand Down Expand Up @@ -110,10 +110,10 @@ aws-lambda: check-zip install-lambda-modules check-lambda-modules
# variable definitions and recipes for testing, linting, cleanup
#----------------------------------------------------------------------------------------------------------------------#

# Example: make tox OPTIONS="-e py39-test"
# Example: make tox OPTIONS="-e py310-test"
# Example: make tox OPTIONS="-e lint -- --check-only"
tox:
@python3.9 -m tox $(OPTIONS)
@python3.10 -m tox $(OPTIONS)

format:
@echo -e "Not implemented."
Expand Down
9 changes: 4 additions & 5 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
opentelemetry-test-utils==0.62b1
opentelemetry-instrumentation-flask==0.62b1
opentelemetry-instrumentation-requests==0.62b1
opentelemetry-test-utils==0.63b1
opentelemetry-instrumentation-flask==0.63b1
opentelemetry-instrumentation-requests==0.63b1
pytest
pytest-cov
pytest-mock
requests
flask~=3.1; python_version >= '3.9'
flask~=3.0; python_version < '3.9'
flask~=3.1
werkzeug
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ services:
# boto3 for interaction with AWS
# twine to upload to TestPyPi
# tox for automated tests
python3.9 -m pip install --upgrade pip
python3.9 -m pip install --default-timeout=100 build boto3 twine tox
python3.10 -m pip install --upgrade pip
python3.10 -m pip install --default-timeout=100 build boto3 twine tox
/bin/bash

aarch64:
Expand All @@ -45,6 +45,6 @@ services:
# boto3 for interaction with AWS
# twine to upload to TestPyPi
# tox for automated tests
python3.9 -m pip install --upgrade pip
python3.9 -m pip install --default-timeout=100 build boto3 twine tox
python3.10 -m pip install --upgrade pip
python3.10 -m pip install --default-timeout=100 build boto3 twine tox
/bin/bash
8 changes: 4 additions & 4 deletions image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
# - For auto-instrumentation by container injection, the Linux command cp is
# used and must be availabe in the image.

FROM python:3.9 AS build-39
FROM python:3.10 AS build-310
WORKDIR /operator-build
ADD requirements-nodeps.txt .
ADD requirements.txt .
RUN mkdir workspace
RUN pip install --no-deps --target workspace -r requirements-nodeps.txt
RUN pip install --target workspace -r requirements.txt

FROM python:3.9-alpine AS build-musl-39
FROM python:3.10-alpine AS build-musl-310
WORKDIR /operator-build
ADD requirements-nodeps.txt .
ADD requirements.txt .
Expand All @@ -29,8 +29,8 @@ RUN pip install --target workspace -r requirements.txt

FROM busybox

COPY --from=build-39 /operator-build/workspace /autoinstrumentation
COPY --from=build-musl-39 /operator-build/workspace /autoinstrumentation-musl
COPY --from=build-310 /operator-build/workspace /autoinstrumentation
COPY --from=build-musl-310 /operator-build/workspace /autoinstrumentation-musl

RUN chmod -R go+r /autoinstrumentation
RUN chmod -R go+r /autoinstrumentation-musl
8 changes: 4 additions & 4 deletions image/Dockerfile-beta
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
# - For auto-instrumentation by container injection, the Linux command cp is
# used and must be availabe in the image.

FROM python:3.9 AS build-39
FROM python:3.10 AS build-310
WORKDIR /operator-build
ADD requirements-nodeps-beta.txt .
ADD requirements.txt .
RUN mkdir workspace
RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps-beta.txt
RUN pip install --target workspace -r requirements.txt

FROM python:3.9-alpine AS build-musl-39
FROM python:3.10-alpine AS build-musl-310
WORKDIR /operator-build
ADD requirements-nodeps-beta.txt .
ADD requirements.txt .
Expand All @@ -29,8 +29,8 @@ RUN pip install --target workspace -r requirements.txt

FROM busybox

COPY --from=build-39 /operator-build/workspace /autoinstrumentation
COPY --from=build-musl-39 /operator-build/workspace /autoinstrumentation-musl
COPY --from=build-310 /operator-build/workspace /autoinstrumentation
COPY --from=build-musl-310 /operator-build/workspace /autoinstrumentation-musl

RUN chmod -R go+r /autoinstrumentation
RUN chmod -R go+r /autoinstrumentation-musl
Loading
Loading