feat: add storage-backed build cache support#233
Conversation
Greptile SummaryThis PR introduces opt-in build cache support for
Confidence Score: 4/5Safe to merge for v5-only deployments; v2 builds with a non-empty cacheKey will fail at runtime. The cache logic is well-structured and the cacheKey validation is correct. The one current defect is that cacheEnabled does not exclude v2 builds, so callers who pass a cacheKey with a v2 image will see their build fail — the helper script is v5-only and the guard is a one-line fix. src/Executor/Runner/Docker.php — specifically the cacheEnabled condition on line 322 Important Files Changed
Reviews (11): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
Summary
cacheKeyfor opt-in build cache reuse onPOST /v1/runtimescacheKeywith a safe path-friendly format and reject invalid keys/build-cache/<cacheKey>/lz4-b1M/stores.sqfs/cachedirectory into build containers for artifact restore/save/usr/local/server/helpers/build-cache.shnode_modulesdirectlycacheKeyandOPR_EXECUTOR_CONNECTION_BUILD_CACHE_STORAGERuntime Dependency
/usr/local/server/helpers/build-cache.sh,mksquashfs, andunsquashfsopen-runtimes/open-runtimes#497openruntimes/node:v5-18.0andopenruntimes/node:v5-22imagesTesting
php -l app/controllers.phpphp -l app/http.phpphp -l src/Executor/Runner/Adapter.phpphp -l src/Executor/Runner/Docker.phpphp -l tests/e2e/ExecutorTest.phpcomposer format:checkcomposer refactor:checkcomposer analyzecomposer validate --strictgit diff --checkOK (1 test, 8 assertions)Notes
cacheKeyOPR_EXECUTOR_CONNECTION_BUILD_CACHE_STORAGEfalls back toOPR_EXECUTOR_CONNECTION_STORAGEwhen emptyOPR_EXECUTOR_BUILD_CACHE_VOLUMEandOPR_EXECUTOR_BUILD_CACHE_HELPER_IMAGE