Skip to content

Commit

Permalink
Add more logging to help debug random panic for buildplans that resul…
Browse files Browse the repository at this point in the history
…t in nil environment definitions.
  • Loading branch information
mitchell-as committed Oct 26, 2023
1 parent 0d01e1a commit ba33bce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/platform/runtime/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ func (s *Store) updateEnviron(orderedArtifacts []artifact.ArtifactID, artifacts
}
}

if rtGlobal == nil {
// Returning nil will end up causing a nil-pointer-exception panic in setup.Update().
// There is additional logging of the buildplan there that may help diagnose why this is happening.
logging.Error("There were artifacts returned, but none of them ended up being stored/installed.")
logging.Error("Artifacts returned: %v", orderedArtifacts)
logging.Error("Artifacts stored: %v", artifacts)
}

return rtGlobal, nil
}

Expand Down

0 comments on commit ba33bce

Please sign in to comment.