Hi, I upgrade each month our provider in order to ...
# package-authoring
t
Hi, I upgrade each month our provider in order to sync with our terraform provider Today I wanted to upgrade it without success
Copy code
# upgrade-provider ovh/pulumi-ovh
...
--- Plan Upgrade --- 
  - Planning Bridge Upgrade: v3.99.0 -> v3.101.0
    - git refs of
      - git: /usr/bin/git ls-remote --tags <https://github.com/pulumi/pulumi-terraform-bridge.git>
  - Planning Plugin SDK Upgrade: bridge v3.101.0 needs terraform-plugin-sdk v2.0.0-20240520223432-0c0bf0d65f10
  - Check if we should release a maintenance patch: Last provider release date: 2025-01-06T13:28:57Z
    - gh: /usr/bin/gh repo view ovh/pulumi-ovh --json=latestRelease
  - Planning Plugin Framework Upgrade: Up to date at 0.49.0
    - git refs of
      - git: /usr/bin/git ls-remote --tags <https://github.com/pulumi/pulumi-terraform-bridge>
--- done ---
--- Planning Java Gen Version Update --- 
  - Fetching latest Java Gen
    - Latest Release Version: of pulumi/pulumi-java: 1.0.0
      - gh: /usr/bin/gh repo view pulumi/pulumi-java --json=latestRelease
    - Stat
    - .pulumi-java-gen.version: 5 bytes read
    - Up to date at: 1.0.0
--- done ---
...
--- Tfgen & Build SDKs --- 
  - go: /usr/local/go/bin/go mod tidy
  - go: /usr/local/go/bin/go mod tidy
  - go: /usr/local/go/bin/go mod tidy
 -> make: /usr/bin/make tfgen
--- failed ---
error: exit status 2:
# <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema>
/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240520223432-0c0bf0d65f10/helper/schema/grpc_provider.go:33:34: cannot use (*GRPCProviderServer)(nil) (value of type *GRPCProviderServer) as tfprotov5.ProviderServer value in variable declaration: *GRPCProviderServer does not implement tfprotov5.ProviderServer (missing method CloseEphemeralResource)
/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20240520223432-0c0bf0d65f10/helper/schema/provider.go:526:9: cannot use NewGRPCProviderServer(p) (value of type *GRPCProviderServer) as tfprotov5.ProviderServer value in return statement: *GRPCProviderServer does not implement tfprotov5.ProviderServer (missing method CloseEphemeralResource)
make: *** [Makefile:67: tfgen] Error 1
Do you know how to solve this blocking issue? Thanks
a
Hi Aurelie, sorry you hit this. This is caused by an incompatibility in the terraform-plugin-sdk versions between the terraform and pulumi providers. The terraform provider is using 2.34: https://github.com/ovh/terraform-provider-ovh/blob/d27a93247db8d6307ddc47f9bf40a06c17d97c0b/go.mod#L13 While the pulumi provider is using the pulumi fork of the plugin-sdk, which is still on 2.33. We are in the process of updating it and should have a release today or tomorrow. I'll let you know once we do. Once we release that the fix is to update the plugin-sdk replace statement in the pulumi provider go.mod here: https://github.com/ovh/pulumi-ovh/blob/3b3ffd8a1d6799d3d8c4f0ff823623c01d3d28d9/provider/go.mod#L7
t
Thanks for the answer. Thanks for letting me know when the problem will be solved in order to re try on my side.
About the terraform-plugin-sdk, is it normal that there is no releases? ๐Ÿ™‚
a
Hey @thankful-match-46035, the newest terraform-bridge version contains the correct plugin sdk: https://github.com/pulumi/pulumi-terraform-bridge/releases/tag/v3.102.0 If you use upgrade-provider to upgrade to that it should handle everything else too on its own. Let me know if you are still having trouble here
About the terraform-plugin-sdk, is it normal that there is no releases? ๐Ÿ™‚
This is intentional, yes. The fork is not intended to be consumed as a normal Go module. Providers are expected to have the same go mod replace statement as the bridge. Unfortunately there is no Go tooling to make this process easy but upgrade-provider should handle it.
t
Thanks Venelin I'll test it tomorrow morning (French timezone ๐Ÿ˜‰).
Itโ€™s working, thanks ๐Ÿ™‚ Now Iโ€™m waiting the update in the https://www.pulumi.com/registry/packages/ovh/ website page ^^
a
Hey @thankful-match-46035, glad this all worked out. We have some work in progress to make the plugin-sdk fork redundant, but it's not quite there yet. Hoping this doesn't come up again. Appreciate the feedback, let us know if you hit anything next time you upgrade!
t
You can count in me to give you feedbacks if a problem come again ๐Ÿ™‚
FYI this time the upgrade works. But I just noticed that the upgrade script donโ€™t saw that the github.com/pulumi/pulumi/sdk/v3 library have been updated from 3.147.0 to v3.149.0 same for others libs
a
Glad to hear. That behaviour is expected - upgrade-provider upgrades to the pulumi/pulumi version which the pulumi-terraform-bridge uses, not latest. The bridge is still on 3.147: https://github.com/pulumi/pulumi-terraform-bridge/blob/6ea8c63602014c1d423901bbafd8ef10851e249b/go.mod#L223
same for others libs
Which other libs? Upgrade-provider is not meant as a general dependency tool - it only manages the pulumi-related dependencies
t
ok I understand. Generally when I upgrade the provider, the terraform-bridge is also upgraded so that why I see versions changes in libraries.