Skip to content

deployvfs: fix source ordering and split layer hints into its own source#575

Merged
malt3 merged 1 commit into
mainfrom
fix-deployvfs-ordering-cas
Jun 24, 2026
Merged

deployvfs: fix source ordering and split layer hints into its own source#575
malt3 merged 1 commit into
mainfrom
fix-deployvfs-ordering-cas

Conversation

@malt3

@malt3 malt3 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Three fixes to the VFS blob resolution in deployvfs:

  1. resolveManifestBlob / resolveConfigBlob: runfiles was tried last, after disk cache and remote CAS. Correct order is OCI layouts → runfiles → disk cache → remote CAS (Bazel caches always last).

  2. layerFromCAS now only handles the Bazel remote cache. Layer hints (local paths from BUILD_WORKSPACE_DIRECTORY) are extracted into a new layerFromHints source that decides independently whether it is unconfigured, and is ordered just before disk cache and remote cache in layerBlob.

  3. CAS reader is now only configured when at least one operation uses the "lazy" strategy (or unconditionally in the persistent worker, since a future request may need it). This ensures layerFromCAS correctly returns BlobSourceUnconfigured for non-lazy builds instead of silently skipping the source.

Three fixes to the VFS blob resolution in deployvfs:

1. resolveManifestBlob / resolveConfigBlob: runfiles was tried last,
   after disk cache and remote CAS. Correct order is OCI layouts →
   runfiles → disk cache → remote CAS (Bazel caches always last).

2. layerFromCAS now only handles the Bazel remote cache. Layer hints
   (local paths from BUILD_WORKSPACE_DIRECTORY) are extracted into a
   new layerFromHints source that decides independently whether it is
   unconfigured, and is ordered just before disk cache and remote cache
   in layerBlob.

3. CAS reader is now only configured when at least one operation uses
   the "lazy" strategy (or unconditionally in the persistent worker,
   since a future request may need it). This ensures layerFromCAS
   correctly returns BlobSourceUnconfigured for non-lazy builds instead
   of silently skipping the source.
@malt3 malt3 force-pushed the fix-deployvfs-ordering-cas branch from 29f944d to 5b2673f Compare June 24, 2026 17:27
@malt3 malt3 added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit 7d22da5 Jun 24, 2026
8 checks passed
@malt3 malt3 deleted the fix-deployvfs-ordering-cas branch June 24, 2026 18:08
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.

1 participant