fix(ci): find GitHub diagnostic logs at the runner home _diag#2402
Merged
Conversation
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]>
🎉 All green!🧪 All tests passed 🔗 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
marked this pull request as ready for review
July 10, 2026 09:39
juan-fernandez
approved these changes
Jul 10, 2026
Drarig29
approved these changes
Jul 13, 2026
rodrigo-roca
force-pushed
the
rodrigo.roca/diag-runner-root-verify-test
branch
from
July 13, 2026 09:43
86cd253 to
2f97162
Compare
There was a problem hiding this comment.
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.
📊 Validated against 5 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 2f97162 · What is Autotest? · Any feedback? Reach out in #autotest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Covers GitHub Actions runners that keep diagnostic logs directly under the runner home —
/home/runner/_diag/Worker_*.log— rather than under anactions-runner/subdirectory./home/runner/_diagto the staticgithubWellKnownDiagnosticDirsUnix.<HOME>/_diagand<HOME>/actions-runner/_diagingetGithubDiagnosticDirsFromEnv.