Skip to content

Strip optional metadata from empty default collections#568

Merged
liamcervante merged 2 commits intohashicorp:mainfrom
liamcervante:terraform/32152
Nov 9, 2022
Merged

Strip optional metadata from empty default collections#568
liamcervante merged 2 commits intohashicorp:mainfrom
liamcervante:terraform/32152

Conversation

@liamcervante
Copy link
Copy Markdown

@liamcervante liamcervante commented Nov 4, 2022

Previously, in the example test cases the empty default collection would be returned with the optional metadata embedded even though the default value should be a concrete value. This was fixed in the latest release of go-cty, and so was fixed here by pulling the latest go-cty.

Proposed Changelog Update

Bugs Fixed

  • ext/typeexpr: Ensure default values do not have optional metadata attached. This prevents crashes when default values are inserted into concrete go-cty values that have also been stripped of their optional metadata.

@liamcervante liamcervante marked this pull request as ready for review November 9, 2022 09:22
@liamcervante liamcervante requested a review from alisdair November 9, 2022 09:22
@liamcervante liamcervante changed the title Add test cases that verify the downstream go-cty fix has worked Strip optional metadata from empty default collections Nov 9, 2022
@liamcervante liamcervante merged commit bcff50c into hashicorp:main Nov 9, 2022
@liamcervante liamcervante deleted the terraform/32152 branch November 9, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants