-
Notifications
You must be signed in to change notification settings - Fork 50
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 interface conversion error message on migrate from v4 to v5 #1987
Comments
Hi @Rus1an31, sorry you're running into this. We'll be looking into it as soon as possible. In the meantime, would you be able to try again with a recent version of the Pulumi Azure Classic provider? Your current version 5.0.0 is about two years old and many fixes have gone into later versions. |
Hi @thomas11 |
Thanks for checking, @Rus1an31. Could you post the first few lines of the new stack trace to get accurate line numbers for debugging? It would also be very helpful if you could attach the output of |
What specific version of 4.x are you migrating from? If you're not already using it, upgrading to v4.42.0 first might possibly help to sort out the state. |
Hi @thomas11 2024-04-29T09:15:35.1943605Z pulumi:pulumi:Stack webapik8s-dev running What about
|
Hi @danielrbradley 2024-04-30T14:55:12.3682164Z pulumi:pulumi:Stack webapik8s-dev running |
Thanks for the extra info @Rus1an31 So far we can establish that:
A couple more requests so we can narrow down the issue:
Ideally, what we need for an investigation is a complete reproduction of the issue in a standalone pulumi program. I.e.
My working hypothesis is that an earlier v4 version of the provider it was still using v1 of this resource, but possibly with a slightly different shape for the One workaround for now is to edit the state of this resource using Without more information it's hard to know for sure, but this is likely a bug in the very old version which stored the state in the wrong format, was later corrected, but you're now running into. |
What happened?
After changing code to upgrade pulumi/azure from v4 to v5,
pulumi preview
command failed with error message "panic: interface conversion: interface {} is nil, not []interface {}". Full stack trace:Diagnostics:
azure:containerservice:KubernetesCluster (danfoss-webapik8s-dev):
error: transport is closing
pulumi:pulumi:Stack (webapik8s-dev):
panic: interface conversion: interface {} is nil, not []interface {}
goroutine 64 [running]:
github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/migration.KubernetesClusterV1ToV2.UpgradeFunc.func1({0xc5b5d60, 0xc0000c3a18}, 0x5d16da0, {0xc001bc4090, 0x6f4f8a0})
/home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-azurerm@v1.41.1-0.20220406111449-c8ba32389106/internal/services/containers/migration/kubernetes_cluster.go:1231 +0x30a
github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk.StateUpgrades.func1({0x6f4c298, 0xc00005a1c8}, 0x2, {0x5cce140, 0xc0016f8e00})
/home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-azurerm@v1.41.1-0.20220406111449-c8ba32389106/internal/tf/pluginsdk/state_upgrades.go:52 +0x64
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.UpgradeJSONState({0x6f4c298, 0xc00005a1c8}, 0x0, 0xc000fbbb60, 0xc000c32dd0, {0x5cce140, 0xc0016f8e00})
/home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20211019194827-62530c6537a4/helper/schema/grpc_provider.go:424 +0xa7
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.upgradeResourceState(0xc000476730, 0xc0005d4cf0, 0xc001cb92b0)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.20.0/pkg/tfshim/sdk-v2/upgrade_state.go:44 +0x205
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Diff({0xc0016d2240}, {0x66e662a, 0x1a}, {0x6f515f0, 0xc001da1140}, {0x6ef3580, 0xc0015a0960})
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.20.0/pkg/tfshim/sdk-v2/provider.go:95 +0xda
github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Diff(0xc0016d2240, {0x6f4c308, 0xc000e80c30}, 0xc0009f01c0)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/v3@v3.20.0/pkg/tfbridge/provider.go:746 +0x58c
github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler.func1({0x6f4c308, 0xc000e80c30}, {0x62837e0, 0xc0009f01c0})
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.27.0/proto/go/provider.pb.go:2611 +0x78
github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x6f4c308, 0xc000c02ae0}, {0x62837e0, 0xc0009f01c0}, 0xc00153dc40, 0xc001c88d80)
/home/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x425
github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Diff_Handler({0x63a3000, 0xc0016d2240}, {0x6f4c308, 0xc000c02ae0}, 0xc001ba2de0, 0xc00177b840)
/home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.27.0/proto/go/provider.pb.go:2613 +0x138
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002e6700, {0x6fa5778, 0xc0012ef200}, 0xc001ca6900, 0xc00176aea0, 0xc56e8e8, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.39.0/server.go:1292 +0xc6f
google.golang.org/grpc.(*Server).handleStream(0xc0002e6700, {0x6fa5778, 0xc0012ef200}, 0xc001ca6900, 0x0)
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.39.0/server.go:1617 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.39.0/server.go:940 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
/home/runner/go/pkg/mod/google.golang.org/grpc@v1.39.0/server.go:938 +0x294
Example
Definition of cluster:
Output of
pulumi about
CLI
Version 3.17.0
Go Version go1.17.2
Go Compiler gc
Plugins
NAME VERSION
azure 5.0.0
azuread 5.48.0
kubernetes 3.21.4
nodejs unknown
Host
OS ubuntu
Version 22.04
Arch x86_64
This project is written in nodejs (/opt/hostedtoolcache/node/18.15.0/x64/bin/node v18.15.0)
NAME VERSION
@pulumi/azure 5.0.0
@pulumi/kubernetes 3.21.4
@types/node 16.11.26
@pulumi/azuread 5.48.0
@pulumi/pulumi 3.89.0
typescript 5.4.5
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).
The text was updated successfully, but these errors were encountered: