Balena push does not use cache

Dear support,

We are in the process of creating a release. However when pushing the release for testing to a device in local mode with 'balena push ’ one of the services is rebuild everytime even though nothing changes. It takes about 1 hour to build the entire docker so our development is seriously compromised at the moment. What could possibly cause this?

We do not use an option like =’–no-cache’ nor do we change anything in the dockerfile or docker-compose.yaml file. We are running host OS version: balenaOS 2.58.6+rev1 and supervisor version
11.14.0
balena cli:12.38.3

[UPDATE] 12-03-2021 14:56

I’ve upgraded to balena-cli version 12.40.4 and I was still experiencing the same issues.

Next I simplified the docker. It now only contains the following:

FROM debian:buster

ENV DEBIAN_FRONTEND=noninteractive

# Install git and ssh
RUN apt update && apt install -y --no-install-recommends \
        openssh-client \
        git && \
    apt clean && rm -rf /var/lib/apt/lists/*

RUN apt update

CMD ["/bin/bash"]

This loads the cache but gives the following error:

[Error]   There was an error rebuilding the service: InvalidArgumentError: Dockerfile with 2 stages provided, but 0 image IDs passed to livepush constructor (there should be 1)

It is important to note that the dockerfile in question was a multi-stage docker. Also when compiling with docker I don’t experience any issues.

Kind regards,
Toby

Hi Toby,
I’d like to ask you regarding the OS and supervisor version. They are kind of older versions. Is there any particular reason you don’t upgrade to a newer version?
Moreover, it would be great if you could share with us the output of the balena push saved at a log.txt file.

Georgia

Hi Georgia,

We are using a generic x86_64 with the most recent balenaOS 2.58.6+rev1 at least this is the highest version selectable when we select ‘Add device’. Furthermore I am not aware of any method to update the supervisor version.

Next time I encounter this issue I’ll make sure to make a log and share it here.

Kind regards,
Toby

Hi,

Thanks for the details here. Do share the logs if you come across this issue again. In the meantime, following is the process to force update supervisor:

curl -X POST --header "Content-Type:application/json" \
    --header "Authorization: Bearer <auth token>" \
    --data '{"uuid": <uuid>, "data": {"force": true}}' \
    "https://api.balena-cloud.com/supervisor/v1/update"