Skip to content

Retry Docker SSI Agent install - #7715

Merged
nccatoni merged 3 commits into
mainfrom
dd/nccatoni/retry-agent-installer-20260914
Sep 14, 2026
Merged

nccatoni merged 3 commits into
mainfrom
dd/nccatoni/retry-agent-installer-20260914

Conversation

@nccatoni

@nccatoni nccatoni commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Docker SSI image builds occasionally fail when transient connectivity errors interrupt the Datadog Agent installer. Retrying only the installer-script download does not recover failures that occur while the downloaded installer is running, and continuing after such a failure obscures the root cause.

Changes

  • Retry the Datadog Agent installer up to three times, with a short delay between attempts, in both Docker SSI installation paths.
  • Centralize retry attempts, delays, logging, and terminal failure handling in one generic helper; the download helper wraps it while preserving its five-attempt behavior.
  • Explicitly abort both SSI installation scripts after the final failed Agent installer attempt, ensuring the Docker build stops before cleanup or later steps can mask the failure.

Testing

  • Verified with synthetic shell commands that a transient installer failure succeeds on the third attempt and persistent failures return non-zero after exactly three attempts.
  • Verified that both complete SSI scripts exit with status 1 after exhausted retries and that the standard path does not execute Agent cleanup afterward.
  • Verified that the download wrapper delegates five attempts with the expected URL and output filename.
  • Passed Bash syntax checks, ShellCheck, and git diff --check for all changed scripts.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

PR by Bits - View session in Datadog

Comment @DataDog to request changes

Co-authored-by: nccatoni <222672590+nccatoni@users.noreply.github.com>
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

@datadog-datadog-prod-us1

Copy link
Copy Markdown

I can only run on private repositories.

@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/build/ssi/base/download_with_retry.sh                             @DataDog/system-tests-core
utils/build/ssi/base/install_script_ssi.sh                              @DataDog/system-tests-core
utils/build/ssi/base/install_script_ssi_installer.sh                    @DataDog/system-tests-core

datadog-bits and others added 2 commits September 14, 2026 13:25
Co-authored-by: nccatoni <222672590+nccatoni@users.noreply.github.com>
Co-authored-by: nccatoni <222672590+nccatoni@users.noreply.github.com>
@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Tests

All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: d012eeb | Docs | View more details | Give us feedback!

@nccatoni
nccatoni marked this pull request as ready for review September 14, 2026 13:45
@nccatoni
nccatoni requested a review from a team as a code owner September 14, 2026 13:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T13:47:58.249782Z d012eeb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@nccatoni
nccatoni merged commit 31587fb into main Sep 14, 2026
816 checks passed
@nccatoni
nccatoni deleted the dd/nccatoni/retry-agent-installer-20260914 branch September 14, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants