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

Fix yaml bug resulting in TypeError: Cannot read properties of undefined #2156

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

viveklak
Copy link
Contributor

@viveklak viveklak commented Aug 30, 2022

Proposed changes

Fixes #2038 for typescript.
Fixes #1987 for python.

As discussed on the issue, calling an invoke on an unconfigured provider results in the invoke never reaching the provider. This fixes a halting error here but it will not return the correct preview if things like kubeconfig are missing in the provider.

Related issues (optional)

#2038

@viveklak viveklak changed the title Fix yaml bug resulting in Fix yaml bug resulting in TypeError: Cannot read properties of undefined Aug 30, 2022
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

1 similar comment
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Member

@lblackstone lblackstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix LGTM

sdk/nodejs/yaml/yaml.ts Outdated Show resolved Hide resolved
@viveklak
Copy link
Contributor Author

viveklak commented Sep 1, 2022

@lblackstone this is ready for another review.

@github-actions
Copy link

github-actions bot commented Sep 1, 2022

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@viveklak viveklak merged commit 2eb06f3 into master Sep 1, 2022
@pulumi-bot pulumi-bot deleted the vl/2038 branch September 1, 2022 20:52
@avbenavides
Copy link

avbenavides commented Sep 23, 2022

I see this poping up again

Diagnostics:
  pulumi:pulumi:Stack (REDACTED):
    error: Running program 'REDACTED' failed with an unhandled exception:
    TypeError: Cannot read properties of undefined (reading 'map')
        at REDACTED/node_modules/@pulumi/yaml/yaml.ts:2993:14
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
pulumi about                  
CLI          
Version      3.40.1
Go Version   go1.19.1
Go Compiler  gc

Plugins
NAME        VERSION
gcp         6.32.0
kubernetes  3.20.2
nodejs      unknown
random      4.8.1
tls         4.6.0

Host     
OS       darwin
Version  12.6
Arch     x86_64

This project is written in nodejs: executable='/usr/local/bin/node' version='v18.7.0'

Current Stack: avben-dev

Found no resources associated with avben-dev

Found no pending operations associated with avben-dev

Backend        
Name           REDACTED
URL            gs://REDACTED/
User           REDACTED
Organizations  

Dependencies:
NAME                VERSION
@pulumi/kubernetes  3.20.2
@pulumi/pulumi      3.37.2
@pulumi/random      4.8.1
@pulumi/tls         4.6.0
@pulumi/gcp         6.32.0

Pulumi locates its logs in /var/folders/mq/l6wj7m_d0w7crghpqncyz6pmkycvk4/T/ by default

 2022/09/23 10:47:01
  ☸ REDACTED.cluster:default  
  REDACTED   gke-network ± 


$ pulumi stack export

{
    "version": 3,
    "deployment": {
        "manifest": {
            "time": "2022-09-22T16:40:42.874187+02:00",
            "magic": "e9ef98ed273059f87178a118d6cf44d6e4bb0218818d6839ec1a96fc4cbd96ca",
            "version": "v3.39.3"
        },
        "secrets_providers": {
            "type": "passphrase",
            "state": {
REDACTED
            }
        }
    }
}

@LucasBrazi06
Copy link

Same for me

Diagnostics:
  pulumi:pulumi:Stack (e-mobility-ca-prod):
    error: TypeError: Cannot read properties of undefined (reading 'map')
        at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
    error: TypeError: Cannot read properties of undefined (reading 'map')
        at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
    error: TypeError: Cannot read properties of undefined (reading 'map')
        at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
        at processTicksAndRejections (node:internal/process/task_queues:95:5)
    error: TypeError: Cannot read properties of undefined (reading 'map')
        at /Users/serge/dev/personal/ev-kubernetes/pulumi/e-mobility/node_modules/@pulumi/yaml/yaml.ts:2993:14
        at processTicksAndRejections (node:internal/process/task_queues:95:5)

@lblackstone
Copy link
Member

@LucasBrazi06 Could you please open a new issue for that? I want to make sure we don't lose track of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes.yaml.* produces a TypeError: Cannot read properties of undefined Helm v3 crash
4 participants