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

tftypes: Allow null DynamicPseudoType in newValue and prevent potential msgpack panic #99

Merged
merged 5 commits into from
Aug 16, 2021

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Aug 10, 2021

Closes #96
Closes #98 (unreleased bug, no CHANGELOG necessary)

@bflad bflad added the bug Something isn't working label Aug 10, 2021
@bflad bflad added this to the v0.4.0 milestone Aug 10, 2021
@bflad bflad requested a review from a team August 10, 2021 19:56
tftypes/primitive.go Outdated Show resolved Hide resolved
@bflad bflad merged commit 49ec606 into main Aug 16, 2021
@bflad bflad deleted the b-msgpack-dpt-NewValue branch August 16, 2021 15:29
bflad added a commit that referenced this pull request Jan 7, 2022
Reference: #94
Reference: #99
Reference: #100
Reference: #128
Reference: #133

Reverts incorrect logic for handling DynamicPseudoType values in `tftypes`. This type information must be preserved when traversing the protocol, as Terraform CLI decodes values based on the schema information. If a concrete value type is used where DynamicPseudoType is expected, Terraform CLI will return errors such as (given an object of 4 attributes, when DynamicPseudoType is expected):

```
│ Error: ["manifest"]: msgpack: invalid code=84 decoding array length
```
bflad added a commit that referenced this pull request Jan 13, 2022
Reference: #94
Reference: #99
Reference: #100
Reference: #128
Reference: #133

Reverts incorrect logic for handling DynamicPseudoType values in `tftypes`. This type information must be preserved when traversing the protocol, as Terraform CLI decodes values based on the schema information. If a concrete value type is used where DynamicPseudoType is expected, Terraform CLI will return errors such as (given an object of 4 attributes, when DynamicPseudoType is expected):

```
│ Error: ["manifest"]: msgpack: invalid code=84 decoding array length
```
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 May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
2 participants