question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve error message when cluster has not been configured

See original GitHub issue

I tried to build the containers sample in examples and hadn’t set up the cluster.

$ pulumi preview
Previewing changes:
info: 
info: /Users/donnam/go/src/github.com/pulumi/pulumi-cloud/aws/service.ts:461
info:             throw new Error("Cannot create 'Service'.  Missing cluster config 'cloud-aws:config:ecsClusterARN'");
info:                   ^
info: Error: Cannot create 'Service'.  Missing cluster config 'cloud-aws:config:ecsClusterARN'
info:     at Service (/Users/donnam/go/src/github.com/pulumi/pulumi-cloud/aws/service.ts:461:19)
info:     at Object.<anonymous> (/Users/donnam/go/src/github.com/pulumi/pulumi-cloud/examples/containers/index.ts:7:13)
info:     at Module._compile (module.js:570:32)
info:     at Object.Module._extensions..js (module.js:579:10)
info:     at Module.load (module.js:487:32)
info:     at tryModuleLoad (module.js:446:12)
info:     at Function.Module._load (module.js:438:3)
info:     at Module.require (module.js:497:17)
info:     at require (internal/module.js:20:19)
info:     at main (/Users/donnam/go/src/github.com/pulumi/pulumi/sdk/nodejs/cmd/run/index.ts:130:9)
error: An error occurred while advancing the preview: an unhandled error occurred: Program exited with non-zero exit code: 1

Should instead show something like:

Cannot create ‘Service’ at index.ts:7. Missing cluster config ‘cloud-aws:config:ecsClusterARN’

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lukehobancommented, Feb 8, 2018

Strawman answer to my own question:

We should use pulumi.RunError for any any exception that indicates the user made a mistake. We should not use it in cases where there is an implementation bug that leads to a failure. Akin to 4xx vs. 5xx distinction in HTTP.

Does that sound right? This is another thing we should add to a “Pulumi API Design Guidelines” doc.

0reactions
lukehobancommented, Feb 8, 2018

How should we in general decide when to use that vs. not? Is there a reason not to always use it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

An error occurred while creating the cluster and the nodes will ...
Hi,. I'm trying to deploy a Cluster with two nodes (WServer 2019 both / Domain Joined / Fresh Install) but it fails.
Read more >
How do I resolve configuration change failures? - Elastic
Configuration change errors can occur when there is insufficient RAM configured for a data tier. In this case, the cluster typically also shows...
Read more >
Common Error Messages - Troubleshoot | Consul
Troubleshoot issues based on the error message. Common errors result from failed actions, timeouts, multiple entries, bad and expired certificates, ...
Read more >
How do I resolve cluster creation errors in Amazon EKS? - AWS
To resolve the preceding error, create the cluster again using the recommended Availability Zones from the error message. If you're provisioning ...
Read more >
Resolving Errors Health Statuses on Supervisor Cluster ...
Resolving Errors Health Statuses on Supervisor Cluster During Initial Configuration Or Upgrade · Check the management network to verify that ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found