Commit Graph

10 Commits

Author SHA1 Message Date
Djordje Lukic 1f43b83409 Use a dependency graph to start services
The algorithm is like so:
* get all the leaves of the graph, these are all the service that don't have any dependency
* once a service is started we take the list of its parents (dependents)
* if all the dependencies of each of those dependents are started then we can start it as well
* if not then we continue to the next dependent

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-11-21 22:30:32 +01:00
Nicolas De Loof eeb09d9e80
apply linter recommendations
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-19 17:35:34 +01:00
Nicolas De Loof 7c7e75ca00
Ensure extensions map is not nil (should be set by compose-go)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-19 13:10:55 +01:00
Nicolas De Loof 251c52664a
Implement service_healthy dependency condition
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-19 13:10:55 +01:00
Nicolas De Loof adb62e9080
Run convergence in service dependency order
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-19 13:10:13 +01:00
Guillaume Tardif 9f594abd85 Local compose ls implementation
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-19 09:48:54 +01:00
Guillaume Tardif 51142827e7 Fix linter errors
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-18 17:18:41 +01:00
Nicolas De Loof eb60bbb74f
define const for labels
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-17 15:56:39 +01:00
Nicolas De Loof 2278370ffa
Handle service scale with container numbering
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-17 15:15:27 +01:00
Nicolas De Loof 6346db1d6f
Move reconciliation logic into convergence.go
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-17 11:31:14 +01:00