Skip to content

Stop installing dd-pkg at runtime#51161

Draft
AliDatadog wants to merge 1 commit into
mainfrom
codex-require-preinstalled-dd-pkg
Draft

Stop installing dd-pkg at runtime#51161
AliDatadog wants to merge 1 commit into
mainfrom
codex-require-preinstalled-dd-pkg

Conversation

@AliDatadog
Copy link
Copy Markdown
Contributor

@AliDatadog AliDatadog commented May 21, 2026

What does this PR do?

Stop installing dd-pkg at runtime in Agent CI.

  • .setup_dd_pkg now only runs dd-pkg version, so jobs fail fast if the build image does not provide the CLI.
  • Removes DD_PKG_VERSION and the per-job DD_PKG_ARCH variables that only existed to download the runtime tarball.
  • Keeps existing dd-pkg upload, lint, sign, and promote usage unchanged.
flowchart LR
  Old[CI job starts] --> Download[curl dd-pkg tarball from S3]
  Download --> Run[dd-pkg upload/sign/promote]
  New[CI job starts with updated build image] --> Version[dd-pkg version]
  Version --> Run
Loading

Motivation

dd-pkg should be part of the build images instead of being downloaded during every CI job. The corresponding buildimages change has merged: DataDog/datadog-agent-buildimages#1176.

Rollout dependency

Keep this PR draft until the Agent build image variables point at buildimages that include dd-pkg.

The relevant image families are:

  • CI_IMAGE_LINUX
  • CI_IMAGE_GITLAB_AGENT_DEPLOY
  • CI_IMAGE_RPM_ARMHF

Jira: https://datadoghq.atlassian.net/browse/BARX-1747

Describe how you validated your changes

  • git diff --check
  • dda inv linter.gitlab-ci --test=all
  • dda inv invoke-unit-tests.run --tests gitlab_api --directory tasks/unit_tests
  • Pre-push hook gitlab-configuration passed while updating the branch.

Additional Notes

This intentionally keeps DD_PKG_GITLAB_URL and all actual dd-pkg command usage. Only the runtime installation path was removed.

@github-actions
Copy link
Copy Markdown
Contributor

@codex review

@datadog-official
Copy link
Copy Markdown
Contributor

datadog-official Bot commented May 21, 2026

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 42 Pipeline jobs failed

DataDog/datadog-agent | agent_suse-arm64-a7   View in Datadog   GitLab

🔄 Retry job. This looks flaky and may succeed on retry. Failed to create pod sandbox: unable to allocate IP via local Cilium agent. No available IPs for allocation.

DataDog/datadog-agent | agent_deb-arm64-a7   View in Datadog   GitLab

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. Missing expected environment variables for Omnibus build. Command 'dd-pkg' not found.

DataDog/datadog-agent | agent_deb-arm64-a7-fips   View in Datadog   GitLab

🛟 This job is unlikely to succeed on retry. Please review your pipeline configuration. Command 'dd-pkg' not found during script execution.

View all 42 failed jobs.

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 50.35% (-0.01%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e718cc2 | Docs | Datadog PR Page | Give us feedback!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a0b6ea3cd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

# - Verify the build image provides `dd-pkg`, logging the version in use for the job
.setup_dd_pkg:
- curl --retry 5 -sSL "https://dd-package-tools.s3.amazonaws.com/dd-pkg/${DD_PKG_VERSION}/dd-pkg_Linux_${DD_PKG_ARCH}.tar.gz" | tar -xz -C /usr/local/bin dd-pkg
- dd-pkg version
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bump dd-pkg-capable CI images atomically

Switching .setup_dd_pkg from runtime install to just dd-pkg version makes every job that references it fail immediately when the selected image lacks the binary (GitLab stops on non-zero script commands). In this same commit, no CI_IMAGE_LINUX, CI_IMAGE_GITLAB_AGENT_DEPLOY, or CI_IMAGE_RPM_ARMHF values are updated, yet those images are used by packaging/deploy/release jobs that call .setup_dd_pkg (for example in .gitlab/build/packaging/{deb,rpm}.yml, .gitlab/deploy/deploy_packages/deploy_common.yml, and .gitlab/distribute/trigger_release/*.yml), so merging this change before image bumps will break those pipelines with dd-pkg: command not found.

Useful? React with 👍 / 👎.

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 21, 2026

Gitlab CI Configuration Changes

Updated: .gitlab-ci.yml

⚠️ Diff too large to display on Github.

Changes Summary

Removed Modified Added Renamed
0 101 0 0

Updated: .gitlab/distribution.yml

⚠️ Diff too large to display on Github.

Changes Summary

Removed Modified Added Renamed
0 8 0 0

ℹ️ Diff available in the job log.

@AliDatadog AliDatadog force-pushed the codex-require-preinstalled-dd-pkg branch from 1a0b6ea to e718cc2 Compare May 22, 2026 13:10
@AliDatadog AliDatadog added changelog/no-changelog No changelog entry needed qa/no-code-change No code change in Agent code requiring validation labels May 22, 2026 — with ddtool CLI
@github-actions
Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed internal Identify a non-fork PR medium review PR review might take time qa/no-code-change No code change in Agent code requiring validation team/agent-build team/agent-delivery team/agent-devx team/container-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant