preloaded image not correctly pinned

I am generating preloaded images that I want pinned when my devices are flashed.
I’m using balena preload $IMG --fleet ABC --commit $COMMIT_HASH --pin-device-to-release

my device is flashed ok, then I power cycle it and it shows in balena. The problem is that the Target Release is not pinned, but rather set to track latest.

If I let it complete the upgrade to the latest, once complete it will then properly pin to the version I had in the preloaded image and downgrade again, which is a huge loss of time

If I power cycle it as soon as it comes online in balena, then when it connects again, the device is pinned proprely, but this is not practical because I would have to time the right moment to power cycle my device, which is an horrible way of doing this.

what is going on? why does the preload + pin work as soon as the device is flashed??

Hi @procopiostein ,

When preloading an image and with the --pin-device-to-release flag, that instructs the device’s supervisor to pin the device to the target release right away after it gets registered, so what you are describing sounds surprising:

Let me clarify though that the command that you shared is not supposed to change the fleet’s target release (which applies to all non-pinned devices of it).
It’s only the target release of the devices that get provisioned using the preloaded image that get pinned to that release. Normally you devices registered with a preloaded & auto-pinned devices should show a pin icon next to their target release label in the device’s summary page.
Can you confirm whether you see that on your side?
Here is a screenshot from our docs on what it should look like:

Can you please share the balena-cli version along with the device type and the balenaOS version that you are using so that we can try to replicate this one our side?

Kind regards,
Thodoris