diff --git a/internal/signalfx-agent/bundle/Dockerfile b/internal/signalfx-agent/bundle/Dockerfile index 08514c82c6..7434856e50 100644 --- a/internal/signalfx-agent/bundle/Dockerfile +++ b/internal/signalfx-agent/bundle/Dockerfile @@ -15,8 +15,8 @@ ARG ARCH=amd64 ARG JDK_VERSION=11.0.22_7 ARG MAVEN_VERSION=3.6.0 -ARG PYTHON_VERSION=3.11.8 -ARG PIP_VERSION=21.0.1 +ARG PYTHON_VERSION=3.12.2 +ARG PIP_VERSION=24.0.0 ARG COLLECTD_VERSION=5.8.0-sfx0 ARG COLLECTD_COMMIT=4d3327b14cf4359029613baf4f90c4952702105e ARG DOCKER_REPO=docker.io @@ -265,9 +265,9 @@ RUN DISABLE_XENCPU=""; if [ "$ARCH" = "ppc64le" ]; then DISABLE_XENCPU="--disabl --disable-silent-rules \ --disable-static \ --with-java=${JAVA_HOME} \ - LIBPYTHON_LDFLAGS="$(python3.11-config --ldflags) -lpython3.11" \ - LIBPYTHON_CPPFLAGS="$(python3.11-config --includes)/cpython" \ - LIBPYTHON_LIBS="$(python3.11-config --libs) -lpython3.11" + LIBPYTHON_LDFLAGS="$(python3.12-config --ldflags) -lpython3.12" \ + LIBPYTHON_CPPFLAGS="$(python3.12-config --includes)/cpython" \ + LIBPYTHON_LIBS="$(python3.12-config --libs) -lpython3.12" # Compile all of collectd first, including plugins RUN make -j`nproc` &&\ @@ -293,12 +293,11 @@ COPY scripts/get-collectd-plugins.py /opt/scripts/ COPY scripts/requirements.txt /opt/ COPY collectd-plugins.yaml /opt/ +RUN /usr/local/bin/python3 -m pip install -r /opt/requirements.txt + # workaround for https://github.com/yaml/pyyaml/issues/724 -RUN /usr/local/bin/python3 -m pip install 'wheel==0.40.0' RUN /usr/local/bin/python3 -m pip install 'Cython<3.0' 'PyYaml~=5.0' --no-build-isolation -RUN /usr/local/bin/python3 -m pip install -r /opt/requirements.txt - RUN mkdir -p /opt/collectd-python &&\ /usr/local/bin/python3 -u /opt/scripts/get-collectd-plugins.py /opt/collectd-python @@ -317,15 +316,15 @@ RUN /usr/local/bin/python3 -m pip list # Remove pip to avoid usage in python monitor and in exec'd container RUN /usr/local/bin/python3 -m pip uninstall pip -y # Delete all bundled wheels -RUN find /usr/local/lib/python3.11 -name "*.whl" -delete +RUN find /usr/local/lib/python3.12 -name "*.whl" -delete # Delete all compiled python to save space -RUN find /usr/local/lib/python3.11 -name "*.pyc" -o -name "*.pyo" | xargs rm +RUN find /usr/local/lib/python3.12 -name "*.pyc" -o -name "*.pyo" | xargs rm # We don't support compiling extension modules so don't need this directory -RUN rm -rf /usr/local/lib/python3.11/config-*-linux-gnu +RUN rm -rf /usr/local/lib/python3.12/config-*-linux-gnu -RUN find /usr/local/lib/python3.11 -type d -name __pycache__ | xargs rm -rf {} \; -RUN find /usr/local/lib/python3.11 -wholename "*test*.key" -delete -or -wholename "*test*.pem" -delete +RUN find /usr/local/lib/python3.12 -type d -name __pycache__ | xargs rm -rf {} \; +RUN find /usr/local/lib/python3.12 -wholename "*test*.key" -delete -or -wholename "*test*.pem" -delete ######## Extra packages that don't make sense to pull down in any other stage ######## @@ -378,9 +377,9 @@ RUN mkdir -p /opt/root/bin &&\ COPY --from=collectd /usr/local/bin/patchelf /usr/bin/ # Gather Python dependencies -COPY --from=python-plugins /usr/local/lib/python3.11 /opt/root/lib/python3.11 -COPY --from=python-plugins /usr/local/lib/libpython3.11.so.1.0 /opt/root/lib -COPY --from=python-plugins /usr/local/bin/python3.11 /opt/root/bin/python +COPY --from=python-plugins /usr/local/lib/python3.12 /opt/root/lib/python3.12 +COPY --from=python-plugins /usr/local/lib/libpython3.12.so.1.0 /opt/root/lib +COPY --from=python-plugins /usr/local/bin/python3.12 /opt/root/bin/python # Gather compiled collectd plugin libraries COPY --from=collectd /usr/sbin/collectd /opt/root/bin/collectd diff --git a/internal/signalfx-agent/bundle/scripts/requirements.txt b/internal/signalfx-agent/bundle/scripts/requirements.txt index 0d0db9fcb9..a504017e83 100644 --- a/internal/signalfx-agent/bundle/scripts/requirements.txt +++ b/internal/signalfx-agent/bundle/scripts/requirements.txt @@ -1,4 +1,4 @@ -PyYAML~=5.0 WMI==1.5.1; sys_platform == "win32" dbus-python==1.3.2; sys_platform == "linux" -setuptools==69.2.0 +setuptools==69.0.3 +wheel==0.41.2 diff --git a/internal/signalfx-agent/bundle/scripts/windows/bundle.ps1 b/internal/signalfx-agent/bundle/scripts/windows/bundle.ps1 index 521c8daaaf..2f0a88df22 100644 --- a/internal/signalfx-agent/bundle/scripts/windows/bundle.ps1 +++ b/internal/signalfx-agent/bundle/scripts/windows/bundle.ps1 @@ -18,8 +18,8 @@ $repoDir = "$scriptDir\..\..\..\..\.." . $scriptDir\common.ps1 $BUILD_DIR="$repoDir\build" -$PYTHON_VERSION="3.11.8" -$PIP_VERSION="21.0.1" +$PYTHON_VERSION="3.12.2" +$PIP_VERSION="24.0.0" $NUGET_URL="https://aka.ms/nugetclidl" $NUGET_EXE="nuget.exe"