Skip to content

Conversation

@Ishirui
Copy link
Contributor

@Ishirui Ishirui commented Dec 29, 2025

What does this PR do?

Motivation

The invoke unit tests in datadog-agent actually rely on this variable being there:

  1. When DDA_NO_DYNAMIC_DEPS=1, dda will use whatever Python env it exists in to run commands instead of managing its own.
  2. Some of our invoke unit tests rely on httpx and binary, which are not included in the normal legacy-tasks dependency group, but are dependencies of dda itself.
  3. Since dda is installed in the "root" virtualenv in the buildimage, these two modules are de facto also available - this explains why the invoke task unit tests don't fail. Using a virtualenv with only legacy-tasks would not be sufficient as it does not contain httpx and binary even though the tests rely on it.

Possible Drawbacks / Trade-offs

Further masking of what we actually depend on in this monolith that is datadog-agent CI...

Additional Notes

Also see DataDog/datadog-agent-dev#234, including those deps so that they would be installed even without this DDA_NO_DYNAMIC_DEPS=1

Copilot AI review requested due to automatic review settings December 29, 2025 16:31
@Ishirui Ishirui requested review from a team as code owners December 29, 2025 16:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes invoke unit tests in the datadog-agent repository by addressing dependency availability issues that arose after the multistage Dockerfile refactor in #1038.

  • Bumps the dda (datadog-agent-dev) version from v0.29.0 to v0.31.0
  • Re-introduces the DDA_NO_DYNAMIC_DEPS=1 environment variable that was lost in the multistage refactor

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
linux/Dockerfile Adds the DDA_NO_DYNAMIC_DEPS=1 environment variable to the final stage, restoring functionality needed for invoke unit tests
docker-bake.hcl Updates the DDA_VERSION from v0.29.0 to v0.31.0

The changes are minimal and well-targeted. The PR correctly addresses the issue where invoke unit tests depend on httpx and binary packages that are only available because dda is installed in the root virtualenv. By setting DDA_NO_DYNAMIC_DEPS=1, dda will use the existing Python environment instead of managing its own, making these dependencies accessible to the tests.

The placement of the environment variable (line 380) is appropriate - it's grouped with other environment variables in the final stage after the Python environment has been copied from the python_builder stage (line 373).


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ishirui Ishirui force-pushed the pierrelouis.veyrenc/fix-invoke-unit-tests branch from 81fa219 to 617cd06 Compare January 2, 2026 12:15
This is how it was before the refactor in #1038, and the invoke unit tests in `datadog-agent` rely on this behavior
@Ishirui Ishirui force-pushed the pierrelouis.veyrenc/fix-invoke-unit-tests branch from 617cd06 to 6e5d6ad Compare January 5, 2026 14:10
@Ishirui Ishirui merged commit ef91d52 into main Jan 5, 2026
24 checks passed
@Ishirui Ishirui deleted the pierrelouis.veyrenc/fix-invoke-unit-tests branch January 5, 2026 14:47
KevinFairise2 pushed a commit that referenced this pull request Jan 23, 2026
* feat(linux): Bump `dda` to `0.31.0`

* fix(linux): Disable `dda` dynamic dependency management

This is how it was before the refactor in #1038, and the invoke unit tests in `datadog-agent` rely on this behavior
FlorentClarret pushed a commit that referenced this pull request Jan 23, 2026
* feat(linux): Bump `dda` to `0.31.0`

* fix(linux): Disable `dda` dynamic dependency management

This is how it was before the refactor in #1038, and the invoke unit tests in `datadog-agent` rely on this behavior

Co-authored-by: Pierre-Louis Veyrenc <pierrelouis.veyrenc@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants