Extend progressive cache to bazel-managed Go and pip#47007
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomainfrom Feb 27, 2026
Merged
Extend progressive cache to bazel-managed Go and pip#47007gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomainfrom
bazel-managed Go and pip#47007gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomainfrom
Conversation
Contributor
Gitlab CI Configuration ChangesChanges Summary
ℹ️ Diff available in the job log. |
Contributor
Files inventory check summaryFile checks results against ancestor f8d99651: Results for datadog-agent_7.78.0~devel.git.182.2964ea7.pipeline.99454997-1_amd64.deb:Detected file changes:
|
8c2b505 to
34eaa5c
Compare
34eaa5c to
45e5956
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45e5956b29
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
45e5956 to
23e4808
Compare
### What does this PR do? Wire up `bazel`-managed Go and `pip` caches to `XDG_CACHE_HOME` in the `tools/bazel*` scripts, and add the corresponding paths to the progressive GitLab runner cache keyed on `.go-version` and `.python-version`. ### Motivation Extend #43274's XDG-as-single-cache-root design to Go and `pip`, whose XDG support has been steadlessly growing from "Partial" to "Supported": https://wiki.archlinux.org/title/XDG_Base_Directory. By landing in `$XDG_CACHE_HOME`, they inherit the progressive-cache policy from #46151: only `main` pushes to them, keeping growth bounded. Keying on language version files further contains growth by resetting the cache at version upgrade boundaries rather than accumulating superseded artifacts. ### Additional Notes No worry: the new cache paths are already excluded from omnibus source trees via `**/.cache/**/*` source filters. Coming soon: we might want to leverage upcoming `--strict_repo_env` (with `bazel` 8.6+), for which we'll anyway have to list allowed environment variables. Near future: as the omnibus-bazel transition progresses, other caches (`cache_omnibus_ruby_deps`, `go_deps`, `go_tools_deps`, `go_tools_deps_arm64`, etc.) are expected to shrink until no longer applicable.
Fail early with an informative error if XDG_CACHE_HOME is set but does not denote an absolute path. A relative XDG_CACHE_HOME would silently produce distinct cache locations depending on the working directory, potentially mixing artifacts across workspaces or failing to locate cached files.
23e4808 to
2964ea7
Compare
alopezz
approved these changes
Feb 27, 2026
rdesgroppes
added a commit
that referenced
this pull request
Feb 27, 2026
)" This reverts commit 16eda26.
rdesgroppes
added a commit
that referenced
this pull request
Feb 27, 2026
)" This reverts commit 16eda26.
rdesgroppes
added a commit
that referenced
this pull request
Feb 27, 2026
)" This reverts commit 16eda26.
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.
What does this PR do?
Wire up
bazel-managed Go andpipcaches toXDG_CACHE_HOMEin thetools/bazel*scripts, and add the corresponding paths to the progressive GitLab runner cache keyed on.go-versionand.python-version.Motivation
Extend #43274's XDG-as-single-cache-root design to Go and
pip, whose XDG support has been steadlessly growing from "Partial" to "Supported": https://wiki.archlinux.org/title/XDG_Base_Directory.By landing in
$XDG_CACHE_HOME, they inherit the progressive-cache policy from #46151: onlymainpushes to them, keeping growth bounded.Keying on language version files further contains growth by resetting the cache at version upgrade boundaries rather than accumulating superseded artifacts.
Additional Notes
No worry: the new cache paths are already excluded from omnibus source trees via
**/.cache/**/*source filters.Coming soon: we might want to leverage upcoming
--strict_repo_env(withbazel8.6.0, #47011), for which we'll anyway have to list propagated environment variables.Near future: as the omnibus-bazel transition progresses, other caches (
cache_omnibus_ruby_deps,go_deps,go_tools_deps,go_tools_deps_arm64, etc.) are expected to shrink until no longer applicable.