Skip to content

[datadog] bump get-agent-version fallback for latest/7 to 7.78.3#2643

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
mainfrom
vitkyrka/disco-latest
May 12, 2026
Merged

[datadog] bump get-agent-version fallback for latest/7 to 7.78.3#2643
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits into
mainfrom
vitkyrka/disco-latest

Conversation

@vitkyrka

@vitkyrka vitkyrka commented May 11, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The get-agent-version helper substitutes a concrete version for the single-component tags latest and 7 so that the chart's version-gated logic has something to compare. The current substitute, 7.67.0, is now stale: the actual latest Datadog Agent image is well past that, and so is the default agent tag shipped by the chart itself (7.78.3). As a result, users who explicitly set agents.image.tag: latest (or "7") get worse behaviour out of the version-gated logic than users on the default tag, even though they are running the same or newer Agent in practice.

This PR bumps the fallback to 7.78.3 (matching the chart's current default tag, set in #2647) so latest/"7" are treated as a current Agent in every version-gated code path. Concretely this means:

  • Service discovery defaulting (enable discovery by default on supported agent versions #2598): discovery is now auto-enabled (with system-probe-lite) for tag: latest/"7", matching the default tag and other unparseable tags like master-py3 that already cross the >= 7.78.0 gate.
  • Agent Data Plane: the < 7.74.0 guard in should-enable-data-plane no longer fails for tag: latest/"7", so users on those tags can enable datadog.dataPlane.enabled without hitting the version check.
  • -fips-full image guard: the < 7.78.0 guard for agents.image.tagSuffix: -fips-full no longer fails for tag: latest/"7".
  • Standalone DDOT FIPS image guard: same < 7.78.0 guard on the standalone ddot-collector FIPS image no longer fails for tag: latest/"7".
  • DD_USE_DOGSTATSD toggle for ADP: the ^7.75.0-0 compatibility branch now matches for tag: latest/"7", so the env var is emitted consistently with newer Agents.

All of these match the behaviour users would get if they pinned to the chart's default tag (7.78.3) instead of using the floating tag.

Motivation

Keep the floating tags latest and 7 in sync with what those tags actually point to (and with the chart's own default), so version-gated features (discovery, ADP, FIPS image variants) work the same on the floating tags as on the default tag.

This is a behaviour change for users on tag: latest/"7":

  • Without datadog.discovery.enabled set, they will now get a system-probe container running system-probe-lite.
  • Previously-failing version checks for ADP, -fips-full, and standalone DDOT FIPS will now pass.

Hence the minor version bump.

Release Note

Bump the `get-agent-version` fallback for `agents.image.tag: latest` (and `"7"`) from `7.67.0` to `7.78.3` (matching the chart's current default tag). Floating tags now behave consistently with the default tag in every version-gated feature: service discovery defaulting auto-enables `system-probe-lite`, Agent Data Plane no longer fails its `< 7.74.0` guard, the `-fips-full` and standalone DDOT FIPS image guards no longer fail, and the `DD_USE_DOGSTATSD` toggle for ADP matches the `^7.75.0-0` branch.

The `get-agent-version` fallback substituted `7.67.0` for the
single-component tags `latest` and `7`, which is below the `>=7.78.0`
threshold that auto-enables service discovery (introduced in #2598). As
a result, users on these floating tags never got a system-probe
container or `system-probe-lite`, despite the actual `latest` image
supporting it.

Bump the fallback to `7.78.0` so the chart treats `latest`/`7` like the
current agent and auto-enables discovery with `system-probe-lite`.
@vitkyrka vitkyrka added the datadog/minor-version Minor version bump for datadog chart label May 11, 2026
@github-actions github-actions Bot added the chart/datadog This issue or pull request is related to the datadog chart label May 11, 2026
@vitkyrka vitkyrka changed the title [datadog] auto-enable discovery on latest and 7 tags [datadog] bump get-agent-version fallback for latest/7 to 7.78.0 May 11, 2026
vitkyrka added 2 commits May 11, 2026 14:54
The fallback bump affects several version-gated code paths besides
discovery (ADP, -fips-full, standalone DDOT FIPS, DD_USE_DOGSTATSD).
Reword the changelog so it matches the release note in the PR
description.
@vitkyrka
vitkyrka marked this pull request as ready for review May 11, 2026 15:57
@vitkyrka
vitkyrka requested review from a team as code owners May 11, 2026 15:57
@vitkyrka
vitkyrka requested review from gpalmz and removed request for a team May 11, 2026 15:57

@fanny-jiang fanny-jiang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's align the helper with the latest pinned image version, otherwise LGTM 👍🏼

Comment thread charts/datadog/templates/_helpers.tpl Outdated
{{- end -}}
{{- if and (eq $length 1) (or (eq $version "7") (eq $version "latest")) -}}
{{- $version = "7.67.0" -}}
{{- $version = "7.78.0" -}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{- $version = "7.78.0" -}}
{{- $version = "7.78.3" -}}

To align with the current latest patch version of the agent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in ce18c87 — bumped to 7.78.3 to match the current default agent tag.

# Conflicts:
#	charts/datadog/CHANGELOG.md
#	charts/datadog/Chart.yaml
#	charts/datadog/README.md
@vitkyrka vitkyrka changed the title [datadog] bump get-agent-version fallback for latest/7 to 7.78.0 [datadog] bump get-agent-version fallback for latest/7 to 7.78.3 May 12, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 8aba99f into main May 12, 2026
41 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the vitkyrka/disco-latest branch May 12, 2026 10:30
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/datadog-agent that referenced this pull request May 12, 2026
### What does this PR do?

Adds a Kubernetes E2E sanity test for the Datadog Agent's discovery feature, mirroring (in spirit) the existing Linux VM suite in `test/new-e2e/tests/discovery/linux_test.go`. The new suite at `test/new-e2e/tests/discovery/k8s_test.go`:

- Provisions a Kind-on-EC2 cluster (`provkindvm`) with the agent installed via Helm and an `nginx` workload.
- Runs `TestNginxDiscovered` in two sub-tests covering both discovery modes:
  - `system-probe-lite` — discovery enabled alone; the agent execs into `system-probe-lite` per `cmd/system-probe/subcommands/run/splite.go`.
  - `system-probe` — adds `datadog.systemProbe.enableOOMKill: true` so the agent's `shouldExecSPLite` keeps the full binary running.
- Asserts on the matched nginx process: TCP port 80 listener, `ServiceDiscovery.GeneratedServiceName == {nginx, SOURCE_COMMAND_LINE}`, `ApmInstrumentation == false`, `InjectionState == NOT_INJECTED`, non-empty `ContainerId`.
- Pins the Helm chart version to `3.213.0`; the framework default (`3.155.1`) predates both the discovery template (chart 3.205.0, DataDog/helm-charts#2598) and the `latest`/`7` → `7.78.x` fallback fix (chart 3.213.0, DataDog/helm-charts#2643).

### Motivation

https://datadoghq.atlassian.net/browse/DSCVR-385

There is no k8s e2e for discovery today. DataDog/helm-charts#2634 fixed a bug in discovery on k8s related to the seccomp profile; the change went undetected before merge because nothing exercises the discovery flow on a Helm-installed agent. This suite closes that gap with a smoke-level check that the discovery payload reaches fakeintake in both modes.

The k8s suite is narrower than `linux_test.go` (single workload, smoke-level assertions), at least for now. This is to avoid having to add new app definitions at this point for a basic test. The VM suite continues to be the exhaustive per-language source of truth.

### Describe how you validated your changes

Ran locally against AWS twice with `E2E_DEV_MODE=true dda inv -- -e new-e2e-tests.run --targets ./tests/discovery --run TestK8sTestSuite --stack-name-suffix v2`:

```
--- PASS: TestK8sTestSuite (364.64s)
    --- PASS: TestK8sTestSuite/TestNginxDiscovered (...)
        --- PASS: TestK8sTestSuite/TestNginxDiscovered/system-probe-lite
        --- PASS: TestK8sTestSuite/TestNginxDiscovered/system-probe
```

Lint: `golangci-lint run ./test/new-e2e/tests/discovery/...` clean (0 issues).

### Additional Notes

A few quirks worth flagging for reviewers:

- **Forced DaemonSet rollout via pod annotation.** Toggling `datadog.systemProbe.enableOOMKill` between sub-tests only mutates the chart-rendered configmap; the chart's `daemonset.yaml` has no `checksum/system-probe-yaml` annotation tying the pod template to that configmap, so the existing pod stays alive across the change. The suite writes a `agents.podAnnotations.discovery-e2e-mode: "spl"/"sp"` that intentionally differs per sub-test to bump the pod-template hash and force a rollout.
- **Tracer metadata / language detection out of scope.** Nginx is C/native so `language` and `serviceDiscovery.tracerMetadata` aren't populated. The two natural ways to extend this — switch to (or add) an OTel-instrumented Go server (`apps-calendar-go` — no `K8sAppDefinition` yet) or a `dd-trace-go`-instrumented app (`apps-tracegen` predates the memfd-tracer-metadata feature in `dd-trace-go.v1`) — both require cross-repo work in `test-infra-definitions`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: vincent.whitchurch <[email protected]>
chouetz pushed a commit to DataDog/datadog-agent that referenced this pull request May 13, 2026
### What does this PR do?

Adds a Kubernetes E2E sanity test for the Datadog Agent's discovery feature, mirroring (in spirit) the existing Linux VM suite in `test/new-e2e/tests/discovery/linux_test.go`. The new suite at `test/new-e2e/tests/discovery/k8s_test.go`:

- Provisions a Kind-on-EC2 cluster (`provkindvm`) with the agent installed via Helm and an `nginx` workload.
- Runs `TestNginxDiscovered` in two sub-tests covering both discovery modes:
  - `system-probe-lite` — discovery enabled alone; the agent execs into `system-probe-lite` per `cmd/system-probe/subcommands/run/splite.go`.
  - `system-probe` — adds `datadog.systemProbe.enableOOMKill: true` so the agent's `shouldExecSPLite` keeps the full binary running.
- Asserts on the matched nginx process: TCP port 80 listener, `ServiceDiscovery.GeneratedServiceName == {nginx, SOURCE_COMMAND_LINE}`, `ApmInstrumentation == false`, `InjectionState == NOT_INJECTED`, non-empty `ContainerId`.
- Pins the Helm chart version to `3.213.0`; the framework default (`3.155.1`) predates both the discovery template (chart 3.205.0, DataDog/helm-charts#2598) and the `latest`/`7` → `7.78.x` fallback fix (chart 3.213.0, DataDog/helm-charts#2643).

### Motivation

https://datadoghq.atlassian.net/browse/DSCVR-385

There is no k8s e2e for discovery today. DataDog/helm-charts#2634 fixed a bug in discovery on k8s related to the seccomp profile; the change went undetected before merge because nothing exercises the discovery flow on a Helm-installed agent. This suite closes that gap with a smoke-level check that the discovery payload reaches fakeintake in both modes.

The k8s suite is narrower than `linux_test.go` (single workload, smoke-level assertions), at least for now. This is to avoid having to add new app definitions at this point for a basic test. The VM suite continues to be the exhaustive per-language source of truth.

### Describe how you validated your changes

Ran locally against AWS twice with `E2E_DEV_MODE=true dda inv -- -e new-e2e-tests.run --targets ./tests/discovery --run TestK8sTestSuite --stack-name-suffix v2`:

```
--- PASS: TestK8sTestSuite (364.64s)
    --- PASS: TestK8sTestSuite/TestNginxDiscovered (...)
        --- PASS: TestK8sTestSuite/TestNginxDiscovered/system-probe-lite
        --- PASS: TestK8sTestSuite/TestNginxDiscovered/system-probe
```

Lint: `golangci-lint run ./test/new-e2e/tests/discovery/...` clean (0 issues).

### Additional Notes

A few quirks worth flagging for reviewers:

- **Forced DaemonSet rollout via pod annotation.** Toggling `datadog.systemProbe.enableOOMKill` between sub-tests only mutates the chart-rendered configmap; the chart's `daemonset.yaml` has no `checksum/system-probe-yaml` annotation tying the pod template to that configmap, so the existing pod stays alive across the change. The suite writes a `agents.podAnnotations.discovery-e2e-mode: "spl"/"sp"` that intentionally differs per sub-test to bump the pod-template hash and force a rollout.
- **Tracer metadata / language detection out of scope.** Nginx is C/native so `language` and `serviceDiscovery.tracerMetadata` aren't populated. The two natural ways to extend this — switch to (or add) an OTel-instrumented Go server (`apps-calendar-go` — no `K8sAppDefinition` yet) or a `dd-trace-go`-instrumented app (`apps-tracegen` predates the memfd-tracer-metadata feature in `dd-trace-go.v1`) — both require cross-repo work in `test-infra-definitions`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: vincent.whitchurch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart/datadog This issue or pull request is related to the datadog chart datadog/minor-version Minor version bump for datadog chart mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants