From ba33bce11ce4976aac01410bd3bff4c5bea55a9c Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 26 Oct 2023 15:17:06 -0400 Subject: [PATCH] Add more logging to help debug random panic for buildplans that result in nil environment definitions. --- pkg/platform/runtime/store/store.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/platform/runtime/store/store.go b/pkg/platform/runtime/store/store.go index 3239f3e990..448e28970d 100644 --- a/pkg/platform/runtime/store/store.go +++ b/pkg/platform/runtime/store/store.go @@ -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 }