Repository navigation
fix(build): wire --no-cache to the engine (bypass the local layer cache) (#483) - #24
Conversation
cacheArgs read driveConfig.NoCache and returned nil, so --no-cache skipped only the --cache-from EXPORT while the LOCAL layer cache still served (charly#483 measured 126/136 layers cached on a build asked not to use the cache). Return the engine own --no-cache so the layer cache is bypassed; --cache none is the same "do not use the cache". A --mount=type=cache package mount still survives by design - the flag means cold LAYER cache, which is what its help says.
Review — BLOCKHead SHA: Change class: plugin Go code — build-engine arg construction ( Security screen: PASS (no T1–T4 finding; the diff only makes an existing flag effective, weakens no gate, adds no secret/network/supply-chain surface). Comments: the thread is empty — nothing to disposition. Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS Comments considered (1):
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…the engine) (#820) Carries opencharly/plugin-build#24: cacheArgs now returns the engine own --no-cache, so `charly box build --no-cache` bypasses the local layer cache instead of only skipping --cache-from (charly#483).
Summary
charly box build --no-cachewas read — but only enough to skip the--cache-fromEXPORT; the LOCAL layer cache still served. opencharly/charly#483 measured126/136layers served from cache on a build the operator asked to be cold, andcharly check runreported it as a PASS.Re-derivation (the issue's grep covered
charly/,sdk/,spec/spec/but not the plugin repos):candy/plugin-build/drive.go:73copiesreq.NoCacheintodriveConfig.NoCache, andpodman.go'scacheArgsreads it — returningnil. So the flag is not dead; it just does less than its help ("Disable build cache entirely") says.Fix: a no-cache build returns the engine's own
--no-cache, so the local layer cache is bypassed too.--cache noneis the same "do not use the cache" and takes the same path.Scope, stated honestly: this does not defeat a
--mount=type=cachepackage mount (a pacman/dnf package cache survives--no-cacheby design) — the flag means "cold layer cache", which is what its help says. The issue names that mount as a separate question; it is not silently implied here.Closes opencharly/charly#483 (lands in
charlyon the next plugin-build pin bump).Head
4caa667ed9403adceab568c4a53568026c9bf13e, diff vsorigin/main:How tested
Fresh-rebuild LIVE A/B — the exact behaviour the issue measured.
charlyrebuilt against THIS plugin checkout (scripts/bootstrap-charly.sh --dev-plugin plugin-build=<checkout>, dev build2026.279.2047), then the same box built twice — once warm, once with--no-cache:--no-cachenow serves ZERO layers from the cache (exit 0, no warnings) where a warm build served 12 — the126/136class is gone. First steps on the--no-cacherun show a real cold rebuild (STEP 2/17: RUN … pacman-key --init …with noUsing cache).Module suite on this head — gofmt/vet clean, tests GREEN:
The two changed assertions fail without the fix:
TestBuildNoCacheandTestBuildCacheNonenow require--no-cacheimmediately before the build context (.), the exact positioncacheArgsoccupies inbuildLocalArgs.Rulebook compliance
git-workflow,strict-policy,build,generate,go,pluginskills loaded.plugin-build, which the issue's grep did not cover) before editing; the issue's measured behaviour is the evidence.--mount=type=cachelimitation is stated, not deferred.cacheArgssite decides the no-cache path; no second guard.feat/no-cache-wiredofforigin/main; no submodule edit from the umbrella.charlyGo plugin code — the module suite GREEN + the fresh-rebuild livecharly box build --no-cache(exit 0, 0 cache hits, no warnings) the issue's own reviewer prescribed.Change classification
charlyrebuilt against this plugin,charly box build charly.arch.arch --no-cache(exit 0, 0 cache hits vs 12 warm) — plus the module suite (gofmt + vet +go test) GREEN on head4caa667. The new assertions fail without the change.fully tested and validated— the changed path ran live against the fresh rebuild with retained output; the module gate passed.Agent: issue-recheck · session 01a11333-b8e3-778e-b58d-c5e348543fde
Assisted-by: pi ollama-cloud/deepseek-v4.1-flash (fully tested and validated)