Skip to content

fix(ci): find GitHub diagnostic logs at the runner home _diag#2402

Merged
rodrigo-roca merged 2 commits into
masterfrom
rodrigo.roca/diag-runner-root-verify-test
Jul 13, 2026
Merged

fix(ci): find GitHub diagnostic logs at the runner home _diag#2402
rodrigo-roca merged 2 commits into
masterfrom
rodrigo.roca/diag-runner-root-verify-test

Conversation

@rodrigo-roca

@rodrigo-roca rodrigo-roca commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Covers GitHub Actions runners that keep diagnostic logs directly under the runner home — /home/runner/_diag/Worker_*.log — rather than under an actions-runner/ subdirectory.

  • Adds /home/runner/_diag to the static githubWellKnownDiagnosticDirsUnix.
  • Derives <HOME>/_diag and <HOME>/actions-runner/_diag in getGithubDiagnosticDirsFromEnv.

Adds a regression test for the self-hosted layout where the runner is
installed directly under /home/runner, so diagnostic logs live at
/home/runner/_diag (reachable only via the RUNNER_TEMP-derived
<runnerRoot>/_diag candidate). Existing tests never set RUNNER_TEMP, so
this path was previously unexercised.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Rodrigo Roca <[email protected]>
@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jul 10, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

Adds /home/runner/_diag to the static well-known dirs and derives
<HOME>/_diag and <HOME>/actions-runner/_diag from the environment, so
runners that keep _diag directly under the runner home are covered even
when RUNNER_TEMP is absent or has a shape that collapses the derived
root (e.g. /__w/_temp -> /). HOME-derived paths use upath.join so they
dedupe against existing candidates and each directory is read at most once.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: Rodrigo Roca <[email protected]>
@rodrigo-roca rodrigo-roca changed the title test(ci): verify RUNNER_TEMP-derived <root>/_diag job-name discovery fix(ci): find GitHub diagnostic logs at the runner home _diag Jul 10, 2026
@rodrigo-roca rodrigo-roca added the software-delivery Related to [coverage, deployment, dora, junit, measure, tag, trace] label Jul 10, 2026
@rodrigo-roca rodrigo-roca self-assigned this Jul 10, 2026
@rodrigo-roca
rodrigo-roca marked this pull request as ready for review July 10, 2026 09:39
@rodrigo-roca
rodrigo-roca requested review from a team as code owners July 10, 2026 09:39
@rodrigo-roca
rodrigo-roca force-pushed the rodrigo.roca/diag-runner-root-verify-test branch from 86cd253 to 2f97162 Compare July 13, 2026 09:43

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

Datadog Autotest: PASS

More details

No behavioral regressions found. The PR correctly adds support for GitHub diagnostic logs at the runner home (/home/runner/_diag) by deriving paths from environment variables. Deduplication logic prevents redundant directory checks, and all test scenarios validate the expected search order and handling of various runner configurations.

Was this helpful? React 👍 or 👎

📊 Validated against 5 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 2f97162 · What is Autotest? · Any feedback? Reach out in #autotest

@rodrigo-roca
rodrigo-roca merged commit e3b34dd into master Jul 13, 2026
34 checks passed
@rodrigo-roca
rodrigo-roca deleted the rodrigo.roca/diag-runner-root-verify-test branch July 13, 2026 10:52
@rodrigo-roca rodrigo-roca mentioned this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

software-delivery Related to [coverage, deployment, dora, junit, measure, tag, trace]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants