Hi Pulumi, I'm trying to do some refactoring and a...
# general
t
Hi Pulumi, I'm trying to do some refactoring and asserting an empty
pulumi preview
before making changes. But even before any refactoring, it's already showing that a bunch of stuff will change. Like it would blow away and recreate stuff (which would be bad). What could cause this and how to work past it?
The preview suggests it has something to do with a version conflict between
random
and another module
Copy code
Found incompatible versions of @pulumi/pulumi. Differing major or minor versions are not supported. Version 0.16.19 referenced at node_modules/@pulumi/pulumi/package.json
Version 1.3.0-alpha.1570119193 referenced at node_modules/@pulumi/random/node_modules/@pulumi/pulumi/package.json
I'm using v0.17.27 but I was previously using v1.2.0 and downgraded. (also is this the right room for this kind of question)
b
Can you show us an output of what will change?
So Pulumi up and grab the details view and then decline to apply it for now
t
Copy code
Type                 Name                           Plan     Info
     pulumi:pulumi:Stack  infrastructure-infrastructure             Version 1.3.0-alpha.1570119193 referenced at node_modules/@pulumi/random/node_modules/@pulumi/pulumi/package.json

     Type                             Name                           Plan        Info
     pulumi:pulumi:Stack              infrastructure-infrastructure              3 messages
 +-  ├─ pulumi:pulumi:StackReference  getmargin/identity/identity    replace
 +-  ├─ gcp:container:Cluster         kube                           replace     [diff: -__defaults,enableBinaryAuthorization,enableIntranodeVisibility,enableTpu~masterAuth,name,nodeConfig]
 +-  ├─ pulumi:providers:kubernetes   kube                           replace     [diff: ~kubeconfig]
 +-  ├─ kubernetes:apps:Deployment    honeycomb                      replace     [diff: ~provider]
 +-  ├─ kubernetes:apps:Deployment    redis-replica                  replace     [diff: ~provider]
 +-  └─ kubernetes:apps:Deployment    redis-primary                  replace     [diff: ~provider]

Diagnostics:
  pulumi:pulumi:Stack (infrastructure-infrastructure):
    Found incompatible versions of @pulumi/pulumi.  Differing major or minor versions are not supported.
      Version 0.16.19 referenced at node_modules/@pulumi/pulumi/package.json
      Version 1.3.0-alpha.1570119193 referenced at node_modules/@pulumi/random/node_modules/@pulumi/pulumi/package.json

Resources:
    +-6 to replace
    29 unchanged
There's a lot of stuff that would change (too much to paste here) but some of them are like this:
Copy code
[provider: urn:pulumi:infrastructure::infrastructure::pulumi:providers:kubernetes::kube::7ee13444-c7df-4201-9b52-b8812522593a => urn:pulumi:infrastructure::infrastructure::pulumi:providers:kubernetes::kube::output<string>]
Could it be due to the versions in our
package.json
?
Copy code
"@pulumi/gcp": "^0.16.2",
        "@pulumi/kubernetes": "^0.18.0",
        "@pulumi/pulumi": "^0.16.7",
        "@pulumi/random": "^0.2.0"
the diagnostics message suggested that
pulumi/pulumi
and
pulumi/random
were incompatible
(when I'm saying "too much to paste here" above I'm referring to the details view)
g
Can you provide an example detailed view of one of the
kubernetes:apps:Deployment
resources?
t
In most of the cases it's only changing that thing I pasted above in https://pulumi-community.slack.com/archives/C84L4E3N1/p1570136097283700?thread_ts=1570135724.281600&amp;cid=C84L4E3N1 . But let me get some more context around it
Copy code
+-kubernetes:apps/v1beta1:Deployment: (replace)
        [id=default/redis-primary]
        [urn=urn:pulumi:infrastructure::infrastructure::kubernetes:apps/v1beta1:Deployment::redis-primary]
        [provider: urn:pulumi:infrastructure::infrastructure::pulumi:providers:kubernetes::kube::7ee13444-c7df-4201-9b52-b8812522593a => urn:pulumi:infrastructure::infrastructure::pulumi:providers:kubernetes::kube::output<string>]
        apiVersion: "apps/v1beta1"
        kind      : "Deployment"
        metadata  : {
            name: "redis-primary"
        }
that
[provider
line in the middle is the highlighted one
Also seeing stuff like
Copy code
++gcp:container/cluster:Cluster: (create-replacement)
        [id=kube-108876a]
        [urn=urn:pulumi:infrastructure::infrastructure::gcp:container/cluster:Cluster::kube]
      - enableBinaryAuthorization: false
      - enableIntranodeVisibility: false
      - enableTpu                : false
      ~ name                     : "kube-108876a" => "kube-5031ddb"
    +-gcp:container/cluster:Cluster: (replace)
        [id=kube-108876a]
        [urn=urn:pulumi:infrastructure::infrastructure::gcp:container/cluster:Cluster::kube]
      - enableBinaryAuthorization: false
      - enableIntranodeVisibility: false
      - enableTpu                : false
      ~ name                     : "kube-108876a" => "kube-5031ddb"
but I didn't touch any of those enable* flags
f
Just to clarify, prior to changing pulumi versions, there wasn't this issue? What pulumi CLI version and specific versions do you have for @pulumi/random and @pulumi/pulumi? Do you remember which you came from? Also, out of curiosity, why the decision to downgrade?
t
package.json
is declaring
@pulumi/random
and
@pulumi/pulumi
at
Copy code
"@pulumi/gcp": "^0.16.2",
        "@pulumi/kubernetes": "^0.18.0",
        "@pulumi/pulumi": "^0.16.7",
        "@pulumi/random": "^0.2.0"
This error was happening when I was at 1.2.0, but my colleague suggested using the older version
should we just be using more recent versions of those 4?
pulumi version
gives
v0.17.27
. But this was also happening at 1.2.0
f
so what change caused the error when you were at 1.2.0? Seemingly random or when you upgraded to 1.2.0? More information there on the cause would be helpful.
t
That's what I was saying: I was changing nothing and
pulumi preview
was still showing differences.
f
Can you create a github issue here (https://github.com/pulumi/pulumi) so that it can be further investigated?
t
Will do
@future-barista-68134 issue filed at https://github.com/pulumi/pulumi/issues/3301
👍 1