Giter Club home page Giter Club logo

Comments (15)

rosskevin avatar rosskevin commented on August 24, 2024 1

Reopening because I am unable to workaround the plugin versioning.

After a rebuild with initial yarn, the plugins are confirmed good:

~/p/advisorIntake ❯❯❯ pulumi plugin ls
NAME        KIND      VERSION  SIZE   INSTALLED       LAST USED
gcp         resource  0.18.2   64 MB  54 seconds ago  now
kubernetes  resource  0.22.0   45 MB  54 seconds ago  now
random      resource  0.5.1    27 MB  54 seconds ago  now

Then I ran pulumi up on a stack with the following dependencies:

"@pulumi/gcp": "^0.18.2",
"@pulumi/kubernetes": "^0.22.0",
"@pulumi/pulumi": "^0.17.4",
"@pulumi/random": "^0.5.1"

I then notice that pulumi up installed the older [email protected] plugin:

pulumi plugin ls
NAME        KIND      VERSION  SIZE   INSTALLED       LAST USED
gcp         resource  0.18.2   64 MB  1 minute ago    now
gcp         resource  0.18.0   64 MB  13 seconds ago  7 seconds ago
kubernetes  resource  0.22.0   45 MB  1 minute ago    now
random      resource  0.5.1    27 MB  1 minute ago    now

With the result:

error: gcp:container/cluster:Cluster resource 'production' has a problem: : invalid or unknown key: location

What is bizarre is this originally worked briefly (a few hours), then stopped working. Now I cannot use the code written for the regional cluster even after clearing plugins/rebuilding node_modules.

from pulumi-gcp.

rosskevin avatar rosskevin commented on August 24, 2024

I'm also using location in node pool, and that seems to error as well on location

new gcp.container.NodePool(
      name,
      {
        cluster: this.instance.name,
        project,

        location,

        nodeCount: (1 + nodeLocations.length) * initialNodeCount,
        nodeConfig: {
          machineType: config.get('machineType') || 'n1-standard-1', // prod: n1-standard-2
          oauthScopes: [
            'https://www.googleapis.com/auth/devstorage.read_only',
            'https://www.googleapis.com/auth/logging.write',
            'https://www.googleapis.com/auth/monitoring.write',
            'https://www.googleapis.com/auth/pubsub',
            'https://www.googleapis.com/auth/service.management.readonly',
            'https://www.googleapis.com/auth/servicecontrol',
            'https://www.googleapis.com/auth/trace.append',
            'https://www.googleapis.com/auth/monitoring',
            'https://www.googleapis.com/auth/cloud-platform',
            'https://www.googleapis.com/auth/devstorage.full_control',
            'https://www.googleapis.com/auth/sqlservice.admin',
            'https://www.googleapis.com/auth/userinfo.email',
          ],
        },
        management: {
          autoRepair: true,
          autoUpgrade: true,
        },
      },
      { parent: this, dependsOn: [this.instance] },
    )
  gcp:container:NodePool (production):
    error: gcp:container/nodePool:NodePool resource 'production' has a problem: : invalid or unknown key: location

from pulumi-gcp.

jen20 avatar jen20 commented on August 24, 2024

I can't reproduce either of these using the latest plugins. I suspect what is happening is that you have both the latest and an older version of the plugin installed, and the older one is getting selected. This manifests as a runtime error since the TypeScript is compiled against the intended target. In other words, it would be resolved by pulumi/pulumi#2389.

To work around this in the short term, I think all components throughout the entire stack need to be using the latest version of the GCP provider SDK.

from pulumi-gcp.

rosskevin avatar rosskevin commented on August 24, 2024

Confirmed the cause is pulumi/pulumi#2389, thank you.

From slack

  • check plugins pulumi plugin ls (many old versions)
  • rm -rf node_modules
  • pulumi plugin rm --all
  • check plugins again - should be latest pulumi plugin ls

from pulumi-gcp.

lukehoban avatar lukehoban commented on August 24, 2024

@rosskevin Could you share what is in the manifest header of the results of pulumi stack export? Does it include references to 0.18.0 of the GCP provider? If so, I believe this is caused by pulumi/pulumi#2576.

from pulumi-gcp.

rosskevin avatar rosskevin commented on August 24, 2024

