pulumi / pulumi-pulumiservice

https://pulumi.com
Apache License 2.0
13 stars 7 forks source link

panic in `pulumiservice.Environment.yaml` v0.26 #411

Closed desteves closed 1 month ago

desteves commented 2 months ago

What happened?

The latest version of the pulumi service seems to have a bug with the Environment yaml field.

Using v0.23.2 does not have this potential bug as the resource is successfully created/previewed. See below for the error message encountered.

Example

Example code:


pulumi preview

## output

     └─ pulumiservice:index:Environment  aws-oidc-admin             1 error

Diagnostics:
  pulumi:pulumi:Stack (PROJECT-q):
    panic: interface conversion: interface {} is resource.Computed, not *asset.Asset
    goroutine 40 [running]:
    github.com/pulumi/pulumi/sdk/v3/go/common/resource.PropertyValue.AssetValue(...)
      /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.131.0/go/common/resource/properties.go:456
    github.com/pulumi/pulumi-pulumiservice/provider/pkg/provider.(*PulumiServiceEnvironmentResource).Check(0x1289f40?, 0xc000450fc0?)
      /home/runner/work/pulumi-pulumiservice/pulumi-pulumiservice/provider/pkg/provider/environment.go:241 +0x778
    github.com/pulumi/pulumi-pulumiservice/provider/pkg/provider.(*pulumiserviceProvider).Check(0xc000450240, {0xc00041b720?, 0x4107e5?}, 0x40?)
      /home/runner/work/pulumi-pulumiservice/pulumi-pulumiservice/provider/pkg/provider/provider.go:217 +0xdb
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Check_Handler.func1({0x1298c18, 0xc0004c4bd0}, {0x100b2c0?, 0xc000450fc0})
      /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.131.0/proto/go/provider_grpc.pb.go:615 +0x72
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x1298c18, 0xc0004c4ae0}, {0x100b2c0, 0xc000450fc0}, 0xc0002f6860, 0xc0003e6d50)
      /home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x3d0
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Check_Handler({0x106ec60?, 0xc000450240}, {0x1298c18, 0xc0004c4ae0}, 0xc0003f7200, 0xc0002f7a00)
      /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.131.0/proto/go/provider_grpc.pb.go:617 +0x135
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002c3400, {0x1298c18, 0xc0004c4a50}, {0x12a1ae0, 0xc0001f4900}, 0xc000437e60, 0xc0003bd020, 0x1a8e9c8, 0x0)
      /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1369 +0xe23
    google.golang.org/grpc.(*Server).handleStream(0xc0002c3400, {0x12a1ae0, 0xc0001f4900}, 0xc000437e60)
      /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1780 +0x1016
    google.golang.org/grpc.(*Server).serveStreams.func2.1()
      /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
    created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 37
      /home/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1030 +0x135

Output of pulumi about

@desteves ➜ /workspaces/examples/aws-ts-oidc-provider-pulumi-cloud (update-aws-ts-oidc) $ pulumi about
CLI          
Version      3.133.0
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME           VERSION
resource  aws            6.52.0
resource  command        1.0.1
language  nodejs         unknown
resource  pulumiservice  0.26.0
resource  tls            5.0.6

Host     
OS       ubuntu
Version  20.04
Arch     x86_64

This project is written in nodejs: executable='/home/codespace/nvm/current/bin/node' version='v20.16.0'

Current Stack: diana-pulumi-corp/PROJECT/q

Found no resources associated with q

Found no pending operations associated with q

Dependencies:
NAME                   VERSION
@pulumi/aws            6.52.0
@pulumi/command        1.0.1
@pulumi/pulumi         3.133.0
@pulumi/pulumiservice  0.26.0
@pulumi/tls            5.0.6
@types/node            22.5.5
typescript             5.6.2

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