hawkbit icon indicating copy to clipboard operation
hawkbit copied to clipboard

Unnecessary CANCEL_DOWNLOAD event over DMF Api

Open mwilniewiec opened this issue 6 years ago • 1 comments

How to reproduce:

  1. Prepare 3 OS only distributions with SW Modules
  2. Create a DMF Api target
  3. Upgrade target with Distribution 1 (Device gets DOWNLOAD_AND_INSTALL event, action = 1)
  4. Upgrade target with Distribution 2 (Device gets CANCEL_DOWNLOAD, action = 1 which is OK)
  5. Upgrade target with Distribution 3 (Device gets CANCEL_DOWNLOAD, action = 2 which is NOK)

At this point device has no idea about action 2 so canceling it makes no sense. Hawkbit could automatically cancel action 2 and send DOWNLOAD_AND_INSTALL Dist 3 just after confirming or canceling action 1 by the device.

mwilniewiec avatar Dec 10 '18 22:12 mwilniewiec

Indeed you're totally right. The 2nd assignment for Distribution 2 is never seen by the client in your setup with 3 (or more) assignments in a row. So there is definitely room for improvement in order to avoid the superfluous message.

There is a feature called "Action auto-closing" which closes canceled actions automatically. If this setting is enabled no CANCEL_DOWNLOAD messages are send at all. Maybe this is of any help for you in the meanwhile

schabdo avatar Feb 28 '19 16:02 schabdo