Fix Docker build cache command handling#236
Conversation
Greptile SummaryThis PR refactors the Docker executor's build-cache path so that the runtime image's own build helper (
Confidence Score: 4/5Safe to merge with awareness that cache-enabled builds now embed the original user command directly into the The restructuring is architecturally sound — src/Executor/Runner/Docker.php — specifically the Important Files Changed
Reviews (4): Last reviewed commit: "fix: validate build cache keys" | Re-trigger Greptile |
| $status = $this->orchestration->execute( | ||
| name: $runtimeName, | ||
| command: $commands, | ||
| command: $this->getBuildCommands($command, $version), |
There was a problem hiding this comment.
When cacheKey is set, this path now runs the original user command directly and then tries to upload /cache/stores.sqfs. The removed wrapper was the code path that ran the build-cache helper around the command, and the removed script generation was the code path that gave that helper the original build command. Normal build commands such as tar -zxf ... && bash helpers/build.sh "npm install..." do not create /cache/stores.sqfs, so storeBuildCacheArtifact() returns early and no cache artifact is saved. Cache-enabled builds can still succeed, but subsequent builds will not produce the expected saved/hit cache behavior.
Artifacts
Repro: PHP script testing getBuildCommands cache lifecycle gap
- Contains supporting evidence from the run (text/x-php; charset=utf-8).
Repro: failing test output showing no cache lifecycle in build commands
- Keeps the command output available without making the summary code-heavy.
Summary
Tests