Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/compose/convergence.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ var mu sync.Mutex
// updateProject updates project after service converged, so dependent services relying on `service:xx` can refer to actual containers.
func (c *convergence) updateProject(project *types.Project, service string) {
containers := c.getObservedState(service)
if len(containers) == 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return
}
container := containers[0]

// operation is protected by a Mutex so that we can safely update project.Services while running concurrent convergence on services
Expand Down Expand Up @@ -557,6 +560,9 @@ func (s *composeService) startService(ctx context.Context, project *types.Projec
}

if len(containers) == 0 {
if scale, err := getScale(service); err != nil && scale == 0 {
return nil
}
return fmt.Errorf("no containers to start")
}

Expand Down