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

App restart via API does not respect service dependency in `depends_on`

Open pipex opened this issue 2 years ago • 1 comments
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 avatar Jul 04 '23 22:07 pipex

[pipex] This has attached https://jel.ly.fish/4f492090-44a9-44c8-bea8-0028f16f6599

jellyfish-bot avatar Jul 04 '23 22:07 jellyfish-bot