Support BUILDKIT_CACHE_MOUNT_NS for persistent caches - #1203
Open
kartikjoshi21 wants to merge 5 commits into
Open
Support BUILDKIT_CACHE_MOUNT_NS for persistent caches#1203kartikjoshi21 wants to merge 5 commits into
kartikjoshi21 wants to merge 5 commits into
Conversation
✅ Deploy Preview for dalec ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds BUILDKIT_CACHE_MOUNT_NS support across Dalec’s persistent BuildKit caches.
Changes:
- Threads the global namespace through package, language, and user-defined caches.
- Centralizes cache ID construction and target cache identities.
- Adds tests, schema updates, and documentation.
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
website/content/caches.md |
Documents global cache namespacing. |
targets/windows/handler.go |
Adds configurable Windows cache identity. |
targets/windows/handle_zip.go |
Applies namespace to Windows build caches. |
targets/windows/handle_container.go |
Uses configured Windows handlers. |
targets/plugin/init.go |
Separates alternate-target cache identities. |
targets/linux/rpm/suse/sles15.go |
Defines SLES cache identity. |
targets/linux/rpm/rockylinux/v9.go |
Defines Rocky 9 cache identity. |
targets/linux/rpm/rockylinux/v8.go |
Defines Rocky 8 cache identity. |
targets/linux/rpm/distro/pkg.go |
Passes namespace into RPM builds. |
targets/linux/rpm/distro/dnf_install.go |
Namespaces DNF cache mounts. |
targets/linux/rpm/distro/distro.go |
Centralizes RPM cache IDs. |
targets/linux/rpm/distro/determinism_test.go |
Tests namespaced RPM caches. |
targets/linux/rpm/azlinux/azlinux4.go |
Defines Azure Linux 4 cache identity. |
targets/linux/rpm/azlinux/azlinux3.go |
Defines Azure Linux 3 cache identity. |
targets/linux/rpm/almalinux/v9.go |
Defines AlmaLinux 9 cache identity. |
targets/linux/rpm/almalinux/v8.go |
Defines AlmaLinux 8 cache identity. |
targets/linux/deb/ubuntu/resolute.go |
Defines Resolute cache identity. |
targets/linux/deb/ubuntu/noble.go |
Defines Noble cache identity. |
targets/linux/deb/ubuntu/jammy.go |
Defines Jammy cache identity. |
targets/linux/deb/ubuntu/focal.go |
Defines Focal cache identity. |
targets/linux/deb/ubuntu/bionic.go |
Defines Bionic cache identity. |
targets/linux/deb/distro/worker.go |
Namespaces worker apt caches. |
targets/linux/deb/distro/pkg.go |
Passes namespace into DEB builds. |
targets/linux/deb/distro/install.go |
Namespaces install-time apt caches. |
targets/linux/deb/distro/distro.go |
Adds configurable DEB cache identity. |
targets/linux/deb/distro/container.go |
Namespaces container apt caches. |
targets/linux/deb/debian/trixie.go |
Defines Trixie cache identity. |
targets/linux/deb/debian/bullseye.go |
Defines Bullseye cache identity. |
targets/linux/deb/debian/bookworm.go |
Defines Bookworm cache identity. |
source.go |
Carries the cache namespace in source options. |
preprocess.go |
Namespaces preprocessing gomod caches. |
packaging/linux/rpm/rpmbuild.go |
Applies namespace to RPM user caches. |
packaging/linux/deb/pkg.go |
Applies namespace to DEB user caches. |
load.go |
Registers the new build argument. |
helpers.go |
Adds namespaced apt-cache helpers. |
generator_gomod.go |
Namespaces gomod proxy caches. |
frontend/gateway.go |
Reads the namespace build argument. |
frontend/gateway_test.go |
Tests build-argument extraction. |
docs/spec.schema.json |
Updates generated cache documentation. |
cmd/website/main.go |
Uses standardized persistent cache IDs. |
cache.go |
Applies namespaces across cache types. |
cache_id.go |
Introduces structured cache ID generation. |
cache_id_test.go |
Tests cache IDs and namespace behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Adds support for the Dockerfile-compatible BUILDKIT_CACHE_MOUNT_NS build arg.
When set, DALEC prefixes persistent BuildKit cache mount IDs with the provided namespace. This gives users a single global knob to isolate cache mounts across projects, CI lanes, branches, or shared builders without editing every spec cache key.
Fixes #1127