How does Pulumi determine which plugin version to ...
# general
f
How does Pulumi determine which plugin version to use? I assumed it would be the version in
requirements.txt
Copy code
pulumi_aws_native>=0.41.0<1.0.0
But that doesn’t seem to be the case for
aws-native
Pulumi version used: v3.43.1
Copy code
$ pulumi up
Previewing update (sitka/uat)

View Live: <https://app.pulumi.com/sitka/env-app/uat/previews/5631a648-bebb-4f25-b6bd-bd739dd68b2a>




error: could not load plugin for aws-native provider 'urn:pulumi:uat::env-app::pulumi:providers:aws-native::default': Could not automatically download and install resource plugin 'pulumi-resource-aws-native'at version v0.22.1-alpha.1661750811, install the plugin using `pulumi plugin install resource aws-native v0.22.1-alpha.1661750811`.
Underlying error: error downloading plugin aws-native to file: failed to download plugin: aws-native-0.22.1-alpha.1661750811: 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-aws-native-v0.22.1-alpha.1661750811-darwin-amd64.tar.gz>
I have
aws-native
0.41.0
installed
Copy code
$ pulumi plugin ls | grep 'NAME\|aws-native'
NAME        KIND      VERSION                           SIZE    INSTALLED     LAST USED
aws-native  resource  0.41.0                            92 MB   2 hours ago   30 minutes ago
aws-native  resource  0.39.0                            92 MB   3 weeks ago   3 weeks ago
aws-native  resource  0.29.0                            84 MB   2 months ago  2 months ago
aws-native  resource  0.19.1-alpha.1660828085+dfb123ac  86 MB   3 months ago  3 months ago
aws-native  resource  0.19.1-alpha.1660126749+9e28f183  84 MB   3 months ago  3 months ago
aws-native  resource  0.19.1-alpha.1659013975+9c6f4698  84 MB   3 months ago  3 months ago
aws-native  resource  0.19.1-alpha.1656019149+c2daf7c7  87 MB   4 months ago  4 months ago
aws-native  resource  0.19.0                            87 MB   4 months ago  2 months ago
Why is pulumi attempting to use
aws-native-0.22.1-alpha.1661750811
, which no longer exists, locally or on get.pulumi.com?
Copy code
$ pulumi about                                                                                                                                                                                                                                        
CLI
Version      3.46.1
Go Version   go1.19.2
Go Compiler  gc

Plugins
NAME        VERSION
aws         5.21.0
aws-native  0.41.0
awsx        1.0.0-beta.11
docker      3.6.0
python      unknown

Host
OS       darwin
Version  13.0
Arch     x86_64
oh… I guess it’s in state, fixed:
Copy code
pulumi state delete urn:pulumi:uat::env-app::pulumi:providers:aws-native::default
l
My theory is that old resources that don't get redeployed continue to refer to the older plugins, at least in the state file. Once every resource (that was deployed with version X) is updated using any newer version of the plugin, then Pulumi will drop the reference to version X. This is based only on my own non-empirical observations of state files.
f
I just ran into this again, this time with a newer version of the plugin that has gone missing,
aws-native-0.41.1-alpha.1669144866
With CICD, this will cause intermittent failures. Is it a good idea to start CICD runs by first removing the provider every run?
m
There should be now (since 1h) a 0.42.0 version
I check with engineering, why this happens