← Back to Pull requests

Fix DDOT install for Agent >= 7.78.0 #414

Closed
unknown closed this pull request without merging on Jul 09, 2026 12:48 UTC
View on GitHub
unknown unknown commented on Mar 27, 2026 15:15 UTC
Author

Bug

For Agent >= 7.78.0, DDOT is installed by the Agent's own post-install script rather than the install script. The previous fix (#406) handled this by unsetting \DD_OTELCOLLECTOR_ENABLED\, which caused two regressions:

1. \DD_OTELCOLLECTOR_ENABLED\ was no longer present in the environment when running \apt-get\/\yum\/\zypper install datadog-agent\, so the Agent's post-install script couldn't see it and wouldn't install DDOT
2. \update_ddot\ and \manage_otel_config\ were also skipped (they gate on \DD_OTELCOLLECTOR_ENABLED\), so the Datadog Agent config was not updated for DDOT

Why not pass DD_OTELCOLLECTOR_ENABLED to the package manager?

An intermediate approach passed \DD_OTELCOLLECTOR_ENABLED\ to the \apt-get\/\yum\/\zypper\ install command so the Agent's post-install script could pick it up. This failed because the Agent post-install runs before the install script creates \datadog.yaml\, causing:

failed to install extensions: extension ddot: could not install extension: failed to run hook (postInstallExtension): run failed: failed to write otel-config.yaml: failed to read datadog.yaml: open /etc/datadog-agent/datadog.yaml: no such file or directory

Fix

For Agent >= 7.78.0, instead of relying on the Agent post-install script:

  • Do not pass \DD_OTELCOLLECTOR_ENABLED\ to the package manager (avoids triggering the broken post-install)

  • After \datadog.yaml\ is created by the install script, call \datadog-installer extension install "oci://\${ddot_oci_registry}/agent-package:\${ddot_oci_tag}" "ddot"\ directly — this handles both DDOT installation and configuration

  • Skip the \datadog-agent-ddot\ deb/rpm package install and repo setup (no longer needed)
  • For Agent < 7.78.0, behavior is unchanged: the \datadog-agent-ddot\ package is installed from the dedicated apt/yum/zypper repo, and \update_ddot\/\manage_otel_config\ run as before.

    Test plan


  • With \DD_OTELCOLLECTOR_ENABLED\ set and Agent < 7.78.0: ddot repo setup and package install run as before, \update_ddot\/\manage_otel_config\ still run

  • With \DD_OTELCOLLECTOR_ENABLED\ set and Agent >= 7.78.0: ddot repo/package install are skipped, \datadog-installer extension install\ is called after \datadog.yaml\ is created

  • Without \DD_OTELCOLLECTOR_ENABLED\: no behavior change
  • Diff: 295 lines (+221 / -74) across 3 files Reviewer: BaptisteFoy Review duration: 149613m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 295 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.340
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #414"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.0% (MEDIUM) · Higher = larger blast radius
    40.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.8% · Safe to merge
    15.8%