[SDTEST-3796] Support version-namespaced GitHub runner _diag layout#254
Merged
Conversation
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]>
calvinbayer
approved these changes
May 15, 2026
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.
Summary
GitHub-hosted runners 2.334.0+ unpack the runner under a version-namespaced subdirectory:
/Users/runner/actions-runner/cached/<version>/_diag//Users/runner/actions-runner/cached/_diag/GithubCIEnvironmentReaderonly knew about the pre-2.334.0 layout, so on newer SaaS runners it couldn't locate theWorker_*.logfiles and failed to derive the GitHubcheck_run_id.Changes
cached/**/_diag—**matches zero or more path segments, so a single entry covers both layouts.expandGlob/expandGlobSegmentshelper that resolves**at lookup time and returns only existing directories. URLs without**are passed through unchanged, so the self-hosted literal path and test-injectedtempDirs keep working.JIRA: https://datadoghq.atlassian.net/browse/SDTEST-3796
Test plan
testGithubCIJobLogFilepasses (test injects a non-globtempDir, which short-circuits to identity).cached/_diag+cached/2.334.0/_diag+cached/junk/layout: both_diagvariants are matched;junk/(no_diagunderneath) is correctly excluded.check_run_idis extracted and step-level tagging works end-to-end.🤖 Generated with Claude Code