joelguittet / mender-mcu-client

Mender client for MCU, just because it's cool to have it
Apache License 2.0
34 stars 6 forks source link

inventory: no "current software" version displayed on mender interface #69

Closed joelguittet closed 1 month ago

joelguittet commented 1 month ago

Probably due to some enhancements of mender, the "Current software" version is no more displayed on the Devices tab of the mender interface. See screenshot below.

image

The update of deployment api at #68 was intended to fix this, but it's not enough. This issue need to be analyzed.

lluiscampos commented 1 month ago

@joelguittet The "Current software" information shown by the UI, both here in the devices table but also in the "Software" tab for the device pane (click on any device), is coming from the inventory.

Previously this was the "artifact_name", but this changed long time ago - I cannot tell exactly but for sure not in the last months.

Anyway, if you want to see here the information that you used to have, you can submit an inventory key value like "rootfs-image.version=something".

You were not that far off when suspecting the "provides" feature. For the Linux client, by default we ship an inventory script that calls "mender-update show-provides" (see source here). So in effect it is the same information but it is not saved from the deployments/next API call but submitted separately.

To experiment with this, I recommend that you just spin up a demo server with a virtual client (clone this repo, then ./demo --client up) and modify the inventory script to see how the UI will behave. Then you can implement the desired changes in the MCU client :+1:

When implementing this, feel free to ping me in the PR :smiley:

joelguittet commented 1 month ago

@lluiscampos thanks so much for all those details! I just tested a bit this, with rootfs-image.version I'm able to display the software version. I see rootfs-image.checksum can also be used. For the moment I will simply ensure the display is correct so duplicating the information from the artifact_name value in the mender MCU client. I see my RaspberryPi device have rootfs-image.version = artifact_name. Pull Request will be opened quickly, and thanks for your help on this topic :-) I really appreciate.

joelguittet commented 1 month ago

Fixed with #72