Yes, it has it. The stack was up previously, I've just been omitting/adding back the cluster.

        "manifest": {
            "time": "2019-04-03T15:23:13.414846-05:00",
            "magic": "4c9e3af950abf0bb06246576f7dddc0b09f84e5b925a0be3d28d7b943f3cfe41",
            "version": "v0.17.4",
            "plugins": [
                {
                    "name": "nodejs",
                    "path": "/usr/local/bin/pulumi-language-nodejs",
                    "type": "language",
                    "version": "0.17.4"
                },
                {
                    "name": "gcp",
                    "path": "/Users/kross/.pulumi/plugins/resource-gcp-v0.18.0/pulumi-resource-gcp",
                    "type": "resource",
                    "version": "0.18.0"
                }
            ]
        },

I'll try a full destroy and see if that allows me to workaround for the moment.

from pulumi-gcp.

lukehoban avatar lukehoban commented on August 24, 2024

Okay - sounds like this is directly caused by pulumi/pulumi#2576 then.

from pulumi-gcp.

rosskevin avatar rosskevin commented on August 24, 2024

I hand edited manifest and imported, I'll see if that works

from pulumi-gcp.

rosskevin avatar rosskevin commented on August 24, 2024

Hand edit + import then pulumi up made the plugin come back. I'll delete the stack and start with 0.18.2

from pulumi-gcp.

swgillespie avatar swgillespie commented on August 24, 2024

Hand edit + import then pulumi up made the plugin come back. I'll delete the stack and start with 0.18.2

Can you provide some more details on this? In particular, if you run pulumi preview --logtostderr -v 7 2> err.txt, err.txt should contain logs that indicate exactly why the engine needed a particular plugin. If you could do that and provide the logs, that would be super helpful for understanding why the plugin comes back.

from pulumi-gcp.

rosskevin avatar rosskevin commented on August 24, 2024

I deleted the stack already. It is clear that hand editing the manifest + import had no impact. The next pulumi up had manifest back at the older 0.18.0.

from pulumi-gcp.

swgillespie avatar swgillespie commented on August 24, 2024

It is clear that hand editing the manifest + import had no impact. The next pulumi up had manifest back at the older 0.18.0.

Right - the log gathering is to understand why that happened. I'll try to work on a repro, but what is supposed to happen is that the plugins required by the language host (i.e. the ones in your package.json) override everything else for the purposes of new resources.

from pulumi-gcp.

casey-robertson avatar casey-robertson commented on August 24, 2024

I think I'm having the same/similar issue as @rosskevin . I was getting messages about 'region' being deprecated. So I went through our cluster code, updated references to region to the new location. Running preview against 3 different stacks gives me 3 different outcomes. One, no changes. Another 'missing key' like @rosskevin . Yet another, it wants to replace a node pool and shows the change as deleting the region attribute and adding the location.

from pulumi-gcp.

casey-robertson avatar casey-robertson commented on August 24, 2024

Current state of my stack:

 pulumi preview
Previewing update (MINDBODY-Platform/alpha):

     Type                             Name            Plan     Info
     pulumi:pulumi:Stack              viserion-alpha
 >   ├─ pulumi:pulumi:StackReference  identityStack   read
     └─ gcp:container:Cluster         alpha                    1 error

Diagnostics:
  gcp:container:Cluster (alpha):
    error: gcp:container/cluster:Cluster resource 'alpha' has a problem: : invalid or unknown key: location

After reviewing the stack file there is a reference to gcp provider 0.16.6. So I removed it - why not. Imported the file then it does this:

Previewing update (MINDBODY-Platform/alpha):

     Type                             Name                      Plan        Info
     pulumi:pulumi:Stack              viserion-alpha
 >   ├─ pulumi:pulumi:StackReference  identityStack             read
 +-  ├─ gcp:container:Cluster         alpha                     replace     [diff: +enableBinaryAuthorization,enableTpu,location-region~addonsConfig,ipAllocationPolicy,masterAuthorizedNetworksConfig,networkPolicy,privateClusterCon
 +-  ├─ gcp:container:NodePool        k8s-node-pool-private     replace     [diff: +location-region~autoscaling,management,name,nodeConfig]
 +-  └─ gcp:container:NodePool        k8s-node-pool-monitoring  replace     [diff: +location-region~autoscaling,management,name,nodeConfig]

Resources:
    +-3 to replace
    26 unchanged

Changed it back but this is making migrating the provider untenable.

from pulumi-gcp.

rosskevin avatar rosskevin commented on August 24, 2024

I was looking for an old issue I created and bumped into this one and saw it was open. I'm no longer having problems with regional clusters so I'm going to close this for now, until I bump into it again. pulumi/pulumi#2576 is resolved so perhaps that was indeed the cause.

from pulumi-gcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.