fix: preserve empty list vs null for optional list attributes #1
Reference in New Issue
Block a user
Delete Branch "benvin/fix-empty-list-null-inconsistency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
nullfor optional list fields (mutable_patterns,ban_tags, etc.) when the plan had an empty list[]stringsToListnow distinguishesnil(→ null) from[]string{}(→ empty list)preserveListNullEmptySemanticshelper andreconcileOptionalListscalled in Create, Update, and Read to handle the API returning null for empty arraysTest plan
TestPreserveListNullEmptySemanticscovers all four null/empty combinationsTestStringsToList_EmptySliceto verify new empty-list-not-null behaviorterragrunt applyagainst artifactapi3 to confirm no more inconsistent result errors