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

Panic when managing environments resources after updating pulumi-pulumiservice #400

Closed
seanyeh opened this issue Aug 28, 2024 · 0 comments · Fixed by #399
Closed

Panic when managing environments resources after updating pulumi-pulumiservice #400

seanyeh opened this issue Aug 28, 2024 · 0 comments · Fixed by #399
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@seanyeh
Copy link
Contributor

seanyeh commented Aug 28, 2024

What happened?

After updating psp, I tried to use pulumi to manage environments resources I had previously created, and ran into this panic:

 panic: interface conversion: interface {} is *asset.Asset, not string
    goroutine 45 [running]:
    github.com/pulumi/pulumi/sdk/v3/go/common/resource.PropertyValue.StringValue(...)
        /Users/sean/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/go/common/resource/properties.go:451
    github.com/pulumi/pulumi-pulumiservice/provider/pkg/provider.ToPulumiServiceEnvironmentInput(0x2?)
        /Users/sean/go/src/github.com/pulumi/pulumi-pulumiservice/provider/pkg/provider/environment.go:63 +0x1d0

Example

Reproduction steps:

  • use PSP from dc382f7 or earlier
  • pulumi up from examples/ts-environments
  • update PSP to latest
  • pulumi destroy from examples/ts-environments

Output of pulumi about

CLI
Version      3.129.1-dev.0
Go Version   go1.22.3
Go Compiler  gc

Plugins
KIND      NAME           VERSION
resource  aws            5.43.0
resource  docker         3.6.1
language  nodejs         unknown
resource  pulumiservice  0.24.1-alpha.1724872829+e960fba7

Host
OS       darwin
Version  14.3
Arch     arm64

This project is written in nodejs: executable='/Users/sean/.nvm/versions/node/v18.20.2/bin/node' version='v18.20.2'

Current Stack: psp/environments/dev

Found no resources associated with psp/dev

Found no pending operations associated with psp/dev

Backend
Name           http://localhost:8080
URL            http://localhost:4200/psp
User           psp
Organizations  psp, psp-org, service-provider-test-org
Token type     personal

Dependencies:
NAME            VERSION
@pulumi/pulumi  3.130.0
@pulumi/aws     5.43.0
@pulumi/awsx    0.40.1
@types/node     14.18.63

Pulumi locates its logs in /var/folders/vx/cthryj9n7lzb_st_t3hqtjj00000gn/T/ by default

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

@seanyeh seanyeh added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Aug 28, 2024
@seanyeh seanyeh self-assigned this Aug 28, 2024
@seanyeh seanyeh removed the needs-triage Needs attention from the triage team label Aug 28, 2024
@seanyeh seanyeh linked a pull request Aug 28, 2024 that will close this issue
@seanyeh seanyeh added this to the 0.109 milestone Aug 28, 2024
seanyeh added a commit that referenced this issue Aug 28, 2024
This fixes the issue where creating esc resources with an older version
of pulumi-pulumiservice and then using pulumi to do something with that
resource on a newer version of pulumi-pulumiservice causes a panic due
to a type error

We started loading input yamls as strings starting in
#391, but resources
created before then will still be assets. This fix will check both the
old and new way for backwards compatibility

Fixes #400
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants