Repository navigation
Cache the changed build files instead of the public folder - #664
Merged
Merged
Conversation
The asset cache used to store only apps/<app>/<app>/public, so any build output written elsewhere in the app was lost when a build was restored from the cache. It also skipped the steps bench build runs after bundling. Build side (get_cached_app.py): - Touch a per-app time marker before build_assets, then list every path under apps/<app> changed since the marker with find -cnewer. - Skip node_modules (directories and the public/node_modules symlink) at any depth. Dependencies already come from the earlier yarn install, and the link is recreated on restore. - Pack the list into added_files_<app>.tar.gz inside the image, using --no-recursion so listed directories don't pull in unchanged contents. Restore side (get_cached_app.py): - extract_assets now overlays the changed files onto the app directory entry by entry instead of replacing public/ wholesale. Unchanged files are left alone, and existing symlinks are replaced, never written through. - Restore the sites/assets/<app> symlink and node_modules link as before. - Run bench compile-po-to-mo and the app's after_build hooks (new run_hooks.py), which bench build would otherwise have run. Agent side (builder.py): - upload_app_assets fetches the prebuilt tarball in a single get_archive call, unwraps it and uploads it as is, skipping the upload when nothing changed. - Remove repack_public_folder, which is no longer needed. - Copy run_hooks.py into the build context, with a test covering it.
Contributor
|
This pull request is merged. |
regdocs
added a commit
that referenced
this pull request
Nov 11, 2026
Cache the changed build files instead of the public folder (backport #664)
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.
The asset cache used to store only apps///public, so any build output written elsewhere in the app was lost when a build was restored from the cache. It also skipped the steps bench build runs after bundling.
Build side (get_cached_app.py):
Restore side (get_cached_app.py):
Agent side (builder.py):