From 37672fd3b6e5f373216269f3293e423496417164 Mon Sep 17 00:00:00 2001 From: Andrew Lock Date: Wed, 1 Nov 2023 10:04:07 +0000 Subject: [PATCH] Update python packages and use the new image in gitlab --- .gitlab-ci.yml | 2 +- .../_build/docker/gitlab/constraints.txt | 32 +++++++++++++++++ .../docker/gitlab/gitlab.windows.dockerfile | 6 ++-- .../_build/docker/gitlab/requirements.txt | 35 +++++++++---------- 4 files changed, 51 insertions(+), 24 deletions(-) create mode 100644 tracer/build/_build/docker/gitlab/constraints.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24ccc6425594..3edbb67d0a35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ build: script: - if (Test-Path build-out) { remove-item -recurse -force build-out } - if (Test-Path artifacts) { remove-item -recurse -force artifacts } - - docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID} -e ENABLE_MULTIPROCESSOR_COMPILATION=false -e WINDOWS_BUILDER=true -e AWS_NETWORKING=true -e SIGN_WINDOWS=true -e NUGET_CERT_REVOCATION_MODE=offline datadog/dd-trace-dotnet-docker-build:net8 + - docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID} -e ENABLE_MULTIPROCESSOR_COMPILATION=false -e WINDOWS_BUILDER=true -e AWS_NETWORKING=true -e SIGN_WINDOWS=true -e NUGET_CERT_REVOCATION_MODE=offline datadog/dd-trace-dotnet-docker-build:pythonfix - mkdir artifacts - xcopy /e/s build-out\${CI_JOB_ID}\*.* artifacts - remove-item -recurse -force build-out\${CI_JOB_ID} diff --git a/tracer/build/_build/docker/gitlab/constraints.txt b/tracer/build/_build/docker/gitlab/constraints.txt new file mode 100644 index 000000000000..afe4cb5ff44a --- /dev/null +++ b/tracer/build/_build/docker/gitlab/constraints.txt @@ -0,0 +1,32 @@ +# Taken from on https://github.com/DataDog/datadog-agent-buildimages/blob/a916f5e0836ec4a24f6b65b7c449e5126d26b913/requirements/constraints.txt + +awscli==1.29.45 +black==22.10.0 +boto3==1.28.45 +codeowners==0.6.0 +datadog-api-client==2.16.0 +docker-squash==1.1.0 +docker==5.0.3; python_version < '3.7' +docker==6.1.3; python_version >= '3.7' +dulwich==0.21.6 +flake8-bugbear==22.10.27 +flake8-comprehensions==3.10.1 +flake8-unused-arguments==0.0.12 +flake8-use-fstring==1.4 +flake8==5.0.4 +invoke==2.2.0 +isort==5.10.1 +jira==3.5.2 +packaging==21.3 +reno==3.5.0 +requests==2.31.0 +toml==0.10.2 +# urllib3 major version 2, released on May 4th 2023, breaks botocore used +# by awscli (removed DEFAULT_CIPHERS list from urllib3.util.ssl_) +############################################################# +# NOTE +# The version of urllib3 has been bumped compared to the datadog-agent-buildimage +############################################################# +urllib3==1.26.18 +vulture==2.6 +wheel==0.40.0 \ No newline at end of file diff --git a/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile b/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile index 1fd7951ba73b..ffa82d55a909 100644 --- a/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile +++ b/tracer/build/_build/docker/gitlab/gitlab.windows.dockerfile @@ -48,13 +48,11 @@ ENV PYTHON_VERSION "3.8.2" COPY install_python3.ps1 . RUN powershell -Command .\install_python3.ps1 -Version $ENV:PYTHON_VERSION -COPY requirements.txt . -COPY install_python_packages.ps1 . +COPY requirements.txt constraints.txt install_python_packages.ps1 ./ RUN powershell -Command .\install_python_packages.ps1 # Install JAVA -COPY helpers.ps1 . -COPY install_java.ps1 . +COPY helpers.ps1 install_java.ps1 ./ RUN powershell -Command .\install_java.ps1 # Install diff --git a/tracer/build/_build/docker/gitlab/requirements.txt b/tracer/build/_build/docker/gitlab/requirements.txt index 55f053612ced..4468b2ec8619 100644 --- a/tracer/build/_build/docker/gitlab/requirements.txt +++ b/tracer/build/_build/docker/gitlab/requirements.txt @@ -1,19 +1,16 @@ -# python development requirements for the Datadog Agent -invoke==1.7.3 -reno==3.5.0 -docker==6.0.1; python_version >= '3.7' -docker==5.0.3; python_version < '3.7' -docker-squash==1.0.9 -dulwich==0.20.45 -requests==2.27.1 -PyYAML==5.4.1 -toml==0.10.2 -packaging==21.3 -# more recent boto3 has a bug which generates an import exception. -# pin until this can be resolved. -boto3==1.22.4 -botocore==1.25.4 ## for awscli -awscli==1.23.4 -# urllib3 major version 2, released on May 4th 2023, breaks botocore used -# by awscli (removed DEFAULT_CIPHERS list from urllib3.util.ssl_) -urllib3==1.26.15 \ No newline at end of file +# Based on from https://github.com/DataDog/datadog-agent-buildimages/blob/a916f5e0836ec4a24f6b65b7c449e5126d26b913/requirements.txt + +-c constraints.txt + +awscli +boto3 +codeowners +docker +docker-squash +dulwich +invoke +packaging +reno +requests +toml +urllib3 \ No newline at end of file