Open myarmolinsky opened 1 year ago
[myarmolinsky] This has attached https://jel.ly.fish/f7466cce-927a-42dd-a31c-e4957ddd6a86
This requires an API change first, as the supervisor does not receive the version information via the target state
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
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.
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 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.
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