Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pipex opened this issue Aug 27, 2024 · 0 comments

Comments

@pipex
Copy link
Contributor

pipex commented Aug 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant