We removed the variant from the OS version string since meta-balena 2.85.0, however the change was not picked by all device types immediately so it is not safe to assume if version > 2.85.0: do_not_append_variant. We could maybe check that the built OS version string is valid before returning it.
Expected Behavior
models.device.getOsVersion does not append the variant if the actual OS version string does not include it.
Actual Behavior
The variant is appended blindly and returns e.g. 2.95.8+prod even though the actual OS version is 2.95.8.
Steps to Reproduce the Problem
- Provision a RPi4 with balenaOS 2.95.8
balena.models.device.getOsVersion(uuid) returns 2.95.8+prod
Specifications