Skip to content

Commit 3c19eea

Browse files
committed
dont error when constructing diff
1 parent 28eb3e5 commit 3c19eea

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bundle/direct/bundle_plan.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,8 @@ func prepareChanges(ctx context.Context, adapter *dresources.Adapter, localDiff,
349349
// from remoteDiff we can find out remote value (ch.Old) and new config value (ch.New) but we don't know oldState value
350350
oldStateVal, err := structaccess.Get(oldState, ch.Path)
351351
var notFound *structaccess.NotFoundError
352-
if errors.As(err, &notFound) {
353-
oldStateVal = nil
354-
} else if err != nil {
355-
return nil, fmt.Errorf("accessing %q on %T: %w", ch.Path, oldState, err)
352+
if err != nil && !errors.As(err, &notFound) {
353+
log.Debugf(ctx, "Constructing diff: accessing %q on %T: %w", ch.Path, oldState, err)
356354
}
357355
m[ch.Path.String()] = &deployplan.ChangeDesc{
358356
Old: oldStateVal,

0 commit comments

Comments
 (0)