Skip to content

Commit

Permalink
datadog-agent: Remove use of unversioned python3 during build
Browse files Browse the repository at this point in the history
See: wolfi-dev#37197

Signed-off-by: dann frazier <[email protected]>
  • Loading branch information
dannf committed Jan 4, 2025
1 parent 3dc98f1 commit 97a24dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions buck2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pipeline:

- name: Configure and build
runs: |
exit 1
# This build requires a specific version of rust nightly.
# Be sure to check docs when bumping to more recent commits.
rustup install ${{vars.rust-version}}
Expand Down
13 changes: 6 additions & 7 deletions datadog-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ environment:
- ninja
- openssf-compiler-options
- procps-dev
- py${{vars.py-version}}-pip
- py${{vars.py-version}}-build-base-dev
- py${{vars.py-version}}-semver
- python-${{vars.py-version}}-dev
- systemd-dev
- util-linux-misc # unshare
- wget # Required for downloading clang-12 and kernel headers from debian
Expand Down Expand Up @@ -308,13 +307,13 @@ subpackages:
python${{vars.py-version}} -m venv .venv
# Install locked dependencies
.venv/bin/pip install --require-hashes --only-binary=:all: --no-deps -r .deps/resolved/linux-${{build.arch}}_${{vars.py-version}}.txt
.venv/bin/pip${{vars.py-version}} install --require-hashes --only-binary=:all: --no-deps -r .deps/resolved/linux-${{build.arch}}_${{vars.py-version}}.txt
excludes="datadog_checks_base datadog_checks_dev datadog_checks_tests_helper docker_daemon esxi teleport"
checks=$(invoke -r /home/build agent.collect-integrations /home/integrations/ 3 linux --excluded "$excludes")
# Install core, downloader, and dependencies
.venv/bin/pip install \
.venv/bin/pip${{vars.py-version}} install \
"./datadog_checks_base[deps, http]" \
"./datadog_checks_downloader" \
$(echo ${checks} | xargs -n1 echo | sed 's|^|./|')
Expand All @@ -323,7 +322,7 @@ subpackages:
find .venv -name "__pycache__" -exec rm -rf {} +
mkdir -p ${{targets.contextdir}}${{vars.destd}}
.venv/bin/pip freeze > ${{targets.contextdir}}${{vars.destd}}/final_constraints-py3.txt
.venv/bin/pip${{vars.py-version}} freeze > ${{targets.contextdir}}${{vars.destd}}/final_constraints-py3.txt
# Include the agent's requirements for the core integrations.
cp requirements-agent-release.txt ${{targets.contextdir}}${{vars.destd}}/
Expand Down Expand Up @@ -580,8 +579,8 @@ test:
runs: |
PATH=$mypath:$PATH
# this is left without path to be explicit which python is used.
${{vars.destd}}/embedded/bin/python3 -c "import datadog_checks.base"
${{vars.destd}}/embedded/bin/python3 -c "import datadog_checks.downloader"
${{vars.destd}}/embedded/bin/python${{vars.py-version}} -c "import datadog_checks.base"
${{vars.destd}}/embedded/bin/python${{vars.py-version}} -c "import datadog_checks.downloader"
- name: Execute bins
runs: |
PATH=$mypath:$PATH
Expand Down

0 comments on commit 97a24dd

Please sign in to comment.