pulumi / pulumi-ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pulumi AI crashes by exception

Megasware128 opened this issue · comments

What happened?

I'm not sure which error is the primary error but I get two exceptions. I get these errors in both Windows 11 itself and within WSL2:

  • Error: 14 UNAVAILABLE: No connection established
  • Error: failed to register new resource my-bucket [aws:s3/bucket:Bucket]: Resource monitor is terminating

Expected Behavior

Pulumi AI should just create my resources or at least not crash

Steps to reproduce

  1. npx pulumi-ai
  2. Write any prompt

Output

npx pulumi-ai
Welcome to Pulumi AI.

Your stack: https://app.pulumi.com/user/pulumi-ai/dev/resources

What cloud infrastructure do you want to build today?

A bucket
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

<ref *1> Error: 14 UNAVAILABLE: No connection established
at callErrorFromStatus (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@grpc\grpc-js\src\call.ts:81:17)
at Object.onReceiveStatus (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@grpc\grpc-js\src\client.ts:356:55)
at Object.onReceiveStatus (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@grpc\grpc-js\src\client-interceptors.ts:455:34)
at Object.onReceiveStatus (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@grpc\grpc-js\src\client-interceptors.ts:417:48)
at C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@grpc\grpc-js\src\resolving-call.ts:111:24
at processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
at ServiceClientImpl.makeUnaryRequest (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@grpc\grpc-js\src\client.ts:326:30)
at ServiceClientImpl.registerResourceOutputs (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@grpc\grpc-js\src\make-client.ts:189:15)
at C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@pulumi\runtime\resource.ts:859:34
at new Promise ()
at Object. (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@pulumi\runtime\resource.ts:858:37)
at Generator.next ()
at fulfilled (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@pulumi\pulumi\runtime\resource.js:18:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 14,
details: 'No connection established',
metadata: Metadata { internalRepr: Map(0) {}, options: {} },
promise: Promise {
[Circular *1],
[Symbol(async_id_symbol)]: 3545,
[Symbol(trigger_async_id_symbol)]: 468,
[Symbol(kResourceStore)]: <ref *2> LocalStore {
settings: {
options: {
organization: 'user',
project: 'pulumi-ai',
stack: 'dev',
dryRun: false,
queryMode: false,
monitorAddr: '127.0.0.1:63413',
engineAddr: '127.0.0.1:63411',
syncDir: undefined,
cacheDynamicProviders: true,
legacyApply: false,
maximumProcessListeners: 30,
parallel: 2147483647
},
rpcDone: Promise {
undefined,
[Symbol(async_id_symbol)]: 3814,
[Symbol(trigger_async_id_symbol)]: 3597,
[Symbol(kResourceStore)]: [Circular *2]
},
featureSupport: { aliasSpecs: true },
monitor: ServiceClientImpl {
[Symbol()]: [],
[Symbol()]: [],
[Symbol()]: undefined,
[Symbol()]: ChannelImplementation { internalChannel: [InternalChannel] }
},
engine: ServiceClientImpl {
[Symbol()]: [],
[Symbol()]: [],
[Symbol()]: undefined,
[Symbol()]: ChannelImplementation { internalChannel: [InternalChannel] }
}
},
config: {
PULUMI_CONFIG: '{"aws:region":"us-west-2"}',
PULUMI_CONFIG_SECRET_KEYS: '[]'
},
stackResource: <ref *3> Stack {
__pulumiResource: true,
__transformations: [],
__name: 'pulumi-ai-dev',
__providers: {},
__protect: false,
__prov: undefined,
__version: undefined,
__pluginDownloadURL: undefined,
__aliases: [],
urn: OutputImpl {
__pulumiOutput: true,
resources: [Function (anonymous)],
allResources: [Function (anonymous)],
isKnown: Promise {
true,
[Symbol(async_id_symbol)]: 1901,
[Symbol(trigger_async_id_symbol)]: 1900,
[Symbol(kResourceStore)]: [Circular *2]
},
isSecret: Promise {
false,
[Symbol(async_id_symbol)]: 1902,
[Symbol(trigger_async_id_symbol)]: 1900,
[Symbol(kResourceStore)]: [Circular *2]
},
promise: [Function (anonymous)],
toString: [Function (anonymous)],
toJSON: [Function (anonymous)]
},
__pulumiComponentResource: true,
__registered: true,
__remote: false,
__data: Promise {
Error: failed to register new resource my-bucket [aws:s3/bucket:Bucket]: Resource monitor is terminating
at Object.registerResource (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@pulumi\runtime\resource.ts:339:27)
at new Resource (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@pulumi\resource.ts:398:13)
at new CustomResource (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@pulumi\resource.ts:782:9)
at new Bucket (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules@pulumi\s3\bucket.ts:518:9)
at eval (eval at requireFromString (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules\pulumi-ai\src\index.ts:70:9), :4:16)
at requireFromString (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules\pulumi-ai\src\index.ts:70:9)
at PulumiAI. (C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules\pulumi-ai\src\index.ts:302:47)
at Generator.next ()
at C:\Users\User\AppData\Local\npm-cache_npx\b03ed4855ad612b2\node_modules\pulumi-ai\lib\index.js:8:71
at new Promise () {
code: 14,
promise: [Promise]
},
[Symbol(async_id_symbol)]: 1908,
[Symbol(trigger_async_id_symbol)]: 1854,
[Symbol(kResourceStore)]: [Circular *2]
},
outputs: OutputImpl {
__pulumiOutput: true,
resources: [Function (anonymous)],
allResources: [Function (anonymous)],
isKnown: Promise {
[Error],
[Symbol(async_id_symbol)]: 1932,
[Symbol(trigger_async_id_symbol)]: 1931,
[Symbol(kResourceStore)]: [Circular *2]
},
isSecret: Promise {
[Error],
[Symbol(async_id_symbol)]: 1933,
[Symbol(trigger_async_id_symbol)]: 1931,
[Symbol(kResourceStore)]: [Circular *2]
},
promise: [Function (anonymous)],
toString: [Function (anonymous)],
toJSON: [Function (anonymous)]
},
__childResources: Set(1) {
Bucket {
__pulumiResource: true,
__transformations: [],
__name: 'my-bucket',
__providers: {},
__parentResource: [Circular *3],
__protect: false,
__prov: undefined,
__version: '4.38.1',
__pluginDownloadURL: undefined,
__aliases: [],
urn: [OutputImpl],
id: [OutputImpl],
accelerationStatus: [OutputImpl],
acl: [OutputImpl],
arn: [OutputImpl],
bucket: [OutputImpl],
bucketPrefix: [OutputImpl],
corsRules: [OutputImpl],
forceDestroy: [OutputImpl],
grants: [OutputImpl],
hostedZoneId: [OutputImpl],
lifecycleRules: [OutputImpl],
loggings: [OutputImpl],
objectLockConfiguration: [OutputImpl],
policy: [OutputImpl],
replicationConfiguration: [OutputImpl],
requestPayer: [OutputImpl],
serverSideEncryptionConfiguration: [OutputImpl],
tags: [OutputImpl],
versioning: [OutputImpl],
website: [OutputImpl],
websiteDomain: [OutputImpl],
websiteEndpoint: [OutputImpl],
bucketDomainName: [OutputImpl],
bucketRegionalDomainName: [OutputImpl],
region: [OutputImpl],
tagsAll: [OutputImpl],
__pulumiCustomResource: true,
__pulumiType: 'aws:s3/bucket:Bucket'
}
}
},
leakCandidates: Set(0) {}
}
}
}

Node.js v18.16.0

Additional context

I'm using GPT-3.5 but I believe the problem to be on the Pulumi side since the logging says its failing creating the resources.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Running it at another Windows machine I get the same error

I believe this is the same issue underlying #11.

That class of issues is triggered if the program has certain kinds of errors, triggering an underlying issue in NodeJS Automation API. We’re looking into those underlying issues.

In the meantime, you may be able to see what is happening if you set !verbose before you request some infrastructure. That will print out the program before the error, so you could share that here and run it yourself to see if it has an error.

Thank you for mentioning this. I found the problem because of your issue. I was using Pulumi AI with Azure and noticed the error coming up 19 of the 20 times but it seems that I needed to specify a region in my prompt before it works.

The first one is what I normally get. But when I say "located in West Europe" like in the second one it fixes the issue.
https://gist.github.com/Megasware128/0cf5882df145fc712959e3324d1b82d5

This was the same underlying issue as #11, which is now fixed.