docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.41k stars 561 forks source link

Data exceeding the limit of 491994 byte #1256

Closed erez-levi closed 1 week ago

erez-levi commented 1 week ago

Hi,

Starting to encounter this issue when running the action:

Error: buildx failed with: ERROR: failed to solve: Internal: rpc error: code = Internal desc = received 4294967293-bytes data exceeding the limit 491994 bytes

It started after I added the load: true parameter to my action but I didn't manage to reproduce it to know if that is indeed what triggered it, when it fails a rerun is always successful afterwards which isn't expected.

The configuration:

- name: Build image
    uses: docker/build-push-action@v6
    with:
      push: ${{ inputs.push_image }} # true by default
      context: ./${{ inputs.image_path }}
      load: ${{ inputs.load }} # true by default
      provenance: false
      tags: |
        ${{ inputs.docker_repo }}/${{ env.NAME }}:rc-${{ env.TAG }}
      build-args: |
        GIT_BRANCH=${{ inputs.branch }}
        GIT_REPO=${{ github.repository }}
        GIT_TAG=${{ env.TAG }}
        ${{ inputs.args }}
      target: ${{ inputs.target }}
      file: ./${{ inputs.image_path }}/${{ inputs.dockerfile_name }}
      cache-from: ${{ env.CACHE_FROM }}
      cache-to: ${{ env.CACHE_TO }}
tri-bao commented 1 week ago

We've also been encountering this problem since few weeks now. I'd like to add: The issue is totally random. And as @erez-levi mentioned, when it happens, re-running the failed job pass successfully. In our case, the log looks like

#8 [build 1/7] FROM a-base-image
#8 sha256:c0aa161289038f2d8fa302761664b36d02bf293b47c035caeb05016dacd2c89a 768.36MB / 768.36MB 11.2s done
#8 extracting sha256:737c61ef39d943471b13636eb6712c4cf9859df842e82255c080360f3e005707 3.4s done
#8 extracting sha256:e6e7d49b3739e4e3e54a99816d0c62f1ebb3003f730b2ed68f2a383705b0dfed 0.0s done
#8 DONE 11.5s

#9 [internal] load build context
#9 transferring context: 279.28MB 12.1s done
#9 ERROR: rpc error: code = Internal desc = received 4294967290-bytes data exceeding the limit 623162 bytes

And the limit bytes is not fixed at all: a different number shows on every new error

crazy-max commented 1 week ago

Please create a proper bug report. We would need BuildKit container logs and link to workflow run to figure out what's going on. Thanks.

erez-levi commented 1 week ago

created a proper bug report @crazy-max @tri-bao