balena-supervisor icon indicating copy to clipboard operation
balena-supervisor copied to clipboard

Should return release `raw_version` where possible if returning `commit`

Open myarmolinsky opened this issue 2 years ago • 6 comments
trafficstars

i.e. https://github.com/balena-os/balena-supervisor/blob/e36060aa293f4a0b7d5d41ddb353c3bcccc110a4/src/device-api/v2.ts#L157 (if possible)

Forums thread: https://jel.ly.fish/support-thread-discourse-367420 Zulip thread: https://balena.zulipchat.com/#narrow/stream/346010-channel.2Fsupport/topic/curl.20supervisor.20endpoint.20with.20params

myarmolinsky avatar Apr 14 '23 14:04 myarmolinsky

[myarmolinsky] This has attached https://jel.ly.fish/f7466cce-927a-42dd-a31c-e4957ddd6a86

jellyfish-bot avatar Apr 14 '23 14:04 jellyfish-bot

This requires an API change first, as the supervisor does not receive the version information via the target state

pipex avatar Apr 20 '23 20:04 pipex

Another customer requested this, specifically getting release semvar from Supervisor API. See https://balena.zulipchat.com/#narrow/stream/345882-_help/topic/get.20release.20semvar.20from.20Supervisor.20API.3F

rosswesleyporter avatar Aug 11 '23 22:08 rosswesleyporter

Also requesting this.

The thread on the forum suggests using the web API, but we need this during a runtime startup process. If we can get the information from the device itself rather than potentially derailing our startup process because a web API isn't responding, it would be a lot better for us.

bbugh avatar Mar 16 '24 15:03 bbugh

It looks like calling the web API also requires including the API token on the devices, but our devices are on-site for the customers. Including a web API token opens us up to security issues we'd rather not deal with.

bbugh avatar Mar 16 '24 15:03 bbugh

@bbugh regarding security. Using the io.balena.features.balena-api feature label will give a service access to the device API key, which is what the supervisor uses to communicate to the API and has read-only permissions to the release entity.

pipex avatar Mar 16 '24 20:03 pipex