Skip to content

fix(cache): invalidate persistent cache when build dependencies snapshot is missing - #14944

Open
lazerg wants to merge 1 commit into
web-infra-dev:mainfrom
lazerg:fix/issue-14864-snapshot-build-recovery
Open

fix(cache): invalidate persistent cache when build dependencies snapshot is missing#14944
lazerg wants to merge 1 commit into
web-infra-dev:mainfrom
lazerg:fix/issue-14864-snapshot-build-recovery

Conversation

@lazerg

@lazerg lazerg commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Persistent-cache recovery trusted the snapshot_build scope even when it was empty. BuildDeps::validate only returned Invalid when a tracked file was modified or removed, so an absent build-dependency snapshot fell through to Valid { tracked_files: 0 }. Recovery then reused the cached artifacts and kept the old output, ignoring a file listed in cache.buildDependencies that had changed.

validate now also invalidates when the BUILD scope has no records while build dependencies were configured and the rest of the cache is still present, which only happens when that snapshot was lost. A genuine first build (no cache at all) stays valid.

Related links

Fixes #14864

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@lazerg
lazerg force-pushed the fix/issue-14864-snapshot-build-recovery branch from a803422 to 0a73997 Compare July 25, 2026 16:38
@lazerg
lazerg force-pushed the fix/issue-14864-snapshot-build-recovery branch from 0a73997 to 493c45c Compare July 25, 2026 16:39
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.

[Bug]: missing snapshot_build recovery keeps stale build-dependency output

1 participant