Skip to content

Commit 7264c24

Browse files
committed
add a comment
1 parent 0b4f5e2 commit 7264c24

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

bundle/direct/bundle_plan.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ func shouldUpdateOrRecreate(cfg *dresources.ResourceLifecycleConfig, pathString
434434
return deployplan.Undefined
435435
}
436436

437+
// Empty slices and maps cannot be represented in proto and because of that they cannot be represented
438+
// by SDK's JSON encoder. However, they can be provided by users in the config and can be represented in
439+
// Bundle struct (currently libs/structs and libs/dyn use ForceSendFields for maps and slices, unlike SDK).
440+
// Thus we get permanent drift because we see that new config is [] but in the state it is omitted.
437441
func isEmptySlice(values ...any) bool {
438442
for _, v := range values {
439443
if v == nil {

0 commit comments

Comments
 (0)