I'm trying to build our a pulumi provider but at `...
# general
p
I'm trying to build our a pulumi provider but at
make tfgen
. I'm getting an error
Copy code
../../../go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20220824175045-450992f2f5b9/helper/schema/provider.go:508: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)
This is using the newest versions of the
pulumi-terraform-bridge
and
pulumi
Seem to get it working by changing the
terraform-plugin-sdk
to match what is used by the AWS pulumi provider
If anyone can provide any feedback if this is on the correct track for enabling the release for python https://github.com/MaterializeInc/pulumi-materialize/pull/67
s
You want the
terraform-plugin-sdk
to match what's in the version of
pulumi-terraform-bridge
(but using
pulumi-aws
as a reference is also a good move).
p
Hey Josh. I'm trying to enable the release for the Python SDK and hitting some errors with
make tfgen
in the Github Action. I can't figure out what I'm doing incorrectly since it works locally https://github.com/MaterializeInc/pulumi-materialize/actions/runs/6262865266/job/17006011651
s
Sorry for the non-response. I was on PTO. Are you still stuck on this?
p
Still not really sure so just took a break from it. No rush but if you have time this week to take a look, that would be very appreciated
Just curious if you had time to check on this
s
I’m gonna snitch tag a friend in engineering who might be able to help: @happy-parrot-60128 Does this mysterious make failure mean anything to you? My random guess is maybe an issue with credentials to push the SDK, but that is not based on much effort on my end.
h
One thing that jumps out is that you’re using quite an old version of Go in CI - 1.17. I’d recommend moving to at least 1.20 if not 1.21.
Ah yes - it looks like the library you’re referencing is specifically requiring go 1.18 🤔 https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/storage/azblob/common.go#L1-L2
p
Thanks for looking. I'll try updating and that see if it works. Makes sense why it would work locally (where my Go version is more up to date)
Ok. I think the last stumbling block is just
git fetch --prune --unshallow --tags
in the deploy SDK Github Action.
Copy code
From <https://github.com/MaterializeInc/pulumi-materialize>
 * [new branch]      main       -> origin/main
 ! [rejected]        v0.0.1     -> v0.0.1  (would clobber existing tag)
I was getting a similar issue with the
release.yml
action changing it to just
git fetch --prune --unshallow
. Not sure best way around this. I'm pushing the tag just
Copy code
git tag -a vX.Y.Z -m vX.Y.Z
git push origin vX.Y.Z
h
When you created the
v0.0.1
tag, did you sign it or add any annotations? GitHub’s built in checkout command fakes the tag - but doesn’t include any metadata, leading to these clobber issues
One workaround for this is to do the deep close at the same time as the initial clone - set
fetch-depth
to 0 - then you can remove the
git fetch --prune --unshallow --tags
command
p
I needed to roll my own Github Action over
pulumi/pulumi-package-publisher
but successfully got my workflow to publish. Thanks again for the help
s
TIL that we have such an action! Could you file an issue for whatever made the existing action unsuitable for your purpose?