From 1df3c907bcd1661022ebb9efafbb45d172cd1913 Mon Sep 17 00:00:00 2001 From: Dayuan Date: Tue, 11 Jun 2024 20:13:16 +0800 Subject: [PATCH] fix: reset $kusion.path ref to the original value when replace faild in the preview (#1155) --- pkg/engine/operation/graph/resource_node.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/engine/operation/graph/resource_node.go b/pkg/engine/operation/graph/resource_node.go index 94481916..f65cf21a 100644 --- a/pkg/engine/operation/graph/resource_node.go +++ b/pkg/engine/operation/graph/resource_node.go @@ -342,6 +342,9 @@ var implicitReplaceFun = func( msg := fmt.Sprintf("can't find specified value in resource:%s by ref:%s", key, refPath) return reflect.Value{}, v1.NewErrorStatusWithMsg(v1.IllegalManifest, msg) } else { + log.Infof("can't find specified value in resource:%s by ref:%s with force equals false", key, refPath) + // reset to the original ref value + valueMap = ImplicitRefPrefix + refPath break } }