Skip to content

Supervisor reverts to the first locally pushed version when restarted in local mode #2367

@pipex

Description

@pipex

Replication

  • Download https://github.com/balena-io-examples/balena-nodejs-hello-world
  • Start a local livepush session balena push , wait for the device to settle
  • Stop the livepush session, and make a small code change
  • Start a new live push, check that your changes are applied. You'll also see the image id change
  • Restart the supervisor, the supervisor will log something like this
Aug 27 18:31:50 68568ed balena-supervisor[10222]: [debug]   Replacing container for service balena-hello-world because of config changes:
Aug 27 18:31:50 68568ed balena-supervisor[10222]: [debug]     Non-array fields:  {"added":{},"deleted":{},"updated":{"image":"sha256:dda4ef12f2dd49f1d7a8c7fa2f2ca35a132a43c65380893737a531a80ea9027b"}}
Aug 27 18:31:50 68568ed balena-supervisor[10222]: [debug]   Replacing container for service balena-hello-world because of config changes:
Aug 27 18:31:50 68568ed balena-supervisor[10222]: [debug]     Non-array fields:  {"added":{},"deleted":{},"updated":{"image":"sha256:dda4ef12f2dd49f1d7a8c7fa2f2ca35a132a43c65380893737a531a80ea9027b"}}

The problem is that the supervisor only generates a saveImage step if the image tag does not exist in the database, we need to compare that the image exists on the database with the same docker id and tag here

function saveAndRemoveImages(

This does not affect cloud releases because a change always results in a new image tag, while in local releases, the image tag is re-used for every push

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions