Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should extend os.getAvailableOsVersions() & os.isSupportedOsUpgrade() to support ESR #1302

Open
alexgg opened this issue Feb 14, 2023 · 3 comments

Comments

@alexgg
Copy link

alexgg commented Feb 14, 2023

Expected Behavior

The isSupportedOsUpdate and getSupportedOsUpdateVersions should support ESR versions directly.

Instead of having to do :
sdk.models.os.isSupportedOsUpgrade('raspberry-pi', device.os_version, targetOsRelease.basedOnVersion)
Just do:
sdk.models.os.isSupportedOsUpgrade('raspberry-pi', device.os_version, targetESRversion)

Actual Behavior

Currently to perform an ESR update we need to:

  1. Get all versions with sdk.models.os.getAvailableOsVersions('raspberrypi3') and filter out the required ESR version. For example for 2023.1.0 we get:
{
    "id": 2441888,
    "known_issue_list": null,
    "raw_version": "2023.1.0",
    "phase": null,
    "osType": "esr",
    "line": "next",
    "strippedVersion": "2023.1.0",
    "rawVersion": "2023.1.0",
    "basedOnVersion": "v2.107.40",
    "formattedVersion": "v2023.1.0 (next, recommended)",
    "isRecommended": true
}
  1. Check whether it is a valid version to update to with sdk.models.os.isSupportedOsUpgrade('raspberry-pi', device.os_version, targetOsRelease.basedOnVersion), for example sdk.models.os.isSupportedOsUpgrade('raspberry-pi', 'v2.95.0' , 'v2.107.40')

  2. And then trigger the update with sdk.models.device.startOsUpdate('7cf02a687b74206f92cb455969cf8e98', '2023.1.0')

References

https://balena.zulipchat.com/#narrow/stream/345882-_help/topic/Get.20balena.20ESR.20balenaOs.20version.20from.20the.20SDKs
https://jel.ly.fish/support-thread-1-0-0-front-cnv-dq6tkct

@jellyfish-bot
Copy link

[alexgg] This has attached https://jel.ly.fish/c47c7880-afd1-481e-9812-af113d46857d

@thgreasi thgreasi changed the title Extend OS update methods for ESR Should extend os.getAvailableOsVersions() & os.isSupportedOsUpgrade() to support ESR Feb 14, 2023
@jellyfish-bot
Copy link

[phil-d-wilson] This has attached https://jel.ly.fish/25bc98d3-6fd4-4864-b7ce-849726a34523

@phil-d-wilson
Copy link

I've attached the above support thread, since this also means that the CLI cannot update an ESR device, since the command passes in the current OS Version and sdk.models.os.getAvailableOsVersions returns undefined when an ESR version is passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants