https://pulumi.com logo
#general
Title
# general
b

brave-angle-33257

03/29/2019, 4:58 PM
just found out through failed deploy, that if you deploy a stack, then destroy it, then later redeploy the same stack, it keeps track of what version of pulumi/plugins that were used last time, and re-downloads and re-uses the old one?
Copy code
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ pulumi stack export > exp
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ cat exp 
{
    "version": 2,
    "deployment": {
        "manifest": {
            "time": "2019-01-24T20:54:09.0778043Z",
            "magic": "54e38c4d3a22fda17ff725860bf4602c",
            "version": "v0.16.11",
            "plugins": [
                {
                    "name": "azure",
                    "path": "/root/.pulumi/plugins/resource-azure-v0.16.6/pulumi-resource-azure",
                    "type": "resource",
                    "version": "0.16.6"
                }
            ]
        }
    }
}
Copy code
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ pulumi plugin ls
NAME   KIND      VERSION  SIZE    INSTALLED  LAST USED
aws    resource  0.17.1   157 MB  n/a        1 minute ago
azure  resource  0.17.3   93 MB   n/a        1 minute ago
azure  resource  0.16.6   82 MB   n/a        14 seconds ago
so my new deploy is failing because the code is using a renamed parameter, that is invalid in old 16.6, but valid in 17.3
what’s the process to fix this, just null out the stack data ?
s

stocky-spoon-28903

03/29/2019, 4:59 PM
@incalculable-sundown-82514 can likely give more colour here, but as of recently the plugin version should match the library version in use, except in sutiations where there are multiple versions in use
b

brave-angle-33257

03/29/2019, 5:00 PM
it’s in a docker container, and i only install the newest ones
it appears this old one was download by pulumi because it’s referenced in an empty state file
i

incalculable-sundown-82514

03/29/2019, 5:00 PM
Two things: 1. The particular behavior you’re observing here (plugins in the snapshot manifest) we consider to be a bug. https://github.com/pulumi/pulumi/issues/2576
2. If you’re using version 0.17.3 or greater of the Pulumi CLI, the plugins that you reference through your NPM package will take precedence over all others when handing new resource registrations.
b

brave-angle-33257

03/29/2019, 5:01 PM
Copy code
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ pulumi version
v0.17.4
that doesn’t seem to be the case for me
i

incalculable-sundown-82514

03/29/2019, 5:02 PM
The plugins will still be downloaded
that’s part of the bug in (1)
b

brave-angle-33257

03/29/2019, 5:03 PM
sounds like you’re saying although 16.6 was downloaded, because im on pulumi 17.4 that if my package.json says > 16.6 that my new resources in an otherwise empty stack, should be using the package.json version, correct?
i

incalculable-sundown-82514

03/29/2019, 5:04 PM
Yes, that’s supposed to be the case.
b

brave-angle-33257

03/29/2019, 5:04 PM
doesnt seem to be for me
i

incalculable-sundown-82514

03/29/2019, 5:04 PM
What are you observing?
b

brave-angle-33257

03/29/2019, 5:04 PM
1 sec i’ll provide somelogs
Copy code
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ cat package*
cat: 'package*': No such file or directory
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ cat ../../../package.json 
{
    "name": "lightstream-pulumi",
    "devDependencies": {},
    "dependencies": {
        "@types/node": "latest",
        "@types/js-yaml": "3.11.2",
        "js-yaml": "3.12.0",
        "n-readlines": "latest",
        "@pulumi/aws": "0.17.1",
        "@pulumi/azure": "0.17.3",
        "dedent": "latest",
        "devtest": "latest",
        "@types/dedent": "latest",
        "@types/js-base64": "latest",
        "js-base64": "latest"
    }
}
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ pulumi plugin ls
NAME   KIND      VERSION  SIZE    INSTALLED  LAST USED
aws    resource  0.17.1   157 MB  n/a        12 minutes ago
azure  resource  0.17.3   93 MB   n/a        12 minutes ago
azure  resource  0.16.6   82 MB   n/a        11 minutes ago

TOTAL plugin cache size: 331 MB
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$
no local package.json, but one a few levels up in the root
no resources in stack
Copy code
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$ pulumi refresh
Previewing refresh (LightstreamStudio/compute-sfu-g-prod-weu):

 
Resources:

Do you want to perform this refresh?
No resources will be modified as part of this refresh; just your stack's state will be. yes
Refreshing (LightstreamStudio/compute-sfu-g-prod-weu):

Permalink: <https://app.pulumi.com/LightstreamStudio/compute-sfu/compute-sfu-g-prod-weu/updates/9>
deploy@3a695941193e:/data/pulumi/infra/azure/compute-sfu$
i

incalculable-sundown-82514

03/29/2019, 5:05 PM
oh! does that work? We scan for package.jsons in the current directory, so I can imagine that we’re probably not finding the package.json you’re referencing.
Do you not have a node_modules for this directory?
b

brave-angle-33257

03/29/2019, 5:06 PM
my node modules directory is not in this dir, but higher up
i

incalculable-sundown-82514

03/29/2019, 5:06 PM
can you open a bug report for that? I don’t think we thought that was a possible scenario for a node application
You can confirm which plugin is getting loaded and why by running
pulumi preview --logtostderr -v 7
- feel free to post it here and we can see for sure what and why the engine has loaded
(i usually redirect stderr for a file since it plays badly with the interactive cli display)
b

brave-angle-33257

03/29/2019, 5:09 PM
k think i got it
ton of stuff.. can i DM it to you rather than here?
i

incalculable-sundown-82514

03/29/2019, 5:09 PM
sure
OK, yeah, this confirms that we’re not finding your node_modules or package.json
Copy code
I0329 17:09:08.748020     363 plugins.go:219] computeDefaultProviderPlugins(): language host reported empty set of provider plugins, using all plugins
I0329 17:09:08.748325     363 plugins.go:238] computeDefaultProviderPlugins(): considering nodejs
I0329 17:09:08.748618     363 plugins.go:238] computeDefaultProviderPlugins(): considering azure-0.16.6
I0329 17:09:08.748927     363 plugins.go:267] computeDefaultProviderPlugins(): plugin azure-0.16.6 selected for package azure (first seen)
I0329 17:09:08.749218     363 plugins.go:273] computeDefaultProviderPlugins(): summary of default plugins:
I0329 17:09:08.749519     363 plugins.go:275]   azure           = 0.16.6
can you open a bug?
in the meantime you can either delete and re-create your stack or delete the plugins from the manifest
b

brave-angle-33257

03/29/2019, 5:45 PM