newPlanExecutor constructs a planExecutor seeded from the observed state. Split out from executePlan so tests can inspect the executor's live state (e.g. the containersByService cache) after running a plan.
(project *types.Project, observed *ObservedState)
| 76 | // Split out from executePlan so tests can inspect the executor's live state |
| 77 | // (e.g. the containersByService cache) after running a plan. |
| 78 | func (s *composeService) newPlanExecutor(project *types.Project, observed *ObservedState) *planExecutor { |
| 79 | return &planExecutor{ |
| 80 | compose: s, |
| 81 | project: project, |
| 82 | pctx: &reconciliationContext{results: map[int]operationResult{}}, |
| 83 | containersByService: observed.containersByService(), |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | // run walks the plan DAG, executing nodes in parallel where possible while |
| 88 | // respecting dependency edges. Emits progress events and handles group-based |