Skip to content

Commit

Permalink
fix: Fix NPE in stacktrace (#1172)
Browse files Browse the repository at this point in the history
## Description:
<!-- Describe this change, how it works, and the motivation behind it.
-->

## Is this change user facing?
NO
<!-- If yes, please add the "user facing" label to the PR -->
<!-- If yes, don't forget to include docs changes where relevant -->

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->
  • Loading branch information
Guillaume Bouvignies committed Aug 28, 2023
1 parent 68dd5a0 commit 32770ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cli/cli/helpers/engine_manager/engine_manager.go
Expand Up @@ -453,15 +453,18 @@ func getKurtosisConfig() (*resolved_config.KurtosisConfig, error) {
}

func (manager *EngineManager) waitUntilEngineStoppedOrError(ctx context.Context) error {
var err error
var status EngineStatus
var err error
for i := 0; i < waitUntilEngineStoppedTries; i += 1 {
status, _, _, err = manager.GetEngineStatus(ctx)
if err != nil {
return stacktrace.Propagate(err, "An error occurred checking the status of the engine")
}
if status == EngineStatus_Stopped {
return nil
}
logrus.Debugf("Waiting engine to report stopped, currently reporting '%v'", status)
time.Sleep(waitUntilEngineStoppedCoolOff)
}
return stacktrace.Propagate(err, "Engine did not report stopped status, last status reported was '%v'", status)
return stacktrace.NewError("Engine did not report stopped status, last status reported was '%v'", status)
}

0 comments on commit 32770ca

Please sign in to comment.