refactor: postpone spec resolver initialisation when creating Deployment

This commit is contained in:
Pavel Sviderski committed 2025-03-24 21:56:30 +10:00
1 parent 2d923380a3
commit 58b51b974c
10 files changed
+48 -90

No files matched your search

+1 -5
View File
@@ -42,11 +42,7 @@ func (cli *Client) RunService(
}
}
deployment, err := cli.NewDeployment(ctx, spec, &deploy.RollingStrategy{MachineFilter: filter})
if err != nil {
return resp, fmt.Errorf("create deployment: %w", err)
}
deployment := cli.NewDeployment(spec, &deploy.RollingStrategy{MachineFilter: filter})
plan, err := deployment.Plan(ctx)
if err != nil {
return resp, fmt.Errorf("plan deployment: %w", err)