From 1fc657abb279d041001c9e73af376bfa113c53f1 Mon Sep 17 00:00:00 2001 From: sriharsh Date: Thu, 12 Dec 2024 20:33:12 +0530 Subject: [PATCH] fix for sporadic porch crash during new package revision --- .../controllers/packagevariant/packagevariant_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go b/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go index 13725dad..3fccef8d 100644 --- a/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go +++ b/controllers/packagevariants/pkg/controllers/packagevariant/packagevariant_controller.go @@ -597,12 +597,12 @@ func (r *PackageVariantReconciler) deletePackageRevision(ctx context.Context, pr // determine if the downstream PR needs to be updated func (r *PackageVariantReconciler) isUpToDate(pv *api.PackageVariant, downstream *porchapi.PackageRevision) bool { if downstream.Status.UpstreamLock == nil { - klog.Warningf("status.upstreamLock is nil for PackageRevision %s.", pv.ObjectMeta.Name) + klog.Warningf("status.upstreamLock field is empty/missing in downstream PackageRevision: %s", pv.ObjectMeta.Name) return true } upstreamLock := downstream.Status.UpstreamLock if upstreamLock.Git == nil || upstreamLock.Git.Ref == "" { - klog.Warningf("status.upstreamLock.git or status.upstreamLock.git.ref is nil for PackageRevision %s.", pv.ObjectMeta.Name) + klog.Warningf("status.upstreamLock.git or status.upstreamLock.git.ref field is empty/missing in downstream PackageRevision: %s", pv.ObjectMeta.Name) return true } lastIndex := strings.LastIndex(upstreamLock.Git.Ref, "/")