-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Build): use bench get-app cache #1396
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1396 +/- ##
==========================================
+ Coverage 44.78% 45.16% +0.38%
==========================================
Files 310 312 +2
Lines 20742 20935 +193
==========================================
+ Hits 9289 9456 +167
- Misses 11453 11479 +26 ☔ View full report in Codecov by Sentry. |
- Add flag to enable app cache, validate if supported - Ensure that get-app is setting cache
Will be putting it on hold until we've decided a way for apps to document minimum required frappe version. Edit: Roadblock removed. Format mentioned in frappe/bench#1524. Bench updated in frappe/bench#1525. |
- move validation to RG
- bump min bench version for get-app cache
- update Dockerfile to use single command if cache available - make bench get app cache searchable
cloned repo needs to be in the bind cache cause changing bind cache source causes layer cache miss
The field got removed somehow when adding in get app cache related fields to DC, potential FF bug?
build_output seems to not get set, probably something to do with how docker build output is captured
Use bench get-app cache when running
bench get-app
during build. Related PRs:Since this is bench dependent it will be restricted to bench versions 5.21.3 and up only.
TODO:
Update build stepsnot required since clone will be marked as cachedNotes
Further Improvements
bench init
artifacts mainlyfrappe
and its dependencies.Current Caveats
frappe>15.12.0
for buildnode_modules
have to be included in the cache.node_modules
.Get App Cache in Action
First Run (cache empty): time to build 9 apps 1780s (~30 minutes)
node_modules
and compressing cached assets.Second Run (cache used): time to build 9 apps 697s (~12 minutes)
Note: without compression, build times are:
Bench Get App Cache Virtual Doctype
Added to allow viewing cached artifacts, and checking report view. Delete also has been added but since each delete requires building a docker image (~15s) it's preferable to just use docker prune to free space.
Additional functionality can be added later on using
run_command_in_docker_cache
Images