Skip to content

Commit

Permalink
chore: fix 'timed out waiting for admin console: <nil>'
Browse files Browse the repository at this point in the history
if the timeout is reached but no error happen inside the func lasterr
will be nil but err will have the timeout. on this scenario lasterr
should be the actual timeout error.
  • Loading branch information
ricardomaraschini committed Oct 31, 2023
1 parent 56aee2f commit 78ccafd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/addons/adminconsole/adminconsole.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ func (a *AdminConsole) Outro(ctx context.Context, cli client.Client) error {
loading.Infof("Waiting %v for Admin Console to deploy: %d/3 ready", duration, count)
return count == 3, nil
}); err != nil {
if lasterr == nil {
lasterr = err
}
loading.Close()
return fmt.Errorf("timed out waiting for admin console: %v", lasterr)
return fmt.Errorf("error waiting for admin console: %v", lasterr)
}
loading.Closef("Admin Console is ready!")
a.printSuccessMessage()
Expand Down

0 comments on commit 78ccafd

Please sign in to comment.