Skip to content

Build started failing with "invalid configuration for remote cache" error #5965

@andrewnazarov

Description

@andrewnazarov

Contributing guidelines and issue reporting guide

Well-formed report checklist

  • I have found a bug that the documentation does not mention anything about my problem
  • I have found a bug that there are no open or closed issues that are related to my problem
  • I have provided version/information about my environment and done my best to provide a reproducer

Description of bug

Bug description

Several days ago, our pipeline started failing with the following:

#25 exporting cache to registry
#25 preparing build cache for export
#25 preparing build cache for export 110.7s done
#25 ERROR: invalid configuration for remote cache

We noticed that the version of buildkit had changed. After we pinned it to the previous version (v0.20.2) the problem got solved. I saw no configuration or other relevant changes in the release notes.

We are using mode MAX and GCP's Artifact registry as a Docker registry.

Reproduction

We have the following set of commands:

docker context create tls-environment --docker "host=tcp://localhost:2376,ca=${DOCKER_CERT_PATH}/ca.pem,cert=${DOCKER_CERT_PATH}/cert.pem,key=${DOCKER_CERT_PATH}/key.pem"

docker buildx create --driver docker-container --use tls-environment

docker buildx build --provenance=false --platform linux/amd64 --push --tag ${DOCKER_IMAGE}:${TAG} --cache-from type=registry,ref=${CACHE_IMAGE} --cache-to type=registry,ref=${DOCKER_IMAGE_CACHE}:${CI_COMMIT_REF_SLUG}-cache,mode=max,oci-mediatypes=false --progress=plain --pull .

Version information

Driver:        docker-container
Last Activity: 2025-05-12 07:56:42 +0000 UTC
Nodes:
Name:                  objective_johnson0
Endpoint:            tls-environment
Status:                running
BuildKit daemon flags: --allow-insecure-entitlement=network.host
BuildKit version:      v0.21.1
Platforms:             linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386
Labels:
 org.mobyproject.buildkit.worker.executor:         oci
 org.mobyproject.buildkit.worker.hostname:       2ab661896780
 org.mobyproject.buildkit.worker.network:          host
 org.mobyproject.buildkit.worker.oci.process-mode: sandbox
 org.mobyproject.buildkit.worker.selinux.enabled:  false
 org.mobyproject.buildkit.worker.snapshotter:      overlayfs

Docker version: 27.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions