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

Release new version with github.com/hashicorp/terraform-plugin-sdk/[email protected]? #185

Closed
ewbankkit opened this issue Sep 7, 2023 · 10 comments
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Milestone

Comments

@ewbankkit
Copy link
Contributor

ewbankkit commented Sep 7, 2023

The Terraform AWS Cloud Control Provider uses terraform-plugin-testing but does not use any of terraform-plugin-sdk directly, instead using terraform-plugin-framework (so dependabot does not pick up terraform-plugin-sdk updates).
After the recent upgrade to github.com/hashicorp/[email protected] acceptance tests fail to compile with

% go test ./...
?   	github.com/hashicorp/terraform-provider-awscc	[no test files]
# github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema
../../../../go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/provider.go:511:9: cannot use NewGRPCProviderServer(p) (value of type *GRPCProviderServer) as tfprotov5.ProviderServer value in return statement: *GRPCProviderServer does not implement tfprotov5.ProviderServer (missing method GetMetadata)
FAIL	github.com/hashicorp/terraform-provider-awscc/internal/aws/accessanalyzer [build failed]
...

I can workaround by explicitly running go get github.com/hashicorp/terraform-plugin-sdk/[email protected], but other providers may hit the same problem.

@ewbankkit ewbankkit added the bug Something isn't working label Sep 7, 2023
@bflad
Copy link
Contributor

bflad commented Sep 7, 2023

Thank you for this report, @ewbankkit 👍 The tied-together dependency update issue is quite annoying in this case, sorry for the trouble. As you mentioned, updating github.com/hashicorp/terraform-plugin-sdk/[email protected] is the expectation at the moment.

@bflad bflad self-assigned this Sep 7, 2023
@bflad bflad added this to the v1.6.0 milestone Sep 7, 2023
@bflad bflad added the dependencies Pull requests that update a dependency file label Sep 7, 2023
@bflad
Copy link
Contributor

bflad commented Sep 7, 2023

Created #186 for tracking the eventual sdk/v2 dependency removal for this Go module.

@Integralist
Copy link

@ewbankkit life saver! thank you 🙂

I came back to an old project using the new plugin framework and decided to update all the dependencies and discovered this same error. As suggested, running go get github.com/hashicorp/terraform-plugin-sdk/[email protected] sorted it 👍🏻

hanneshayashi added a commit to hanneshayashi/terraform-provider-gdrive that referenced this issue Oct 30, 2023
hanneshayashi added a commit to hanneshayashi/terraform-provider-gdrive that referenced this issue Oct 30, 2023
* fix deprecation in release.yml

* fix typo

* update Go version and dependencies

* update GH actions

* Workaround for hashicorp/terraform-plugin-testing#185
@Bischoff
Copy link

Same here. I maintain a plugin for both protocol v5 and protocol v6 and I am hitting the issue when I use the new plugin framework.

mzottola added a commit to Qovery/terraform-provider-qovery that referenced this issue Nov 20, 2023
mzottola added a commit to Qovery/terraform-provider-qovery that referenced this issue Nov 20, 2023
mzottola added a commit to Qovery/terraform-provider-qovery that referenced this issue Nov 20, 2023
@bschaatsbergen
Copy link
Member

bschaatsbergen commented Dec 1, 2023

Hitting the same problem after scaffolding a new provider from the https://github.com/hashicorp/terraform-provider-scaffolding-framework repository - as Kit outlined, running go get github.com/hashicorp/terraform-plugin-sdk/[email protected] works.

@bflad
Copy link
Contributor

bflad commented Dec 1, 2023

Thanks for the heads up about that, @bschaatsbergen -- will try to resolve that specifically. I believe we'll be cutting a terraform-plugin-testing v1.6.0 release next week which should close out this issue as well.

@bschaatsbergen
Copy link
Member

Thanks for the heads up about that, @bschaatsbergen -- will try to resolve that specifically. I believe we'll be cutting a terraform-plugin-testing v1.6.0 release next week which should close out this issue as well.

Awesome! If I can help with anything please let me know :)

@bflad
Copy link
Contributor

bflad commented Dec 1, 2023

Ah, so hashicorp/terraform-provider-scaffolding-framework#172 should have covered upgrading the sdk version for new clones of the template, but yeah, if it was cloned before then and dependencies were updated afterwards, then you could hit this situation. Anyways, should be resolved next week by releasing this Go module with the upgraded sdk dependency.

@bflad
Copy link
Contributor

bflad commented Dec 4, 2023

v1.6.0 has been released. Thank you for the reports and patience.

Copy link

github-actions bot commented Jan 4, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

5 participants