Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go.mod: go get github.com/zclconf/go-cty@v1.11.0 #31675

Merged
merged 1 commit into from Aug 22, 2022
Merged

Conversation

apparentlymart
Copy link
Member

This fixes a possible panic in what Terraform calls the "flatten" function in situations where a user passes in a null value of a sequence type. The function will now treat that the same as a null value of any other type.

This also includes some other changes that would benefit Terraform:

  • cty: Improved performance when comparing nonzero numbers to zero, by performing a relatively-cheap sign check on both numbers before falling back on the more expensive general equality implementation. (#125)
  • convert: Unify will no longer panic when asked to find a common base type for a tuple type and a list of unknown element type, and will instead just signal that such a unification is not possible. (#126)

Also notable is that this new release of cty now requires Go 1.18 or later. That's okay for backport into Terraform v1.2, since that release already uses Go 1.18, but this would not be backportable to older Terraform CLI releases. Our backport policy doesn't typically require us to go back further than one minor release anyway (aside from exceptional cases such as security advisories) and so I think this is a moot point, but I mention it for completeness.

Fixes #31376.

@apparentlymart apparentlymart added bug config 1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged labels Aug 22, 2022
@apparentlymart apparentlymart requested a review from a team August 22, 2022 17:16
@apparentlymart apparentlymart self-assigned this Aug 22, 2022
This fixes a possible panic in what Terraform calls the "flatten" function
in situations where a user passes in a null value of a sequence type.
The function will now treat that the same as a null value of any other
type.
@apparentlymart apparentlymart merged commit a6de221 into main Aug 22, 2022
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link

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 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged bug config
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic in flatten() function
2 participants