Skip to content

Commit

Permalink
Merge pull request #2678 from superfly/bugfix/dont-wait-for-standby-m…
Browse files Browse the repository at this point in the history
…achines

`fly deploy`: don't wait for standby machines
  • Loading branch information
matttpt committed Aug 9, 2023
2 parents 225138c + 6b2cbde commit 8946b50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/command/deploy/machines_deploymachinesapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,6 @@ func (md *machineDeployment) waitForMachine(ctx context.Context, lm machine.Leas
return nil
}

if !md.skipHealthChecks {
if err := lm.WaitForState(ctx, api.MachineStateStarted, md.waitTimeout, indexStr, false); err != nil {
err = suggestChangeWaitTimeout(err, "wait-timeout")
return err
}
}

// Don't wait for Standby machines, they are updated but not started
if len(lm.Machine().Config.Standbys) > 0 {
md.logClearLinesAbove(1)
Expand All @@ -293,6 +286,13 @@ func (md *machineDeployment) waitForMachine(ctx context.Context, lm machine.Leas
return nil
}

if !md.skipHealthChecks {
if err := lm.WaitForState(ctx, api.MachineStateStarted, md.waitTimeout, indexStr, false); err != nil {
err = suggestChangeWaitTimeout(err, "wait-timeout")
return err
}
}

if err := md.doSmokeChecks(ctx, lm, indexStr); err != nil {
return err
}
Expand Down

0 comments on commit 8946b50

Please sign in to comment.