This message was deleted.
# general
s
This message was deleted.
e
What do you get if you run
go list --json -m ...
in the program directory?
a
Copy code
go: can't match module patterns using the vendor directory
        (Use -mod=mod or -mod=readonly to bypass.)
e
ah well that's why, I'd need to go check some go docs to work out what that means though
a
hm, so pulumi gets confused when you vendor deps?
e
yeh seems it, I didn't think anyone was doing vendoring in Go anymore now that mod files were a thing
a
can that also be the reason it seems to use the "wrong" plugin versions? im using
<http://github.com/pulumi/pulumi-kubernetes/sdk/v3|github.com/pulumi/pulumi-kubernetes/sdk/v3> v3.17.0
, but it selects:
Copy code
SelectCompatiblePlugin(..., kubernetes): selecting plugin 'kubernetes-3.24.0': best match
e
yeh probably
a
oh cool, ive been trying to figure that out for quite a while 🙂
couldnt make sense of the plugins being used
when I deleted the vendor directory, I dont get the error anymore, but get
No dependencies found
instead
but I still can't quite figure out why it chooses plugin 3.24.0 of kubernetes:
Copy code
I0210 14:17:51.717238 1409869 plugins.go:165] gatherPluginsFromSnapshot(): plugin kubernetes 3.24.0 is required by first-class provider "urn:pulumi:euc1::aws-cluster-0-stage::fiveten:eksspotcluster:EksSpotClusterComponent$eks:index:Cluster$pulumi:providers:kubernetes::cluster-0-stage-eks-cluster-eks-k8s"
I0210 14:17:51.717253 1409869 plugins.go:165] gatherPluginsFromSnapshot(): plugin kubernetes 3.24.0 is required by first-class provider "urn:pulumi:euc1::aws-cluster-0-stage::fiveten:eksspotcluster:EksSpotClusterComponent$eks:index:Cluster$pulumi:providers:kubernetes::cluster-0-stage-eks-cluster-provider"
I0210 14:17:51.717264 1409869 plugins.go:165] gatherPluginsFromSnapshot(): plugin kubernetes 3.24.0 is required by first-class provider "urn:pulumi:euc1::aws-cluster-0-stage::fiveten:eksspotcluster:EksSpotClusterComponent$pulumi:providers:kubernetes::cluster-0-stage-k8sProvider"
when go.mod says:
Copy code
<http://github.com/pulumi/pulumi-kubernetes/sdk/v3|github.com/pulumi/pulumi-kubernetes/sdk/v3> v3.17.0
I guess that comes from
pulumi stack export > something
then you can look at
something
and see the input to the urn has version 3.24.0
but I thought it was the SDK version that decided what plugin to use*
e
Go SDKs do an oddity where the version isn't hardcoded in but it tries to work it out based on how it was imported
So I think that's probably what's causing this
a
so getting from the stack inputs is a fallback if it cant find specific from imports?
also, its imported like this
k8s "<http://github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes|github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes>"
is there any workarounds for getting consistent plugin versions across many computers?
e
It should be consistent if using go.mod files with fixed version numbers in them
a
We do use that, but the 3.24.0 plugin being downloaded does not match with the pulumi-kubernetes sdk in go.mod or go.sum
but we have been using vendored sdk's earlier, but no idea how it got 3.24.0, we never had that new version of pulumi-kubernetes*
e
yeh the old version might be in the stack state, and currently the engine tries to use those plugin versions as well. Wer're looking at changing that
a
is it like,
pluginVersion = if SDK.version > stack.resource.input-version then sdk.version else stack.resource.input-version
? just guessing 🙂
e
It loads both, then uses the old or new based on if it's doing updates or deletes