thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
222 stars 55 forks source link

Support special `latest` version in apt plugin #1594

Closed reubenmiller closed 1 year ago

reubenmiller commented 1 year ago

Is your feature improvement request related to a problem? Please describe. When installing software via the tedge-apt-plugin, I mostly want to install the latest version of the software. In the Cumulocity Device Management application, the UI forces the user to select a version to be able to install the software package.

This means that the user always has to go through the list of software version to check which is the latest version and this is tedious and erroneous. It also makes any kind of automation much more difficult.

Describe the solution you'd like

Allow a special value latest to be used for the version value and it will instruct the tedge-apt-plugin to install the latest available version (equivalent to apt-get install mypackage instead of apt-get install mypackage=1.0.0)

Describe alternatives you've considered Allow an empty version field when creation the software operation, however this would require a change in the Cumulocity Device Management UI and an empty version value is not as logical for the users to understand what it represents.

Additional context

An example showing the user being able to select a special latest version from the software version list.

image
mjj29 commented 1 year ago

Yes, this seems like what I was wanting

albinsuresh commented 1 year ago

This functionality exists already as you can just skip the version prefix in the expected version format <version>::<type> as in ::apt which is interpreted by the apt plugin as the latest version. But still, I agree that something explicit like latest would make it clearer.

cmosd commented 1 year ago

how to test

This PR allows the user to install the latest version of package from the c8y UI, by specifying latest in the version name.


NOTE the last field is not empty, but contains an empty space ' '