Skip to content

Retry AWS SSI jobs when the installer cannot update apt sources - #8245

Merged
robertomonteromiguel merged 1 commit into
mainfrom
ssi-installer-apt-sources-known-exception
Oct 30, 2026
Merged

robertomonteromiguel merged 1 commit into
mainfrom
ssi-installer-apt-sources-known-exception

Conversation

@robertomonteromiguel

Copy link
Copy Markdown
Collaborator

Motivation

AWS SSI jobs fail for good when the Datadog apt repository is briefly inconsistent. The install script prints Failed to update the sources after adding the Datadog repository. (typically after a Hash Sum mismatch on apt.datadoghq.com) and the provision step exits 1. GitLab only retries exit code 3, so the job is not retried.

Seen on HOST_AUTO_INJECTION_INSTALL_SCRIPT_PROFILING / Ubuntu_24_10_amd64 (GitLab job 2191149577): the installer died during apt-get update, before any package was installed.

Changes

  • Add ssi_installer_apt_sources_update_failed to utils/virtual_machine/aws_infra_exceptions.json.
  • The ssi_installer_ prefix marks exceptions that come from the SSI installer, so later installer flakes can be added next to it.
  • A match makes _handle_provision_error exit 3. .base_job_onboarding_system_tests already retries that code up to 2 times, which recreates the VM.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Tests, manifest, weblog are modified -> you'll need a review from system-tests-reviewers: ask to one of youre co-worker familiar with the tested feature.
    • Framework is modified, or non obvious usage of it -> get a review from system-tests-core (slack)

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

🛟 #apm-shared-testing 🛟

Test plan

  • Confirm the substring Failed to update the sources after adding the Datadog repository. is present in the Pulumi CommandError of a failed install-script job (it is, in the Ubuntu_24_10_amd64.log of job 2191149577).
  • On the next occurrence, the job log shows Known infrastructure exception (ssi_installer_apt_sources_update_failed) and GitLab retries the job (exit code 3).
  • A real installer failure whose message does not contain this sentence still exits 1 and is not retried.

Made with Cursor

A transient Hash Sum mismatch on apt.datadoghq.com fails the install script with this message and exits 1, so GitLab never retries the job. Matching it as a known SSI installer exception exits 3 and reuses the existing job retry.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/virtual_machine/aws_infra_exceptions.json                         @DataDog/system-tests-core

@robertomonteromiguel
robertomonteromiguel marked this pull request as ready for review October 30, 2026 07:07
@robertomonteromiguel
robertomonteromiguel requested a review from a team as a code owner October 30, 2026 07:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-10-30T07:11:09.247746Z 08fe2be 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.

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

Copy link
Copy Markdown

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: 08fe2be00c

ℹ️ 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".

@robertomonteromiguel
robertomonteromiguel merged commit c527e58 into main Oct 30, 2026
774 checks passed
@robertomonteromiguel
robertomonteromiguel deleted the ssi-installer-apt-sources-known-exception branch October 30, 2026 09:03
p-datadog pushed a commit that referenced this pull request Nov 1, 2026
* u/main: (82 commits)
  Auto-activate nodejs easy wins for asm-libraries (#8265)
  Auto-activate nodejs easy wins for apm-sdk-capabilities (#8264)
  Auto-activate rust easy wins for apm-sdk-capabilities (#8217)
  Auto-activate golang easy wins for apm-sdk-capabilities (#8263)
  Auto-activate dotnet easy wins for apm-sdk-capabilities (#8262)
  test(ffe): cover Go and Java customer exposure hooks (#8094)
  Move the debugger scenarios to the mocked backend, with remote config sent through it (#8253)
  test(otel): observe the SDK's default OTLP protocol instead of hardcoding it (#8256)
  Revert "[debugger] Test that debugger metrics use the debugger telemetry namespace" (#8257)
  Check the mocked backend network aliases on GitLab (#8212)
  Agent on the mocked backend: set DD_SITE instead of each intake URL (#8254)
  [debugger] Test that debugger metrics use the debugger telemetry namespace (#8052)
  Fail SSI installs when component installation fails (#8246)
  Collect HotSpot hs_err logs from Java AWS SSI weblogs (#8249)
  FFE direct shutdown: detect the priming capture without the watchdog latency (#8250)
  Move DEBUGGER_TELEMETRY to the mocked backend, which serves remote config (#8239)
  PHP parametric base image (#8172)
  AI Guard: tests for backend-provided extra_tags on the ai_guard span (#8130)
  Cbeauchesne/rename dead and legacy features (#8240)
  Retry AWS SSI jobs when the installer cannot update apt sources (#8245)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants