esc icon indicating copy to clipboard operation
esc copied to clipboard

fix panic in eval

Open komalali opened this issue 1 year ago • 4 comments

Fixes a panic in the evaluator

Callstack
panic({0x2b282c0?, 0x5f48800?})
    /usr/local/go/src/runtime/panic.go:770 +0x124
[github.com/pulumi/esc/eval.declare[...](0x400370fc78](http://github.com/pulumi/esc/eval.declare[...](0x400370fc78)?, {0x4004796940, 0x7}, {0x3c2d7e0, 0x4004337dd0?}, 0x0)
    /go/src/github.com/pulumi/pulumi-service/vendor/github.com/pulumi/esc/eval/eval.go:318 +0x1808
[github.com/pulumi/esc/eval.(*evalContext).evaluate(0x400370fc78)](http://github.com/pulumi/esc/eval.(*evalContext).evaluate(0x400370fc78))
    /go/src/github.com/pulumi/pulumi-service/vendor/github.com/pulumi/esc/eval/eval.go:369 +0x414
[github.com/pulumi/esc/eval.evalEnvironment({0x3c319f8](http://github.com/pulumi/esc/eval.evalEnvironment(%7B0x3c319f8), 0x40043363c0}, 0x1, {0x32197cf, 0x6}, 0x4003716840, {0x0, 0x0}, {0x3c07520, 0x4003666b48}, ...)
    /go/src/github.com/pulumi/pulumi-service/vendor/github.com/pulumi/esc/eval/eval.go:114 +0x154
[github.com/pulumi/esc/eval.CheckEnvironment(...)](http://github.com/pulumi/esc/eval.CheckEnvironment(...))
    /go/src/github.com/pulumi/pulumi-service/vendor/github.com/pulumi/esc/eval/eval.go:95

komalali avatar Aug 21 '24 04:08 komalali

I think that you can probably repro this with something like this?

values:
  foo:
    bar: baz
    : qux

pgavlin avatar Aug 21 '24 21:08 pgavlin

Hmm no luck, that reasonably errors with: Error: yaml: line 2: did not find expected key

komalali avatar Aug 21 '24 23:08 komalali

Bummer. I'd love to know what the YAML that triggers this looks like...

pgavlin avatar Aug 22 '24 06:08 pgavlin

I'd love to know what the YAML that triggers this looks like...

Yeah, I agree. It would be nice if we had the request payload for Check calls. Either way, I'll let this sit for a while until we see the panic again and see if we can track down the payload.

komalali avatar Aug 22 '24 19:08 komalali