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

Add support for preloading v3 target state format #273

Closed pipex closed 2 years ago

pipex commented 2 years ago

Supervisor v13 and above uses the newer v3 target state endpoint. This updates the preloading mechanism so apps.json is created using this new format for OS images including this newer supervisor.

Change-type: minor

klutchell commented 2 years ago

LGTM. Have you been able to test it locally with a build of the CLI?

You can manually copy these files to the node_modules of a balena-cli clone and build it for testing. Or you can open a draft PR of the CLI and pin to this pre-release of the balena-preload package (balena-preload@12.1.0-preload-v3-02d2264acd2e5ca01bb907d24426c4a3c919839d).

pipex commented 2 years ago

@klutchell I have tested it (using npm-link). I tested with a v2 supervisor and a v3 supervisor. Both preload apps.json correctly, although the latest supervisor had a couple of preload bugs, hence https://github.com/balena-os/balena-supervisor/pull/1944