pulumi / esc

Pulumi ESC (Environments, Secrets, and Configuration) for cloud applications and infrastructure.
https://www.pulumi.com/product/esc/
Apache License 2.0
195 stars 4 forks source link

Panic when editing environment #298

Open komalali opened 1 month ago

komalali commented 1 month ago

What happened?

Panic:

/usr/local/go/src/reflect/value.go:247 +0xb8
reflect.flag.mustBeExported(...)
    /usr/local/go/src/reflect/value.go:241
reflect.Value.Set({0x2bf3a40?, 0x4004e82b08?, 0x2bf3a40?}, {0x0?, 0x0?, 0x400427cfc0?})
    /usr/local/go/src/reflect/value.go:2320 +0x88
[github.com/pulumi/esc/ast.parseField(](http://github.com/pulumi/esc/ast.parseField(){0x4002c21b80, 0x5}, {0x2bf3a40?, 0x4004e82b08?, 0x4002af71c8?}, {0x3bd0900, 0x400427c9a0})
    /go/src/github.com/pulumi/pulumi-service/vendor/github.com/pulumi/esc/ast/environment.go:303 +0x930
[github.com/pulumi/esc/ast.parseRecord({0x31c12ed](http://github.com/pulumi/esc/ast.parseRecord(%7B0x31c12ed), 0x6}, {0x3bad760, 0x4004e82af8}, {0x3bd08c8?, 0x400313b050?}, 0x0)
    /go/src/github.com/pulumi/pulumi-service/vendor/github.com/pulumi/esc/ast/environment.go:326 +0x38c
[github.com/pulumi/esc/ast.(*ImportDecl).parse(0x400427cf80](http://github.com/pulumi/esc/ast.(*ImportDecl).parse(0x400427cf80), {0x400427cf80?, 0x2b420a0?}, {0x3bd08c8?, 0x400313b170?})
    /go/src/github.com/pulumi/pulumi-service/vendor/github.com/pulumi/esc/ast/environment.go:178 +0x2b8
[github.com/pulumi/esc/ast.parseField({0x4002c21af0](http://github.com/pulumi/esc/ast.parseField(%7B0x4002c21af0), 0xa}, {0x2bf3cc0?, 0x4003142d88?, 0x2?}, {0x3bd08c8, 0x400313b170…
Message
[request id: 4bb7447d-014c-43bc-a863-ceb86f3f39be reflect: call of reflect.Value.Set on zero Value]

Example

The repro is to try adding merge: false to an import. Specifically, I was in the providers.all.unmerged environment and after aws I hit return, tab, started typing merge: false and the 500 happens after the colon.

Output of pulumi about

n/a

Additional context

No response

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).