Has anyone encountered any oddities working with n...
# general
m
Has anyone encountered any oddities working with nix (ie.
nixpkgs.pulumi-bin
) and versions of plugins? In CI (Github actions where admittedly nix is not fully configured yet) it complains the aws plugin isn't available - though it is in my package-lock.json
Copy code
pulumi:providers:aws (default_4_33_0):
    error: no resource plugin 'aws-v4.33.0' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource aws v4.33.0`
Weirder, when I run locally it warns of a mismatch:
Copy code
resource plugin aws is expected to have version >=4.33.0, but has 4.27.2
But when checking versions locally it seems ok..
Copy code
% pulumi plugin ls
NAME       KIND      VERSION  SIZE    INSTALLED  LAST USED
aws        resource  4.33.0   360 MB  1 day ago  38 minutes ago
docker     resource  3.1.0    39 MB   1 day ago  38 minutes ago
terraform  resource  5.5.1    85 MB   1 day ago  19 hours ago
Anyone seen issues where you get resource plugin version warnings despite
plugin ls
showing the expected version?
Copy code
resource plugin aws is expected to have version >=4.33.0, but has 4.27.2
A side effect seems to be provider resources are getting invalidated every run
b
what's in your SDK settings?
m
Is that the Pulumi.yml sorry?
Copy code
name: platform
runtime:
  name: nodejs
  options:
    typescript: false
description: Core platform
# using esbuild bundle until pulumi sort out ts-node/typescript as a peer dep
# <https://github.com/pulumi/pulumi/pull/8199>
main: ./dist/pulumi/pulumi.js
b
your
package.json
m
Copy code
"@pulumi/aws": "^4.33.0",
    "@pulumi/awsx": "^0.32.0",
    "@pulumi/pulumi": "^3.21.0",
Actually worth noting that these are in a parent package.json, within a monorepo
Is pulumi trying to look into the closest package.json to find a version?
Would be much better if it looked for a package-lock file, no, as that's what should be expected?
b
it's looking in two places:
package-lock.json
your state. each provider has a version associated with it, so if you do
pulumi stack export
you should be able to examine the versions in there
m
export says all the versions are 4.33
(note that I did this deploy only a few moments before trying again and getting the mismatch warnings)
b
and your package-lock has 4.33 too?
m
Copy code
"node_modules/@pulumi/aws": {
      "version": "4.33.0",
      "resolved": "<https://registry.npmjs.org/@pulumi/aws/-/aws-4.33.0.tgz>",
      "integrity": "sha512-MPXpx3vDgKCD/hvaQ3TiO0BRLWiLJwX4QBvWBD9JoC4VWagRe+7YXd4eQnZ7/TUssrPKL4y5DSeLa/lgdJr8iw==",
      "hasInstallScript": true,
      "dependencies": {
        "@pulumi/pulumi": "^3.0.0",
        "aws-sdk": "^2.0.0",
        "builtin-modules": "3.0.0",
        "mime": "^2.0.0",
        "read-package-tree": "^5.2.1",
        "resolve": "^1.7.1"
      }
    },
b
hrm. i'm not sure I'm afraid, would you mind opening an issue?
m
ofc, might rush a few details to this evening and follow up with any more thorough info tomorrow
just in case you missed it I have used nix to install
nixpkgs.pulumi-bin
So my first thought is maybe somewhere the version resolution is caught up in there
just very odd the state ive managed to get into
aha
guess some docs or other plugin guard code needs to be updates for people using nix as it seems it lets you use mismatching versions
Copy code
$ which pulumi
/nix/store/0k0qph0v3lrlpxips1m59dgarsmvaxsf-pulumi-3.17.1/bin/pulumi
$ which pulumi-resource-aws
/nix/store/0k0qph0v3lrlpxips1m59dgarsmvaxsf-pulumi-3.17.1/bin/pulumi-resource-aws
$ pulumi plugin ls
NAME       KIND      VERSION  SIZE    INSTALLED  LAST USED
aws        resource  4.33.0   356 MB  n/a        55 minutes ago
$ pulumi-resource-aws --version
v4.27.2
167 Views