Compose is waiting for all services at a given "wave" to deploy before moving on
I've got a monorepo with 6 stacks; for ease of labelling let's call them A-F. In this scenario, consider the following dependency layout:
- B-F all depend on A
- D depends on B
- E depends on C
In this scenario, my services are being deployed in three "waves", which are starting in the proper order:
- A is deployed
- Upon completion of A, the deployments for B, C, and F begin
- Upon completion of B, C, and F, the deployments for D and E begin
In my scenario, F takes longer to deploy than B and C, but D and E are both waiting for F to complete before starting.
I'm not sure how much of a pain this would be on the implementation side, but would it be possible for a dependent service to start deploying immediately once the last dependency has completed instead of waiting for the entire wave to finish first?
Thanks for opening this issue, this is indeed something I noticed before, and we could improve it as it could accelerate some deployments.
@pgrzesik AFAICT this will not be a quick fix as it involves refactoring the building of the graph (inherited from Components).
Hey @ROSeaboyer - thanks a lot for reporting 👍 That's correct, at the moment the execution of dependency graph is done in such "waves" and it definitely can be improved, but as @mnapoli mention it might not end up being a quick fix but it's definitely something that we want to do 👍
That's fair; I tried taking a look over the weekend to see if I could figure it out quickly and try to give back, but in the limited time I had, I couldn't easily figure out a way to do it that wouldn't result in a gross mess of spaghetti code
Hey @ROSeaboyer - thanks for trying to improve it 🙇 I was thinking about this as well and I believe I have a reasonable approach that shouldn't be too hard to implement - I'm hoping to find some time this week to tackle it