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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

codegen: interpolated-string-keys test panics #480

Open
Tracked by #13503
abhinav opened this issue Aug 1, 2023 · 0 comments
Open
Tracked by #13503

codegen: interpolated-string-keys test panics #480

abhinav opened this issue Aug 1, 2023 · 0 comments
Labels
area/codegen `pulumi convert` kind/enhancement Improvements or new features

Comments

@abhinav
Copy link
Contributor

abhinav commented Aug 1, 2023

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

In upgrading to Pulumi v3.76 (#474), we discovered that the
interpolated-string-keys test panics for this repository:

--- FAIL: TestGenerateProgram (0.00s)
    --- FAIL: TestGenerateProgram/interpolated-string-keys (0.00s)
panic: interface conversion: ast.Expr is *ast.InterpolateExpr, not *ast.StringExpr [recovered]
        panic: interface conversion: ast.Expr is *ast.InterpolateExpr, not *ast.StringExpr

goroutine 10 [running]:
testing.tRunner.func1.2({0x1048ba720, 0x140005a8690})
        /opt/homebrew/Cellar/go/1.20.6/libexec/src/testing/testing.go:1526 +0x1c8
testing.tRunner.func1()
        /opt/homebrew/Cellar/go/1.20.6/libexec/src/testing/testing.go:1529 +0x384
panic({0x1048ba720, 0x140005a8690})
        /opt/homebrew/Cellar/go/1.20.6/libexec/src/runtime/panic.go:884 +0x204
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*typeCache).typeExpr(0x140005a8540, 0x14000649c80?, {0x104bac9e0?, 0x140005a80c0?})
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/analyser.go:1011 +0xfd0
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.walker.walk({0x14000511970, 0x14000511960, 0x14000511980, 0x14000511940, 0x14000511950}, 0x1061bc108?, {0x104bac9e0, 0x140005a80c0?})
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/analyser.go:1226 +0x210
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.walker.EvalConfig({0x14000511970, 0x14000511960, 0x14000511980, 0x14000511940, 0x14000511950}, 0x140001d3580, {0x104bb34a0?, 0x14000941b80?})
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/analyser.go:1240 +0x1b0
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*Runner).Run(0x140001d3580, {0x104bb5318?, 0x140005a8630})
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/run.go:835 +0x428
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.TypeCheck(0x140001d3580?)
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/analyser.go:1175 +0x1a8
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.PrepareTemplate(0x140001d3580?, 0x102d502c8?, {0x104baf1b8?, 0x14000583380?})
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/run.go:319 +0x128
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.RunTemplate(0x2?, 0x140009a4800, 0x10?, {0x104baf1b8?, 0x14000583380})
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/run.go:331 +0x140
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/codegen.TestGenerateProgram.func2.1(0x1400063ac60?)
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/codegen/gen_program_test.go:215 +0x30
github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunWithContext(0x1400063ac60, 0x1400091f978)
        /Users/abg/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/pulumi/run.go:121 +0x154
github.com/pulumi/pulumi/sdk/v3/go/pulumi.runErrInner(0x104b9ffe0?, 0x104b8e9a0, {0x1400091f958, 0x2, 0x2?})
        /Users/abg/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/pulumi/run.go:97 +0x264
github.com/pulumi/pulumi/sdk/v3/go/pulumi.RunErr(...)
        /Users/abg/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/pulumi/run.go:64
github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/codegen.TestGenerateProgram.func2(0x14000583380, {0x14000670d80, 0x57}, 0x4?)
        /Users/abg/src/pulumi/yaml/pkg/pulumiyaml/codegen/gen_program_test.go:214 +0x1f8
github.com/pulumi/pulumi/pkg/v3/codegen/testing/test.TestProgramCodegen.func1(0x14000583380)
        /Users/abg/go/pkg/mod/github.com/pulumi/pulumi/pkg/[email protected]/codegen/testing/test/program_driver.go:635 +0x13a4
testing.tRunner(0x14000583380, 0x140005382d0)
        /opt/homebrew/Cellar/go/1.20.6/libexec/src/testing/testing.go:1576 +0x10c
created by testing.(*T).Run
        /opt/homebrew/Cellar/go/1.20.6/libexec/src/testing/testing.go:1629 +0x368
exit status 2
FAIL    github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/codegen    0.046s

Affected area/feature

@abhinav abhinav added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Aug 1, 2023
abhinav added a commit that referenced this issue Aug 1, 2023
Gets the latest testdata with `make get_testdata`,
updates `get_schemas.sh` with schemas referenced by these tests,
and runs codegen to regenerate all cases.

Broken tests were opted out, with the following issues created for them.

- #476
- #477
- #478
- #479
- #480
abhinav added a commit that referenced this issue Aug 1, 2023
The version of Pulumi used by pulumi-yaml
has not been updated in a while.

Update to the latest release,
pull the latest testdata with `make get_testdata`,
update `get_schemas.sh` with schemas referenced by these tests,
and run codegen to regenerate all cases.

Broken tests were opted out, with the following issues created for them.

- #476
- #477
- #478
- #479
- #480
@dixler dixler added area/codegen `pulumi convert` and removed needs-triage Needs attention from the triage team labels Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen `pulumi convert` kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants