Latest commit not deploying


#22

There you have it.
**"should_track_latest_release"** **:** false **,**

Could the open balena update have changed the value?


#23

I am quite sure that it wouldn’t be able to do this… :confused:

If you PATCH that value to true via the API and deploy again, I think it should uplift the device. Give this a go and let me know if that solves it.

I will direct some people at this thread though because that is some really unusual and unseen behaviour. Are you certain this isn’t something you might have done? Could you possibly detail all the steps you took to get this application created, in case it is a side-effect of something else?

Thanks.


#24

I think I know why this happened… you mentioned that you preload these devices? Preloading disables the application from tracking the latest release for a given application. So if you used the preload operation then it will have been this that set the flag to false.

Can you confirm this theory?

Thanks.


#25

Yes. I created a preloaded image for this app.

At one point the cli preload command asked if automatic updates should be turned off (don’t remember the exact phrasing). The CLI does not ask this anymore, but it is possible that is what changed the value.

Is this the right behaviour though?

Seems there are two things should_track_latest_release should consider.

  1. Actually deploying to devices.
  2. What commit is marked as latest.

We got in a situation where a preloaded image with the latest commit was pulling a previous commit once connected.


#26

Confirmed. Setting the value to true and redeploying syncs everything up again. Problem solved. Thank you @richbayliss!

curl -X PATCH \
"https://api.<URL>/v5/application?$filter=app_name%20eq%20%27<APP-NAME>%27" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
--data '{
  "should_track_latest_release": true
}'

#27

Awesome. I am glad we have gotten to the bottom of it at least :+1:

The question around preload behaviour; I think you must have declined to let the application receive updates, because looking at the preload options you can pin just a single device to a release/commit which is probably what you’re after.

This would mean any devices set to track, will get updated as expected - but preloaded devices will stay pinned to the release you shipped them on until you PATCH them to behave otherwise.