balena-io-modules / balena-preload

Script for preloading containers onto balena device images
https://www.balena.io/
Apache License 2.0
35 stars 8 forks source link

Append to existing apps.json preload state instead of overwriting #242

Open alexgg opened 3 years ago

alexgg commented 3 years ago

This is to remain in draft state until the v3 target state API changes are merged


If the image we are preloading to contains an existing apps.json append the preloaded app to it instead of overwriting it.

Fixes balena-io/balena-cli#2262

Relates to balena-io/balena-cli#2263

Change-type: patch Signed-off-by: Alex Gonzalez alexg@balena.io


Tested on a raspberrypi4-64-2.75.0+rev1 image that does not contain a preloaded apps.json, and on a genericx86-64-ext development build with an existing apps.json with preloaded state.

alexgg commented 3 years ago

Validation on a devenv with a draft v3 state endpoint:

[x] Preloading on an image with preloaded apps.json with a v3 state supervisor