-
Notifications
You must be signed in to change notification settings - Fork 93
Updated terraform-google-conversion to latest version #85
Updated terraform-google-conversion to latest version #85
Conversation
I haven't seen this yet, so not sure what's causing it. One thing we can try is to get off the dependency on the |
That's good information. Dug a bit deeper and it turns out that since we didn't actually pull in GoogleCloudPlatform/terraform-google-conversion@940fcdf into terraform-validator til now, it seems we never tested that this change didn't break anything in terraform-validator. Since terraform-plugin-sdk and terraform have packages named the same thing, and packages are global AFAIK, you can't have both in the same project or you get errors. We currently use terraform-plugin-sdk in terraform-google-conversion and terraform indirectly from terraform-google-provider. If we want to migrate to terraform-plugin-sdk in terraform-google-conversion, we also have to do it in terraform-google-provider. To fix a few issues in terraform-validator (namely #81 and #52), we need changes to be picked up in terraform-google-conversion, so I propose changing back to use the same module as terraform-google-provider and wait til they migrate to terraform-plugin-sdk. Thoughts? @morgante @slevenick @ndmckinley |
@onetwopunch I think our long term goal is actually to remove dependencies on terraform-google-provider entirely from terraform-validator and terraform-google-conversion. This might be a good opportunity to do that. @danawillow Thoughts?
I'm not sure that's accurate? I'm pretty sure you can import two identically-named packages, so long as you alias them. |
@morgante Interesting that we're thinking of removing that dependency. I think that might solve it as well.
You're absolutely right but the problem is that these packages are invoked by the same name in two dependencies of not terraform-validator itself. I tried replacing references to
Please let me know if I'm missing something with go modules since I don't have a ton of experience using both modules and vendor directories together. |
Agreed that this would be a good opportunity to remove dependencies on TPG, but I'm confused about the actual problem that's occurring, since we don't use github.com/hashicorp/terraform anymore in the provider: https://github.com/terraform-providers/terraform-provider-google/blob/master/go.mod |
@danawillow Thanks for pointing that out, I think we must also have a dated version of the provider. I'll try to update that as well and get back to you. |
@morgante this is ready for re-review. |
@onetwopunch Can you make sure to update the 0.12 file as well? Or we can remove it entirely. See: https://github.com/GoogleCloudPlatform/terraform-validator/blob/master/Makefile#L15 |
Also, the example config isn't working for me:
|
@morgante I fixed the issue with the convert and it still passes tests but I had to add this
I'm not sure why it was removed in 00b0c33 since I don't think there was a PR associated with this commit. Let me know your thoughts on whether this is ok to add back in. CC @yukinying |
The reason that was removed is that terraform-google-conversion should not perform online operation. That was discussed with @danawillow and @chrisst a while ago. It looks like we may have missed patching the resolveImage call by making it error out when an image path provided is not of the form of |
b39de40
to
613c3c7
Compare
@yukinying @morgante Just rebased off Albert's changes in #90 |
Fixes: #81
Enables fix for: #52
terraform-google-conversion
andterraform-provider-google
terraform
toterraform-plugin-sdk
Outdated: Initial ask for assistance
When running integration tests on Docker as well as running
terraform-validator
after a build from my host produces the same panic error:I couldn't find much online about this, except this closed issue that seems to indicate there is a duplicate of the
tfdiags
package somewhere that is breakinggob
encoding since they are named the same but are different.The only two modules that call this package are
terraform
andterraform-plugin-sdk
, both of which have been in use.I also noticed that we have not updated the
terraform-google-conversion
module since Sept 4 where the commit was791ccb94729b
. The git log shows we have 58 commits between then and now:Before I systematically try to determine which commit introduced this error, I was hoping someone who has worked with this tool longer than I might know a place to start of the top of their head.