Files
Tosone f69ed99a27 feat(builder): rely on the buildkit registry cache instead of uploading an archive
The builder compressed its local buildkit cache into cache.tgz with zstd and
uploaded it to /api/v1/caches/{builder_id}, then downloaded and unpacked it on
the next run. That endpoint never existed on the server, the sigma-builder
image ships no zstd binary, and the unpack step extracted into the wrong
directory, so the flow only ever failed the build after the image was already
pushed and signed.

Drop the whole upload path (initCache/exportCache, the cache API client, the
cache API DTOs, the caches storage prefix) and let buildkit handle the cache
with its registry exporter when the builder enables it:

  --export-cache type=registry,ref=<registry>/<repository>:buildcache,mode=max
  --import-cache type=registry,ref=<registry>/<repository>:buildcache

The cache lives next to the image tag, so the builder reuses the credentials
and the insecure-registry configuration it already has.

Verification:
- go build -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./...
- go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/builder/...
- golangci-lint run --build-tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/builder/... ./pkg/consts/... ./pkg/storage/filesystem/...
2026-10-29 11:16:15 +08:00
..
2026-08-01 20:32:49 +08:00
2026-08-01 20:32:49 +08:00