Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when YAML parsing fails are not intuitive #502

Closed
hausdorff opened this issue Mar 26, 2019 · 0 comments · Fixed by #638
Closed

Errors when YAML parsing fails are not intuitive #502

hausdorff opened this issue Mar 26, 2019 · 0 comments · Fixed by #638
Assignees
Labels
area/sdk Related to the Kubernetes SDKs (nodejs, Python, etc.) kind/bug Some behavior is incorrect or out of spec

Comments

@hausdorff
Copy link
Contributor

If you point k8s.yaml.ConfigFile at a URL that doesn't exist, but you still have transforms, you get an error like this:

error: Running program '/Users/erinkrengel/workspace/pulumi/gke-hello-world' failed with an unhandled exception:
    error: TypeError: Cannot read property 'labels' of undefined
        at k8s.yaml.ConfigFile.transformations (/Users/erinkrengel/workspace/pulumi/gke-hello-world/index.ts:116:30)
        at parseYamlObject (/Users/erinkrengel/workspace/pulumi/gke-hello-world/node_modules/@pulumi/kubernetes/provider.js:144:13)
        at parseYamlDocument (/Users/erinkrengel/workspace/pulumi/gke-hello-world/node_modules/@pulumi/kubernetes/provider.js:125:33)

This is confusing, since the error we should get is that the URL doesn't exist.

This happens in other places, too, so we should probably fix it.

@hausdorff hausdorff added area/sdk Related to the Kubernetes SDKs (nodejs, Python, etc.) kind/bug Some behavior is incorrect or out of spec labels Mar 26, 2019
@hausdorff hausdorff added this to backlog in Q3 Kubernetes Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sdk Related to the Kubernetes SDKs (nodejs, Python, etc.) kind/bug Some behavior is incorrect or out of spec
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants