Skip to content
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

Start dropping python2 support #30035

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- run:
name: run unit tests
no_output_timeout: 20m
command: inv -e test --rerun-fails=2 --python-runtimes 3 --coverage --race --profile --cpus 8 --build-stdlib --test-washer
command: inv -e test --rerun-fails=2 --coverage --race --profile --cpus 8 --build-stdlib --test-washer
environment:
GO_TEST_SKIP_FLAKE: "true"

Expand Down
4 changes: 1 addition & 3 deletions .gitlab/common/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# This is the scripts to be executed on the Gitlab macOS runners before every job.
# We don't have virtualization now so we need to clean the environment and install the proper dependencies before every job.
.macos_gitlab:
variables:
PYTHON_RUNTIMES: "3"
before_script:
# Selecting the current Go version
- |
Expand All @@ -27,6 +25,6 @@
# Installing the job dependencies
- python3 -m pip install -r requirements.txt -r tasks/libs/requirements-github.txt
- pyenv rehash
- inv -e rtloader.make --python-runtimes $PYTHON_RUNTIMES
- inv -e rtloader.make
- inv -e rtloader.install
- inv -e install-tools
2 changes: 0 additions & 2 deletions .gitlab/integration_test/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
-e CI_PIPELINE_ID="${CI_PIPELINE_ID}"
-e CI_PROJECT_NAME="${CI_PROJECT_NAME}"
-e AWS_NETWORKING=true
-e PY_RUNTIMES="$PYTHON_RUNTIMES"
-e GOMODCACHE="c:\modcache"
-e VCPKG_BINARY_SOURCES="clear;x-azblob,${vcpkgBlobSaSUrl}"
-e PIP_INDEX_URL=${PIP_INDEX_URL}
Expand All @@ -37,5 +36,4 @@
integration_tests_windows-x64:
extends: .integration_tests_windows_base
variables:
PYTHON_RUNTIMES: 3
ARCH: "x64"
2 changes: 1 addition & 1 deletion .gitlab/lint/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
script:
- !reference [.retrieve_linux_go_deps]
- !reference [.retrieve_linux_go_tools_deps]
- inv -e rtloader.make --install-prefix=$CI_PROJECT_DIR/dev --python-runtimes "3"
- inv -e rtloader.make --install-prefix=$CI_PROJECT_DIR/dev
- inv -e rtloader.install
- inv -e install-tools
- inv -e linter.go --cpus $KUBERNETES_CPU_REQUEST $FLAVORS $EXTRA_OPTS
Expand Down
2 changes: 0 additions & 2 deletions .gitlab/lint/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
-e AWS_NETWORKING=true
-e CI_PIPELINE_ID=${CI_PIPELINE_ID}
-e CI_PROJECT_NAME=${CI_PROJECT_NAME}
-e PY_RUNTIMES="$PYTHON_RUNTIMES"
-e GOMODCACHE="c:\modcache"
486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:$Env:DATADOG_AGENT_WINBUILDIMAGES c:\mnt\tasks\winbuildscripts\lint.bat
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
Expand All @@ -30,6 +29,5 @@ lint_windows-x64:
- !reference [.except_mergequeue]
- when: on_success
variables:
PYTHON_RUNTIMES: 3
ARCH: "x64"
timeout: 1h30m
3 changes: 1 addition & 2 deletions .gitlab/package_build/dmg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- $S3_CP_CMD $S3_ARTIFACTS_URI/agent-version.cache .
- export VERSION_CACHE_CONTENT=$(cat agent-version.cache | base64 -)
- python3 -m pip install -r tasks/libs/requirements-github.txt
- inv -e github.trigger-macos --workflow-type "build" --datadog-agent-ref "$CI_COMMIT_SHA" --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --python-runtimes "$PYTHON_RUNTIMES" --destination "$OMNIBUS_PACKAGE_DIR" --version-cache "$VERSION_CACHE_CONTENT" --integrations-core-ref "$INTEGRATIONS_CORE_VERSION"
- inv -e github.trigger-macos --workflow-type "build" --datadog-agent-ref "$CI_COMMIT_SHA" --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --destination "$OMNIBUS_PACKAGE_DIR" --version-cache "$VERSION_CACHE_CONTENT" --integrations-core-ref "$INTEGRATIONS_CORE_VERSION"
- !reference [.upload_sbom_artifacts]
timeout: 3h # MacOS builds can take 1h~2h, increase the timeout to avoid timeout flakes
artifacts:
Expand All @@ -31,7 +31,6 @@ agent_dmg-x64-a7:
needs: ["go_mod_tidy_check"]
variables:
AGENT_MAJOR_VERSION: 7
PYTHON_RUNTIMES: "3"
timeout: 6h
before_script:
- export RELEASE_VERSION=$RELEASE_VERSION_7
3 changes: 1 addition & 2 deletions .gitlab/package_build/heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- $S3_CP_CMD $S3_PERMANENT_ARTIFACTS_URI/llc-$CLANG_LLVM_VER.${PACKAGE_ARCH} /tmp/system-probe/llc-bpf
- cp $CI_PROJECT_DIR/minimized-btfs.tar.xz /tmp/system-probe/minimized-btfs.tar.xz
- chmod 0744 /tmp/system-probe/clang-bpf /tmp/system-probe/llc-bpf
- inv -e omnibus.build --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --python-runtimes "$PYTHON_RUNTIMES" --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --system-probe-bin=/tmp/system-probe --flavor heroku
- inv -e omnibus.build --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --system-probe-bin=/tmp/system-probe --flavor heroku
- ls -la $OMNIBUS_PACKAGE_DIR
- !reference [.lint_linux_packages]
- $S3_CP_CMD $OMNIBUS_PACKAGE_DIR/datadog-heroku-agent_*_${PACKAGE_ARCH}.deb $S3_ARTIFACTS_URI/$DESTINATION_DEB
Expand Down Expand Up @@ -57,4 +57,3 @@ agent_heroku_deb-x64-a7:
DESTINATION_DBG_DEB: "datadog-heroku-agent-dbg_7_amd64.deb"
RELEASE_VERSION: $RELEASE_VERSION_7
AGENT_MAJOR_VERSION: 7
PYTHON_RUNTIMES: "3"
4 changes: 1 addition & 3 deletions .gitlab/package_build/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- chmod 0744 /tmp/system-probe/clang-bpf /tmp/system-probe/llc-bpf
# NOTE: for now, we consider "ociru" to be a "redhat_target" in omnibus/lib/ostools.rb
# if we ever start building on a different platform, that might need to change
- inv -e omnibus.build --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --python-runtimes "$PYTHON_RUNTIMES" --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --system-probe-bin=/tmp/system-probe --host-distribution=ociru --install-directory="$INSTALL_DIR"
- inv -e omnibus.build --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --system-probe-bin=/tmp/system-probe --host-distribution=ociru --install-directory="$INSTALL_DIR"
- ls -la $OMNIBUS_PACKAGE_DIR
- !reference [.upload_sbom_artifacts]
variables:
Expand Down Expand Up @@ -52,7 +52,6 @@ datadog-agent-oci-x64-a7:
]
variables:
AGENT_MAJOR_VERSION: 7
PYTHON_RUNTIMES: "3"
PACKAGE_ARCH: amd64
DESTINATION_OCI: "datadog-agent-7-remote-updater-amd64.tar.xz"
DD_CC: 'x86_64-unknown-linux-gnu-gcc'
Expand All @@ -78,7 +77,6 @@ datadog-agent-oci-arm64-a7:
]
variables:
AGENT_MAJOR_VERSION: 7
PYTHON_RUNTIMES: "3"
PACKAGE_ARCH: arm64
DESTINATION_OCI: "datadog-agent-7-remote-updater-arm64.tar.xz"
DD_CC: 'aarch64-unknown-linux-gnu-gcc'
Expand Down
6 changes: 2 additions & 4 deletions .gitlab/package_build/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- $S3_CP_CMD $S3_PERMANENT_ARTIFACTS_URI/llc-$CLANG_LLVM_VER.${PACKAGE_ARCH} /tmp/system-probe/llc-bpf
- cp $CI_PROJECT_DIR/minimized-btfs.tar.xz /tmp/system-probe/minimized-btfs.tar.xz
- chmod 0744 /tmp/system-probe/clang-bpf /tmp/system-probe/llc-bpf
- inv -e omnibus.build --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --python-runtimes "$PYTHON_RUNTIMES" --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --system-probe-bin=/tmp/system-probe --flavor "$FLAVOR" --config-directory "$CONFIG_DIR" --install-directory "$INSTALL_DIR"
- inv -e omnibus.build --release-version "$RELEASE_VERSION" --major-version "$AGENT_MAJOR_VERSION" --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --system-probe-bin=/tmp/system-probe --flavor "$FLAVOR" --config-directory "$CONFIG_DIR" --install-directory "$INSTALL_DIR"
- ls -la $OMNIBUS_PACKAGE_DIR
- !reference [.upload_sbom_artifacts]

Expand Down Expand Up @@ -69,15 +69,13 @@
.agent_7_build:
variables:
AGENT_MAJOR_VERSION: 7
PYTHON_RUNTIMES: "3"
FLAVOR: base
before_script:
- export RELEASE_VERSION=$RELEASE_VERSION_7

.ot_agent_7_build:
variables:
AGENT_MAJOR_VERSION: 7
PYTHON_RUNTIMES: "3"
FLAVOR: ot
before_script:
- export RELEASE_VERSION=$RELEASE_VERSION_7
Expand Down Expand Up @@ -181,7 +179,7 @@ iot-agent-armhf:
- !reference [.cache_omnibus_ruby_deps, setup]
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
- inv -e omnibus.build --release-version $RELEASE_VERSION_7 --major-version 7 --python-runtimes 3 --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --target-project dogstatsd
- inv -e omnibus.build --release-version $RELEASE_VERSION_7 --major-version 7 --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --target-project dogstatsd
- ls -la $OMNIBUS_PACKAGE_DIR
- !reference [.upload_sbom_artifacts]
variables:
Expand Down
3 changes: 0 additions & 3 deletions .gitlab/package_build/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
-e WINDOWS_BUILDER=true
-e RELEASE_VERSION="$RELEASE_VERSION"
-e MAJOR_VERSION="$AGENT_MAJOR_VERSION"
-e PY_RUNTIMES="$PYTHON_RUNTIMES"
-e INTEGRATIONS_CORE_VERSION="$INTEGRATIONS_CORE_VERSION"
-e GOMODCACHE="c:\modcache"
-e AWS_NETWORKING=true
Expand Down Expand Up @@ -62,7 +61,6 @@ windows_msi_and_bosh_zip_x64-a7:
variables:
ARCH: "x64"
AGENT_MAJOR_VERSION: 7
PYTHON_RUNTIMES: "3"
before_script:
- set RELEASE_VERSION $RELEASE_VERSION_7
timeout: 2h
Expand Down Expand Up @@ -100,7 +98,6 @@ windows_zip_agent_binaries_x64-a7:
-e RELEASE_VERSION="$RELEASE_VERSION"
-e MAJOR_VERSION="$AGENT_MAJOR_VERSION"
-e INTEGRATIONS_CORE_VERSION="$INTEGRATIONS_CORE_VERSION"
-e PY_RUNTIMES="$PYTHON_RUNTIMES"
-e GOMODCACHE="c:\modcache"
-e AWS_NETWORKING=true
-e SIGN_WINDOWS_DD_WCS=true
Expand Down
11 changes: 2 additions & 9 deletions .gitlab/source_test/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
before_script:
- source /root/.bashrc && conda activate $CONDA_ENV
- !reference [.retrieve_linux_go_deps]
- inv -e rtloader.make --install-prefix=$CI_PROJECT_DIR/dev --python-runtimes "$PYTHON_RUNTIMES"
- inv -e rtloader.make --install-prefix=$CI_PROJECT_DIR/dev
- inv -e rtloader.install
- inv -e rtloader.format --raise-if-changed
- inv -e rtloader.test
Expand Down Expand Up @@ -33,7 +33,7 @@
- if [[ "$FAST_TESTS" == "true" ]]; then FAST_TESTS_FLAG="--only-impacted-packages"; fi
- inv -e sds.build-library
- inv -e agent.build
- inv -e test $FLAVORS --include-sds --race --profile --rerun-fails=2 --python-runtimes "$PYTHON_RUNTIMES" --coverage --cpus $KUBERNETES_CPU_REQUEST $EXTRA_OPTS --save-result-json $TEST_OUTPUT_FILE --junit-tar "junit-${CI_JOB_NAME}.tgz" --build-stdlib $FAST_TESTS_FLAG --test-washer
- inv -e test $FLAVORS --include-sds --race --profile --rerun-fails=2 --coverage --cpus $KUBERNETES_CPU_REQUEST $EXTRA_OPTS --save-result-json $TEST_OUTPUT_FILE --junit-tar "junit-${CI_JOB_NAME}.tgz" --build-stdlib $FAST_TESTS_FLAG --test-washer
artifacts:
expire_in: 2 weeks
when: always
Expand Down Expand Up @@ -66,7 +66,6 @@ tests_deb-x64-py3:
- !reference [.upload_junit_source]
- !reference [.upload_coverage]
variables:
PYTHON_RUNTIMES: '3'
CONDA_ENV: ddpy3

