Skip to content
Open
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
61 changes: 61 additions & 0 deletions docs/how-to/extend/dependency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# How to add or bump a dependency?

-----

The various dependencies used by `dda` are defined in the `pyproject.toml` file at the root of the repository.

## Identify your dependency

### Local command

Any new dependency for a native local command can be added in the main `dependency` group `pyproject.toml` file:
/// tab | :octicons-file-code-16: .pyproject.toml
```toml
dependencies = [
"ada-url~=1.15.3",
"click~=8.1",
"datadog-api-client~=2.34",
"dep-sync~=0.1",
...
]
```
///

### Legacy invoke command

For migration reasons, we have several dependency groups corresponding to different build images (`legacy-btf-gen` or `legacy-e2e`) or group of invoke tasks (`legacy-tasks` or `legacy-release`).

/// tab | :octicons-file-code-16: .pyproject.toml
```toml
[dependency-groups]
legacy-constraints = [
"azure-identity==1.14.1",
"wheel==0.40.0",
]
legacy-build = [
"boto3==1.38.8",
...
]
```
///

So you need to identify on which group you want to put or bump your dependency first.

## Update the dependency

Now you can update the `pyproject.toml` file with your dependency and its version.

Don't forget to update the `uv.lock` file by running
```bash
uv lock
```
Create a PR and ask for a review.

## Create a new release

Create a PR bumping the version, like on this [example](https://github.com/DataDog/datadog-agent-dev/pull/110).
Do not forget to update the changelog regarding the changes included in this version.

## Update buildimages

Bump the new `dda` version in the `datadog-agent-buildimages` repository, see [example](https://github.com/DataDog/datadog-agent-buildimages/pull/856).
Loading