Namespace build caches by environment identity - #1196
Open
kartikjoshi21 wants to merge 3 commits into
Open
kartikjoshi21 wants to merge 3 commits into
kartikjoshi21 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Resolves #1096 by namespacing user build caches with explicit build-environment identities instead of route keys.
Changes:
- Adds cache identities to DEB, RPM, and Windows configurations.
- Propagates identities through package builders and cache mounts.
- Uses one mechanism to isolate alternate testing targets.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
cache.go |
Renames cache namespace inputs to environment identity. |
docs/spec.schema.json |
Updates cache namespace documentation. |
packaging/linux/deb/pkg.go |
Uses cache identity for DEB builds. |
packaging/linux/rpm/rpmbuild.go |
Uses cache identity for RPM builds. |
targets/linux/deb/debian/bookworm.go |
Defines Bookworm identity. |
targets/linux/deb/debian/bullseye.go |
Defines Bullseye identity. |
targets/linux/deb/debian/trixie.go |
Defines Trixie identity. |
targets/linux/deb/distro/distro.go |
Adds DEB identity configuration methods. |
targets/linux/deb/distro/pkg.go |
Resolves DEB build cache identity. |
targets/linux/deb/ubuntu/bionic.go |
Defines Bionic identity. |
targets/linux/deb/ubuntu/focal.go |
Defines Focal identity. |
targets/linux/deb/ubuntu/jammy.go |
Defines Jammy identity. |
targets/linux/deb/ubuntu/noble.go |
Defines Noble identity. |
targets/linux/deb/ubuntu/resolute.go |
Defines Resolute identity. |
targets/linux/rpm/almalinux/v8.go |
Defines AlmaLinux 8 identity. |
targets/linux/rpm/almalinux/v9.go |
Defines AlmaLinux 9 identity. |
targets/linux/rpm/azlinux/azlinux3.go |
Defines Azure Linux 3 identity. |
targets/linux/rpm/azlinux/azlinux4.go |
Defines Azure Linux 4 identity. |
targets/linux/rpm/distro/distro.go |
Adds RPM identity configuration methods. |
targets/linux/rpm/distro/dnf_install.go |
Passes identity to dependency RPM builds. |
targets/linux/rpm/distro/pkg.go |
Passes and validates RPM cache identity. |
targets/linux/rpm/rockylinux/v8.go |
Defines Rocky Linux 8 identity. |
targets/linux/rpm/rockylinux/v9.go |
Defines Rocky Linux 9 identity. |
targets/linux/rpm/suse/sles15.go |
Defines SLES 15 identity. |
targets/plugin/init.go |
Uniformly configures alternate-target identities. |
targets/windows/handle_container.go |
Uses configuration-bound Windows handlers. |
targets/windows/handle_zip.go |
Uses Windows environment identity for caches. |
targets/windows/handler.go |
Defines and propagates Windows cache configuration. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
DannyBrito
reviewed
Aug 11, 2026
DannyBrito
left a comment
Contributor
There was a problem hiding this comment.
I don't have much context but looks lgtm. There is some test failures
Collaborator
|
LGTM But you need to DCO sign each commit. |
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 this PR does / why we need it:
This PR changes user
Build.Cachesnamespacing to use an explicit build-environment cache identity.Before this change, RPM used the target key as part of the cache namespace. Windows also included the
target key in its cache namespace. That made cache behavior depend on the route name instead of the build
environment.
This could cause two problems:
the same
This PR adds
CacheIdentityfor deb, rpm, and Windows target configs. It also updates cache wiring soBuild.Cachesuse that identity instead of the target key.The
alt_testing_targetsregistration now varies cache identity uniformly across deb, rpm, and Windows.Fixes #1096