balena-supervisor
balena-supervisor copied to clipboard
App restart via API does not respect service dependency in `depends_on`
trafficstars
The composition service ordering is used when updating between services, but not during service updates. This is due to the supervisor obtaining the services information from the current state, while depends_on only exists in the composition.
https://github.com/balena-os/balena-supervisor/blob/d3f9821895e9f3d4e957f6df795a95a8abdc8cb9/src/device-api/actions.ts#L93-L118
Probably the right approach is to merge the target state with the runtime state to obtain the correct target.
[pipex] This has attached https://jel.ly.fish/4f492090-44a9-44c8-bea8-0028f16f6599