Skip to content

Commit

Permalink
cli: Fix a panic in deployment status when scheduling is slow
Browse files Browse the repository at this point in the history
If a deployment fails, the `deployment status` command can get a nil deployment
when it checks for a rollback deployment if there isn't one (or at least not one
at the time of the query). Fix the panic.
  • Loading branch information
tgross committed Feb 1, 2023
1 parent e4e4dc1 commit 6963142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command/deployment_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ UPDATE:
// TODO We may want to find a more robust way of waiting for rollbacks to launch instead of
// just sleeping for 1 sec. If scheduling is slow, this will break update here instead of
// waiting for the (eventual) rollback
if rollback.ID == deploy.ID {
if rollback == nil || rollback.ID == deploy.ID {
break UPDATE
}

Expand Down

0 comments on commit 6963142

Please sign in to comment.