I’m currently working on some prototyping using Balena for application updates on devices and trying to properly understand how delta updates work, with a view to keeping them small since we have devices that will be pulling updates over low quality mobile connections.
I’ve got a multi-stage Docker build, with the first stage using the build variant of your Python image, and the final stage using the run variant. The run stage copies a Python virtual env containing our PIP dependencies and the application source code from the build stage.
My confusion is coming from a couple of places. Firstly the Balena builder is reporting a delta of 544.62KB when I change a single line in one of the application’s source files, where I’d expect a significantly smaller delta. Its possible the build process is seeing a fresh install of PIP packages/wheels as being a change, but they should be stable from a binary perspective since its just downloading the same files.
The second confusion stems from poking images on an actual device - the latest
and delta-${HASH}
tagged images are both showing as being 1.06GB. Is there something happening locally that would result in that? During update downloads it also feels like the time it takes indicates a much bigger download than 500KB, but I have nothing but gut feel to back that.
Is there anything I can do inspect what’s causing deltas to be larger than expected, and the validate that devices are in fact downloading only the delta and not a full image?