tests_flavor_iot_deb-x64:
Expand All @@ -77,7 +76,6 @@ tests_flavor_iot_deb-x64:
after_script:
- !reference [.upload_junit_source]
variables:
PYTHON_RUNTIMES: '3'
CONDA_ENV: ddpy3
FLAVORS: '--flavor iot'

Expand All @@ -89,7 +87,6 @@ tests_flavor_dogstatsd_deb-x64:
after_script:
- !reference [.upload_junit_source]
variables:
PYTHON_RUNTIMES: '3'
CONDA_ENV: ddpy3
FLAVORS: '--flavor dogstatsd'

Expand All @@ -101,7 +98,6 @@ tests_flavor_heroku_deb-x64:
after_script:
- !reference [.upload_junit_source]
variables:
PYTHON_RUNTIMES: '3'
CONDA_ENV: ddpy3
FLAVORS: '--flavor heroku'

Expand All @@ -115,7 +111,6 @@ tests_rpm-x64-py3:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
variables:
PYTHON_RUNTIMES: '3'
CONDA_ENV: ddpy3
EXTRA_OPTS: '--build-exclude=systemd'

Expand All @@ -128,7 +123,6 @@ tests_deb-arm64-py3:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:arm64"]
variables:
PYTHON_RUNTIMES: '3'
CONDA_ENV: ddpy3

tests_rpm-arm64-py3:
Expand All @@ -140,7 +134,6 @@ tests_rpm-arm64-py3:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/rpm_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:arm64"]
variables:
PYTHON_RUNTIMES: '3'
CONDA_ENV: ddpy3

# Check consistency of go.mod file with project imports
Expand Down
6 changes: 2 additions & 4 deletions .gitlab/source_test/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ tests_macos:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
tags: ["arch:amd64"]
needs: ["setup_agent_version"]
variables:
PYTHON_RUNTIMES: "3"
script:
- !reference [.setup_macos_github_app]
- $S3_CP_CMD $S3_ARTIFACTS_URI/agent-version.cache .
- export VERSION_CACHE_CONTENT=$(cat agent-version.cache | base64 -)
- python3 -m pip install -r tasks/libs/requirements-github.txt
- FAST_TESTS_FLAG=""
- if [[ "$FAST_TESTS" = "true" ]]; then FAST_TESTS_FLAG="--fast-tests true"; fi
- inv -e github.trigger-macos --workflow-type "test" --datadog-agent-ref "$CI_COMMIT_SHA" --python-runtimes "$PYTHON_RUNTIMES" --version-cache "$VERSION_CACHE_CONTENT" $FAST_TESTS_FLAG --test-washer $COVERAGE_CACHE_FLAG
- inv -e github.trigger-macos --workflow-type "test" --datadog-agent-ref "$CI_COMMIT_SHA" --version-cache "$VERSION_CACHE_CONTENT" $FAST_TESTS_FLAG --test-washer $COVERAGE_CACHE_FLAG
timeout: 6h
after_script:
- $CI_PROJECT_DIR/tools/ci/junit_upload.sh "junit-*-repacked.tgz"
Expand Down Expand Up @@ -50,7 +48,7 @@ tests_macos:
- inv -e gitlab.generate-ci-visibility-links --output=$EXTERNAL_LINKS_PATH
- FAST_TESTS_FLAG=""
- if [[ "$FAST_TESTS" == "true" ]]; then FAST_TESTS_FLAG="--only-impacted-packages"; fi
- inv -e test --rerun-fails=2 --python-runtimes $PYTHON_RUNTIMES --race --profile --cpus 12 --save-result-json $TEST_OUTPUT_FILE --junit-tar "junit-${CI_JOB_NAME}.tgz" $FAST_TESTS_FLAG --test-washer
- inv -e test --rerun-fails=2 --race --profile --cpus 12 --save-result-json $TEST_OUTPUT_FILE --junit-tar "junit-${CI_JOB_NAME}.tgz" $FAST_TESTS_FLAG --test-washer
- inv -e invoke-unit-tests
artifacts:
expire_in: 2 weeks
Expand Down
6 changes: 0 additions & 6 deletions .gitlab/source_test/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
-e CI_COMMIT_REF_NAME="${CI_COMMIT_REF_NAME}"
-e AWS_NETWORKING=true
-e SIGN_WINDOWS_DD_WCS=true
-e PY_RUNTIMES="${PYTHON_RUNTIMES}"
-e GOMODCACHE="c:\modcache"
-e JUNIT_TAR="c:\mnt\junit-${CI_JOB_NAME}.tgz"
-e PIP_INDEX_URL="${PIP_INDEX_URL}"
Expand Down Expand Up @@ -61,7 +60,6 @@
tests_windows-x64:
extends: .tests_windows_base
variables:
PYTHON_RUNTIMES: 3
ARCH: "x64"

.tests_windows_sysprobe:
Expand All @@ -79,7 +77,6 @@ tests_windows-x64:
-e CI_PIPELINE_ID=${CI_PIPELINE_ID}
-e CI_PROJECT_NAME=${CI_PROJECT_NAME}
-e SIGN_WINDOWS_DD_WCS=true
-e PY_RUNTIMES="$PYTHON_RUNTIMES"
-e GOMODCACHE="c:\modcache"
-e PIP_INDEX_URL=${PIP_INDEX_URL}
486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
Expand All @@ -105,7 +102,6 @@ tests_windows-x64:
-e CI_PIPELINE_ID=${CI_PIPELINE_ID}
-e CI_PROJECT_NAME=${CI_PROJECT_NAME}
-e SIGN_WINDOWS_DD_WCS=true
-e PY_RUNTIMES="$PYTHON_RUNTIMES"
-e GOMODCACHE="c:\modcache"
-e PIP_INDEX_URL=${PIP_INDEX_URL}
486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
Expand All @@ -119,11 +115,9 @@ tests_windows-x64:
tests_windows_sysprobe_x64:
extends: .tests_windows_sysprobe
variables:
PYTHON_RUNTIMES: 3
ARCH: "x64"

tests_windows_secagent_x64:
extends: .tests_windows_secagent
variables:
PYTHON_RUNTIMES: 3
ARCH: "x64"
4 changes: 0 additions & 4 deletions Dockerfiles/agent/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ From the root of the repository, run the following command:
docker run --rm -it -v "${pwd}:c:\mnt" -e OMNIBUS_TARGET=main -e MAJOR_VERSION=7 -e RELEASE_VERSION=nightly -e PY_RUNTIMES=3 datadog/agent-buildimages-windows_x64:1809 c:\mnt\tasks\winbuildscripts\buildwin.bat
```

The above will build the Agent 7 nightly. To build the Agent 6, use the following variables:
- MAJOR_VERSION=6
- PY_RUNTIMES=2,3

The build artifacts will be in `omnibus\pkg`.

2. Build the entrypoint
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,10 @@ To start working on the Agent, you can build the `main` branch:
4. Create a development `datadog.yaml` configuration file in `dev/dist/datadog.yaml`, containing a valid API key: `api_key: <API_KEY>`. You can either start with an empty one or use the full one generated by the Agent build from Step 5 (located in `cmd/agent/dist/datadog.yaml` after the build finishes).
5. Build the agent with `invoke agent.build --build-exclude=systemd`.

By default, the Agent will be built to use Python 3 but you can select which Python version you want to use:

- `invoke agent.build --python-runtimes 2` for Python2 only
- `invoke agent.build --python-runtimes 3` for Python3 only
- `invoke agent.build --python-runtimes 2,3` for both Python2 and Python3

You can specify a custom Python location for the agent (useful when using
virtualenvs):

invoke agent.build \
--python-runtimes 2,3 \
--python-home-2=$GOPATH/src/github.com/DataDog/datadog-agent/venv2 \
--python-home-3=$GOPATH/src/github.com/DataDog/datadog-agent/venv3

Expand Down
9 changes: 2 additions & 7 deletions docs/dev/agent_omnibus.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Start a Powershell prompt and navigate to your local clone of the `datadog-agent
Run the following command:

```powershell
docker run -v "$(Get-Location):c:\mnt" -e OMNIBUS_TARGET=main -e RELEASE_VERSION=nightly -e MAJOR_VERSION=7 -e PY_RUNTIMES=3 -e TARGET_ARCH=x64 datadog/agent-buildimages-windows_x64:1809 c:\mnt\tasks\winbuildscripts\buildwin.bat
docker run -v "$(Get-Location):c:\mnt" -e OMNIBUS_TARGET=main -e RELEASE_VERSION=nightly -e MAJOR_VERSION=7 -e TARGET_ARCH=x64 datadog/agent-buildimages-windows_x64:1809 c:\mnt\tasks\winbuildscripts\buildwin.bat
```

Downloading the Docker image may take some time in the first run.
Expand All @@ -105,16 +105,11 @@ param (
[bool]$DEBUG=$false
)
if ($MAJOR_VERSION -eq 7) {
$PY_RUNTIMES="3"
} else {
$PY_RUNTIMES="2,3"
}
$cmd = "docker run"
if ($RM_CONTAINER) {
$cmd += " --rm "
}
$opts = "-e OMNIBUS_TARGET=main -e RELEASE_VERSION=$RELEASE_VERSION -e MAJOR_VERSION=$MAJOR_VERSION -e PY_RUNTIMES=$PY_RUNTIMES -e TARGET_ARCH=$TARGET_ARCH"
$opts = "-e OMNIBUS_TARGET=main -e RELEASE_VERSION=$RELEASE_VERSION -e MAJOR_VERSION=$MAJOR_VERSION -e TARGET_ARCH=$TARGET_ARCH"
if ($DEBUG) {
$opts += " -e DEBUG_CUSTOMACTION=yes "
}
Expand Down
Loading
Loading