Skip to content

fix: retry Test Visibility installation - #75

Merged
juan-fernandez merged 3 commits into
mainfrom
juan-fernandez/retry-test-visibility-install
Oct 13, 2026
Merged

juan-fernandez merged 3 commits into
mainfrom
juan-fernandez/retry-test-visibility-install

Conversation

@juan-fernandez

@juan-fernandez juan-fernandez commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Retries the installer download and configuration script up to three times, with 2- and 4-second backoff. HTTP errors now fail the curl download. GNU wget's own retry count is limited when its help advertises the option; minimal wget implementations retain the portable invocation.

Checksum verification remains mandatory. Environment output is captured separately for each installer attempt and appended to GITHUB_ENV only after a successful run.

Motivation

Fixes #74. Transient connection resets and upstream/registry failures currently fail the workflow when the download or installer exits unsuccessfully, even when rerunning the job succeeds.

Additional Notes

The hosted v15 installer is unchanged. Retrying its execution covers failures from tracer artifact downloads and package-manager installs, including failures after npm exhausts its own HTTP retries.

Possible Drawbacks / Trade-offs

Retries also apply to permanent download/install failures, adding up to two attempts and six seconds of backoff per phase. Retrying a multi-language installation reruns earlier successful language installs.

Describe how to test/QA your changes

Run python3 scripts/test-install-retries.py. The test uses Python's standard-library HTTP server and executes the action's shell step with a small fixture installer. It covers recovery from download and installer failures, the three-attempt limit for each phase, and discarding environment output from failed attempts.

Validation:

  • All three cases passed locally on macOS and in root Linux containers with curl, GNU wget, and BusyBox wget.
  • Test-created workspace symlinks are cleaned up between cases; an unrelated existing symlink is preserved.
  • The recovery test fails against the original action on an injected HTTP 503.
  • Bash syntax, YAML parsing, and git diff --check passed.

The same regression test is added to CI alongside the existing Java and Go smoke tests.

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-13T12:08:44.703466Z af30669 Manual request
ℹ️ 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: 069df0f858

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

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread action.yml Outdated
Comment thread scripts/test-install-retries.py

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: FAIL

The wget fallback now rejects BusyBox installations because of an unsupported retry option. The regression script also fails when run as root because temporary workspace cleanup leaves a dangling shared symlink.

Open Bits AI session

🤖 Bits Code Review · Commit 069df0f

Comment thread action.yml Outdated
Comment thread scripts/test-install-retries.py
@juan-fernandez

Copy link
Copy Markdown
Contributor Author

/datadog autotest review
@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

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

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

Retries preserve failure exit codes after three attempts, and failed installer output is excluded from GITHUB_ENV. The completed static review identified no reportable regression.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit af30669

@juan-fernandez

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: af30669719

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

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@juan-fernandez
juan-fernandez marked this pull request as ready for review October 13, 2026 12:11
@juan-fernandez
juan-fernandez requested a review from a team as a code owner October 13, 2026 12:11
@juan-fernandez juan-fernandez changed the title [WIP] fix: retry Test Visibility installation fix: retry Test Visibility installation Oct 13, 2026

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

Failed installer attempts do not publish environment output, and exhausted retries still fail the action. Static analysis and isolated retry probes found no reportable regression; the hosted installer was not exercised.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit af30669

@juan-fernandez
juan-fernandez merged commit bc3aed5 into main Oct 13, 2026
12 checks passed
@juan-fernandez
juan-fernandez deleted the juan-fernandez/retry-test-visibility-install branch October 13, 2026 14:15
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.

[BUG] Install should retry transient network failures

2 participants