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

Plugin Crash #3

Open
JorgeAraujo123 opened this issue Oct 6, 2022 · 2 comments
Open

Plugin Crash #3

JorgeAraujo123 opened this issue Oct 6, 2022 · 2 comments

Comments

@JorgeAraujo123
Copy link

Hello,
When testing the plugin with a simple install:

resource "apisix_upstream" "test" {
  name = "test"
  type = "roundrobin"
  nodes          = [
  {
  host   = "1.1.1.1"
  port   = 80
  weight = 1
},
]

The plugin crashes:

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin6.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-apisix plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 67 [running]:
github.com/webbankir/terraform-provider-apisix/apisix/api_clent.parseHttpResult(0xc000546000, 0xc0000e0400, 0x1e3, 0x200, 0x1e3, 0x200, 0x0, 0x0, 0xc000287001, 0xc00042f6e0)
        github.com/webbankir/terraform-provider-apisix/apisix/api_clent/api_client.go:67 +0x526
github.com/webbankir/terraform-provider-apisix/apisix/api_clent.ApiClient.Get(0xc0001cef30, 0x27, 0x11e8960, 0xc0004404c0, 0x1f, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        github.com/webbankir/terraform-provider-apisix/apisix/api_clent/api_client.go:87 +0x1d1
github.com/webbankir/terraform-provider-apisix/apisix/api_clent.ApiClient.RunObject(0xc0001cef30, 0x27, 0x11e8960, 0xbe0528, 0x3, 0xc0004404c0, 0x1f, 0x0, 0x0, 0x0, ...)
        github.com/webbankir/terraform-provider-apisix/apisix/api_clent/api_client.go:182 +0x389
github.com/webbankir/terraform-provider-apisix/apisix/api_clent.ApiClient.GetUpstream(...)
        github.com/webbankir/terraform-provider-apisix/apisix/api_clent/api_client_upstream.go:4
github.com/webbankir/terraform-provider-apisix/apisix.ResourceUpstreamType.Read(0x203000, 0xc0001cef30, 0x27, 0x11e8960, 0xcfe4a0, 0xc000422340, 0xd04e40, 0xc00042bf50, 0xb06160, 0xc000428b10, ...)
        github.com/webbankir/terraform-provider-apisix/apisix/resource_apisix_upstream.go:86 +0x1b5
github.com/hashicorp/terraform-plugin-framework/tfsdk.(*server).readResource(0xc0005a24e0, 0xcfe4a0, 0xc000422340, 0xc000422300, 0xc000287a18)
        github.com/hashicorp/[email protected]/tfsdk/serve.go:571 +0x683
github.com/hashicorp/terraform-plugin-framework/tfsdk.(*server).ReadResource(0xc0005a24e0, 0xcfe4a0, 0xc0004222c0, 0xc000422300, 0xbea4d5, 0x12, 0x0)
        github.com/hashicorp/[email protected]/tfsdk/serve.go:506 +0xe4
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ReadResource(0xc000212300, 0xcfe4a0, 0xc0004222c0, 0xc00059da40, 0x0, 0x0, 0x0)
        github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:554 +0x30d
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ReadResource_Handler(0xbb3340, 0xc000212300, 0xcfe560, 0xc000417170, 0xc00059d9e0, 0x0, 0xcfe560, 0xc000417170, 0xc00040a2c0, 0x14c)
        github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:345 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002d7180, 0xd06460, 0xc0004fc480, 0xc000210400, 0xc0005a25d0, 0x11dcf10, 0x0, 0x0, 0x0)
        google.golang.org/[email protected]/server.go:1194 +0x50a
google.golang.org/grpc.(*Server).handleStream(0xc0002d7180, 0xd06460, 0xc0004fc480, 0xc000210400, 0x0)
        google.golang.org/[email protected]/server.go:1517 +0xcfb
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000202190, 0xc0002d7180, 0xd06460, 0xc0004fc480, 0xc000210400)
        google.golang.org/[email protected]/server.go:859 +0xa1
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/[email protected]/server.go:857 +0x204

Error: The terraform-provider-apisix plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Can you please help me?
Thanks

@suslovsergey
Copy link
Contributor

suslovsergey commented Oct 7, 2022

@JorgeAraujo123 Hi! I can check/fix provider only on next week. Sorry :(

@JorgeAraujo123
Copy link
Author

Any news on this @suslovsergey ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants