hashicorp / terraform-plugin-go

A low-level Go binding for the Terraform protocol for integrations to be built on top of.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MsgPack encoding issue after upgrading to v0.5.0

alexsomesan opened this issue · comments

terraform-plugin-go version

v0.5.0

Relevant provider source code

// insert code here

Terraform Configuration Files

# insert config here

Expected Behavior

Provider should work the same as with versions of terraform-plugin-go prior to v0.5.0

Actual Behavior

Error: ["manifest"]: msgpack: invalid code=84 decoding array length

Steps to Reproduce

Build the Kuberentes provider from the update-sdk branch and setup dev overrides for the binary.

Run terraform plan in any of the examples for the kubernetes_manifest resource.

The issue arises in the Terraform process on the return path from PlanResourceChange when decoding the response value. The issue is present even if no manipulation of the proposed plan is done in the provider (simply looping back the proposed plan).

References

Thanks for filing this, @alexsomesan! This certainly feels like a regression. Just noting that #107 would definitely help with troubleshooting here.

If I recall from before the end of year break, we saw that msgpack code 84 represents a fixmap (if I'm understanding correctly, with 2 objects) according to the specification. Since manifest is a tftypes.DynamicPseudoType, there could be some oddities with that type of data due to its special implementation. Off the cuff, It could be something like the types used to create values are mismatched somehow.

Is spinning up a bare bones EKS cluster good enough for executing those examples or is there further testing setup necessary?

@alexsomesan if you could give #135 a try with the TF_LOG_SDK_PROTO_DATA_DIR environment variable set and show the msgpack2json output from the relevant PlanResourceChange request and responses, that would be amazing. Thank you. 😄

v0.6.0 was just released 👍