diff --git a/.github/workflows/publish_aarch64.yaml b/.github/workflows/publish_aarch64.yaml index 0a5693c7..618fc89e 100644 --- a/.github/workflows/publish_aarch64.yaml +++ b/.github/workflows/publish_aarch64.yaml @@ -29,6 +29,10 @@ jobs: name: ${{ inputs.artifact-name }} - name: Unzip artifact with dist run: unzip ${{ inputs.artifact-name }} + - name: Upgrade pip + run: pip install --upgrade pip + - name: Upgrade packaging + run: pip install --upgrade packaging - name: Install Twine run: pip install --upgrade --no-cache-dir --prefer-binary twine - name: Check distribution artifacts diff --git a/.github/workflows/publish_x86_64.yaml b/.github/workflows/publish_x86_64.yaml index d37b7973..0c811bb9 100644 --- a/.github/workflows/publish_x86_64.yaml +++ b/.github/workflows/publish_x86_64.yaml @@ -29,6 +29,10 @@ jobs: name: ${{ inputs.artifact-name }} - name: Unzip artifact with dist run: unzip ${{ inputs.artifact-name }} + - name: Upgrade pip + run: pip install --upgrade pip + - name: Upgrade packaging + run: pip install --upgrade packaging - name: Install Twine run: pip install --upgrade --no-cache-dir --prefer-binary twine - name: Check distribution artifacts diff --git a/image/Dockerfile b/image/Dockerfile index 759309f7..ed368038 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -17,32 +17,32 @@ FROM python:3.8 AS build-38 WORKDIR /operator-build ADD requirements-nodeps.txt . RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.9 AS build-39 WORKDIR /operator-build ADD requirements-nodeps.txt . RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.10 AS build-310 WORKDIR /operator-build ADD requirements-nodeps.txt . RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.11 AS build-311 WORKDIR /operator-build ADD requirements-nodeps.txt . RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.12 AS build-312 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 --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt RUN pip install --target workspace -r requirements.txt @@ -51,28 +51,28 @@ WORKDIR /operator-build ADD requirements-nodeps.txt . RUN apk add g++ gcc python3-dev musl-dev linux-headers RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.9-alpine AS build-musl-39 WORKDIR /operator-build ADD requirements-nodeps.txt . RUN apk add g++ gcc python3-dev musl-dev linux-headers RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.10-alpine AS build-musl-310 WORKDIR /operator-build ADD requirements-nodeps.txt . RUN apk add g++ gcc python3-dev musl-dev linux-headers RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.11-alpine AS build-musl-311 WORKDIR /operator-build ADD requirements-nodeps.txt . RUN apk add g++ gcc python3-dev musl-dev linux-headers RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt FROM python:3.12-alpine AS build-musl-312 WORKDIR /operator-build @@ -80,7 +80,7 @@ ADD requirements-nodeps.txt . ADD requirements.txt . RUN apk add g++ gcc python3-dev musl-dev linux-headers RUN mkdir workspace -RUN pip install --no-deps --target workspace -r requirements-nodeps.txt +RUN pip install --no-deps --target workspace --extra-index-url https://test.pypi.org/simple/ -r requirements-nodeps.txt RUN pip install --target workspace -r requirements.txt FROM busybox diff --git a/image/requirements-nodeps.txt b/image/requirements-nodeps.txt index a0a19105..ceb47cb0 100644 --- a/image/requirements-nodeps.txt +++ b/image/requirements-nodeps.txt @@ -1 +1 @@ -solarwinds_apm==3.3.2 \ No newline at end of file +solarwinds_apm==3.3.3.4 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 16d4b7be..870942e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,6 +71,7 @@ solarwinds_exporter = "solarwinds_apm.exporter:SolarWindsSpanExporter" solarwinds_sampler = "solarwinds_apm.sampler:ParentBasedSwSampler" [tool.setuptools] +license-files = ["LICENSE"] include-package-data = false packages = [ "solarwinds_apm", diff --git a/solarwinds_apm/configurator.py b/solarwinds_apm/configurator.py index abdefdd7..836b5a8f 100644 --- a/solarwinds_apm/configurator.py +++ b/solarwinds_apm/configurator.py @@ -15,6 +15,8 @@ import time from typing import TYPE_CHECKING, Any +from packaging.requirements import Requirement + from opentelemetry import trace from opentelemetry._logs import set_logger_provider from opentelemetry.environment_variables import ( @@ -687,6 +689,25 @@ def _add_all_instrumented_python_framework_versions( ) continue + logger.debug("framework_versions for") + logger.debug("entry_point.name: %s", entry_point.name) + logger.debug("entry_point.dist: %s", entry_point.dist) + logger.debug( + "entry_point.dist.requires: %s, type %s", + entry_point.dist.requires, + type(entry_point.dist.requires), + ) + if type(entry_point.dist.requires) == Requirement: + extra = "extra" + instruments = "instruments" + instruments_marker = {extra: instruments} + logger.debug( + "entry_point.dist.requires.marker.evaluate to: %s", + entry_point.dist.requires.marker.evaluate( + instruments_marker + ), + ) + try: conflict = get_dist_dependency_conflicts(entry_point.dist) if conflict: @@ -714,6 +735,9 @@ def _add_all_instrumented_python_framework_versions( entry_point.name, ex, ) + logging.warning( + "exc_info: %s", type(ex).__name__, exc_info=True + ) continue # Set up Instrumented Library Versions KVs with several special cases diff --git a/solarwinds_apm/version.py b/solarwinds_apm/version.py index 3e2d550b..a33c598a 100644 --- a/solarwinds_apm/version.py +++ b/solarwinds_apm/version.py @@ -1 +1 @@ -__version__ = "3.3.2" +__version__ = "3.3.3.4"