Skip to content

Empty nested attribute handling in diffs#29398

Merged
jbardin merged 2 commits intomainfrom
jbardin/diff-nested-attrs
Aug 17, 2021
Merged

Empty nested attribute handling in diffs#29398
jbardin merged 2 commits intomainfrom
jbardin/diff-nested-attrs

Conversation

@jbardin
Copy link
Copy Markdown
Member

@jbardin jbardin commented Aug 17, 2021

Better handling of null and empty containers when rendering a diff of nested attribute object types.
Empty containers can be rendered as single attributes to avoid the need to differentiate between empty and null in the element handling. Null containers were not handled at all, because the old block formatting would never nee null values.

Fixes #29382
Fixes #29385

Don't try to break down containers that are empty to render the diff, so
we can avoid having to check for empty vs null in all cases.
@jbardin jbardin requested a review from a team August 17, 2021 14:13
@jbardin jbardin added the 1.0-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Aug 17, 2021
@jbardin jbardin merged commit bd8cae3 into main Aug 17, 2021
@jbardin jbardin deleted the jbardin/diff-nested-attrs branch August 17, 2021 15:51
@github-actions
Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

1.0-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terraform crash when planning a new resource containing a set of objects Terraform crash planning a diff between Null and empty Sets

2 participants