Skip to content

[SDTEST-3796] Support version-namespaced GitHub runner _diag layout#254

Merged
ypopovych merged 4 commits into
mainfrom
SDTEST-3796-runner-cached-version-glob
May 15, 2026
Merged

[SDTEST-3796] Support version-namespaced GitHub runner _diag layout#254
ypopovych merged 4 commits into
mainfrom
SDTEST-3796-runner-cached-version-glob

Conversation

@ypopovych

@ypopovych ypopovych commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

GitHub-hosted runners 2.334.0+ unpack the runner under a version-namespaced subdirectory:

  • New: /Users/runner/actions-runner/cached/<version>/_diag/
  • Old: /Users/runner/actions-runner/cached/_diag/

GithubCIEnvironmentReader only knew about the pre-2.334.0 layout, so on newer SaaS runners it couldn't locate the Worker_*.log files and failed to derive the GitHub check_run_id.

Changes

  • Replace the literal SaaS path with the globstar pattern cached/**/_diag** matches zero or more path segments, so a single entry covers both layouts.
  • Add a small expandGlob/expandGlobSegments helper that resolves ** at lookup time and returns only existing directories. URLs without ** are passed through unchanged, so the self-hosted literal path and test-injected tempDirs keep working.

JIRA: https://datadoghq.atlassian.net/browse/SDTEST-3796

Test plan

  • testGithubCIJobLogFile passes (test injects a non-glob tempDir, which short-circuits to identity).
  • Standalone verification against a fake cached/_diag + cached/2.334.0/_diag + cached/junk/ layout: both _diag variants are matched; junk/ (no _diag underneath) is correctly excluded.
  • CI run on a 2.334.0+ runner confirms check_run_id is extracted and step-level tagging works end-to-end.

🤖 Generated with Claude Code

GitHub-hosted runners 2.334.0+ unpack the runner under
/home/runner/actions-runner/cached/<version>/_diag/ instead of
/home/runner/actions-runner/cached/_diag/. Use a cached/**/_diag
globstar pattern (zero or more segments) and expand it at lookup
time so both layouts are matched by a single entry. Self-hosted
literal path and test-injected dirs pass through unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ypopovych
ypopovych requested review from a team as code owners May 15, 2026 13:42
@ypopovych
ypopovych requested a review from calvinbayer May 15, 2026 13:56
@ypopovych
ypopovych merged commit 4fb7863 into main May 15, 2026
16 checks passed
@ypopovych
ypopovych deleted the SDTEST-3796-runner-cached-version-glob branch May 15, 2026 14:49
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