Skip to content

models.device.getOsVersion - Do not append variant for unified OS versions #1318

@mtoman

Description

@mtoman

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

  1. Provision a RPi4 with balenaOS 2.95.8
  2. balena.models.device.getOsVersion(uuid) returns 2.95.8+prod

Specifications

  • SDK version: 16.38.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions