rollbar / terraform-provider-rollbar

Terraform provider for Rollbar
https://rollbar.com
MIT License
28 stars 13 forks source link

Terraform plugin crashing v 1.7.0 #322

Closed Raymondloh2022 closed 1 year ago

Raymondloh2022 commented 1 year ago

Description Error: The terraform-provider-rollbar_v1.7.0 plugin crashed constantly and does not recover

Context The user had a good deployment yesterday; however, they ran a plan today to check the build's status. They're seeing the Rollbar provider crash now consistently. They reported having seen this before and had to tear down and rebuild our Terraform project from the ground up a few times.

The user is to have the notifications built from a standard module that all projects can reference to ensure consistency in notifications over email and slack.

Stack trace terraform-provider-rollbar_v1.7.0 plugin

panic: Invalid address to set: []string{"config", "1987373520", "summary_time"}

goroutine 46 [running]: github.com/rollbar/terraform-provider-rollbar/rollbar.mustSet(...) github.com/rollbar/terraform-provider-rollbar/rollbar/provider.go:117 github.com/rollbar/terraform-provider-rollbar/rollbar.resourceNotificationRead({0xd0f498, 0xc00028da40}, 0x7f7edf17ba68, {0xb2be80, 0xc000457ce0}) github.com/rollbar/terraform-provider-rollbar/rollbar/resource_notification.go:345 +0x615 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc00030ca80, {0xd0f498, 0xc00028da40}, 0x24, {0xb2be80, 0xc000457ce0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:358 +0x12e github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc00030ca80, {0xd0f498, 0xc00028da40}, 0xc00015b450, {0xb2be80, 0xc000457ce0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:635 +0x35b github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc00030e750, {0xd0f498, 0xc00028da40}, 0xc00028dac0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:576 +0x534 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc000338c80, {0xd0f540, 0xc0002d9cb0}, 0xc000281560) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:553 +0x3b0 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xbce1a0, 0xc000338c80}, {0xd0f540, 0xc0002d9cb0}, 0xc000281500, 0x0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x170 google.golang.org/grpc.(Server).processUnaryRPC(0xc000324700, {0xd1c678, 0xc000464300}, 0xc00037c300, 0xc000456ba0, 0x11fae50, 0x0) google.golang.org/grpc@v1.36.0/server.go:1217 +0xc8f google.golang.org/grpc.(Server).handleStream(0xc000324700, {0xd1c678, 0xc000464300}, 0xc00037c300, 0x0) google.golang.org/grpc@v1.36.0/server.go:1540 +0xa2a google.golang.org/grpc.(Server).serveStreams.func1.2() google.golang.org/grpc@v1.36.0/server.go:878 +0x98 created by google.golang.org/grpc.(Server).serveStreams.func1 google.golang.org/grpc@v1.36.0/server.go:876 +0x294 panic: Invalid address to set: []string{"config", "1987373520", "min_item_level"}

goroutine 120 [running]: github.com/rollbar/terraform-provider-rollbar/rollbar.mustSet(...) github.com/rollbar/terraform-provider-rollbar/rollbar/provider.go:117 github.com/rollbar/terraform-provider-rollbar/rollbar.resourceNotificationRead({0xd0f498, 0xc00052a680}, 0x7f06b0704108, {0xb2be80, 0xc00055eae0}) github.com/rollbar/terraform-provider-rollbar/rollbar/resource_notification.go:345 +0x615 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc00012ca80, {0xd0f498, 0xc00052a680}, 0x24, {0xb2be80, 0xc00055eae0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:358 +0x12e github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc00012ca80, {0xd0f498, 0xc00052a680}, 0xc00079c9c0, {0xb2be80, 0xc00055eae0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:635 +0x35b github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc00012e750, {0xd0f498, 0xc00052a680}, 0xc00052a800) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:576 +0x534 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc000156c80, {0xd0f540, 0xc000283020}, 0xc000758f00) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:553 +0x3b0 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xbce1a0, 0xc000156c80}, {0xd0f540, 0xc000283020}, 0xc000758ea0, 0x0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x170 google.golang.org/grpc.(Server).processUnaryRPC(0xc000142700, {0xd1c678, 0xc00047e300}, 0xc000294200, 0xc00046ed50, 0x11fae50, 0x0) google.golang.org/grpc@v1.36.0/server.go:1217 +0xc8f google.golang.org/grpc.(Server).handleStream(0xc000142700, {0xd1c678, 0xc00047e300}, 0xc000294200, 0x0) google.golang.org/grpc@v1.36.0/server.go:1540 +0xa2a google.golang.org/grpc.(Server).serveStreams.func1.2() google.golang.org/grpc@v1.36.0/server.go:878 +0x98 created by google.golang.org/grpc.(Server).serveStreams.func1 google.golang.org/grpc@v1.36.0/server.go:876 +0x294 panic: Invalid address to set: []string{"config", "1987373520", "summary_time"}

goroutine 115 [running]: github.com/rollbar/terraform-provider-rollbar/rollbar.mustSet(...) github.com/rollbar/terraform-provider-rollbar/rollbar/provider.go:117 github.com/rollbar/terraform-provider-rollbar/rollbar.resourceNotificationRead({0xd0f498, 0xc0008241c0}, 0x7fe671104a68, {0xb2be80, 0xc0004b11d0}) github.com/rollbar/terraform-provider-rollbar/rollbar/resource_notification.go:345 +0x615 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc0002a2a80, {0xd0f498, 0xc0008241c0}, 0x24, {0xb2be80, 0xc0004b11d0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:358 +0x12e github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc0002a2a80, {0xd0f498, 0xc0008241c0}, 0xc000a16750, {0xb2be80, 0xc0004b11d0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:635 +0x35b github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc00029a768, {0xd0f498, 0xc0008241c0}, 0xc000a0c000) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:576 +0x534 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc00029cd00, {0xd0f540, 0xc00058dfb0}, 0xc000431aa0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:553 +0x3b0 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xbce1a0, 0xc00029cd00}, {0xd0f540, 0xc00058dfb0}, 0xc000431a40, 0x0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x170 google.golang.org/grpc.(Server).processUnaryRPC(0xc0002b4700, {0xd1c678, 0xc00046e300}, 0xc0005f2100, 0xc00045ed20, 0x11fae50, 0x0) google.golang.org/grpc@v1.36.0/server.go:1217 +0xc8f google.golang.org/grpc.(Server).handleStream(0xc0002b4700, {0xd1c678, 0xc00046e300}, 0xc0005f2100, 0x0) google.golang.org/grpc@v1.36.0/server.go:1540 +0xa2a google.golang.org/grpc.(Server).serveStreams.func1.2() google.golang.org/grpc@v1.36.0/server.go:878 +0x98 created by google.golang.org/grpc.(Server).serveStreams.func1 google.golang.org/grpc@v1.36.0/server.go:876 +0x294

Suggestion

It would be beneficial to report the crash to the plugin's maintainers so it can be fixed. The output above should help diagnose the issue.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Raymondloh2022 commented 1 year ago

Thank you for taking care of this! Appreciate it.

DrewRonchetti commented 1 year ago

Hi, your customer service team suggested we post this here. We were able to recreate the crash in 1.8.0. Let me know if we can provide any additional data.

Stack trace from the terraform-provider-rollbar_v1.8.0 plugin:

panic: Invalid address to set: []string{"config", "1987373520", "summary_time"}

goroutine 46 [running]: github.com/rollbar/terraform-provider-rollbar/rollbar.mustSet(.. github.com/rollbar/terraform-provider-rollbar/rollbar/provider.go:117[github.com/rollbar/terraform-provider-rollbar/rollbar.resourceNotificationRead({0xd10ed8](http://github.com/rollbar/terraform-provider-rollbar/rollbar.resourceNotificationRead(%7B0xd10ed8), 0xc00030a4c0}, 0x7f078da8d3c8, {0xb2d080, 0xc000302f30}) github.com/rollbar/terraform-provider-rollbar/rollbar/resource_notification.go:343 +0x615 [github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc000126a80](http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc000126a80), {0xd10ed8, 0xc00030a4c0}, 0x24, {0xb2d080, 0xc000302f30}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:358 +0x12e [github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc000126a80](http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc000126a80), {0xd10ed8, 0xc00030a4c0}, 0xc00022e1a0, {0xb2d080, 0xc000302f30}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:635 +0x35b [github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc000128750](http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc000128750), {0xd10ed8, 0xc00030a4c0}, 0xc000232fc0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:576 +0x534 [github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc000150c80](http://github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc000150c80), {0xd10f80, 0xc00040e180}, 0xc000098ae0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:553 +0x3b0 [github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xbcf440](http://github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(%7B0xbcf440), 0xc000150c80}, {0xd10f80, 0xc00040e180}, 0xc000098a80, 0x0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x170 [google.golang.org/grpc.(Server).processUnaryRPC(0xc00013c700](http://google.golang.org/grpc.(Server).processUnaryRPC(0xc00013c700), {0xd1e118, 0xc00018e480}, 0xc00029e100, 0xc000468d20, 0x11fce50, 0x0) google.golang.org/grpc@v1.36.0/server.go:1217 +0xc8f [google.golang.org/grpc.(Server).handleStream(0xc00013c700](http://google.golang.org/grpc.(Server).handleStream(0xc00013c700), {0xd1e118, 0xc00018e480}, 0xc00029e100, 0x0) google.golang.org/grpc@v1.36.0/server.go:1540 +0xa2a [google.golang.org/grpc.(Server).serveStreams.func1.2()](http://google.golang.org/grpc.(Server).serveStreams.func1.2())google.golang.org/grpc@v1.36.0/server.go:878 +0x98 created by google.golang.org/grpc.(*Server).serveStreams.func1google.golang.org/grpc@v1.36.0/server.go:876 +0x294 panic: Invalid address to set: []string{"config", "1987373520", "summary_time"}

goroutine 150 [running]: github.com/rollbar/terraform-provider-rollbar/rollbar.mustSet(.. github.com/rollbar/terraform-provider-rollbar/rollbar/provider.go:117[github.com/rollbar/terraform-provider-rollbar/rollbar.resourceNotificationRead({0xd10ed8](http://github.com/rollbar/terraform-provider-rollbar/rollbar.resourceNotificationRead(%7B0xd10ed8), 0xc0005ddbc0}, 0x7f213087e1d8, {0xb2d080, 0xc00051ef90}) github.com/rollbar/terraform-provider-rollbar/rollbar/resource_notification.go:343 +0x615 [github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc00031aa80](http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc00031aa80), {0xd10ed8, 0xc0005ddbc0}, 0x24, {0xb2d080, 0xc00051ef90}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:358 +0x12e [github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc00031aa80](http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc00031aa80), {0xd10ed8, 0xc0005ddbc0}, 0xc00079dba0, {0xb2d080, 0xc00051ef90}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/resource.go:635 +0x35b [github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc000310768](http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc000310768), {0xd10ed8, 0xc0005ddbc0}, 0xc0005ddc40) github.com/hashicorp/terraform-plugin-sdk/v2@v2.10.1/helper/schema/grpc_provider.go:576 +0x534 [github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc0001a2400](http://github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc0001a2400), {0xd10f80, 0xc000607680}, 0xc0004dfbc0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/tf5server/server.go:553 +0x3b0 [github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xbcf440](http://github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(%7B0xbcf440), 0xc0001a2400}, {0xd10f80, 0xc000607680}, 0xc0004dfb60, 0x0) github.com/hashicorp/terraform-plugin-go@v0.5.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x170 [google.golang.org/grpc.(Server).processUnaryRPC(0xc00032c700](http://google.golang.org/grpc.(Server).processUnaryRPC(0xc00032c700), {0xd1e118, 0xc00019c480}, 0xc00024c900, 0xc0001b9c50, 0x11fce50, 0x0) google.golang.org/grpc@v1.36.0/server.go:1217 +0xc8f [google.golang.org/grpc.(Server).handleStream(0xc00032c700](http://google.golang.org/grpc.(Server).handleStream(0xc00032c700), {0xd1e118, 0xc00019c480}, 0xc00024c900, 0x0) google.golang.org/grpc@v1.36.0/server.go:1540 +0xa2a [google.golang.org/grpc.(Server).serveStreams.func1.2()](http://google.golang.org/grpc.(Server).serveStreams.func1.2())google.golang.org/grpc@v1.36.0/server.go:878 +0x98 created by google.golang.org/grpc.(*Server).serveStreams.func1google.golang.org/grpc@v1.36.0/server.go:876 +0x294

Error: The terraform-provider-rollbar_v1.8.0 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.

ghost commented 1 year ago

@DrewRonchetti Thanks for reporting the issue. We'll investigate it.

@pawelsz-rb Can you look into this one? Do you need any additional info to debug the issue?

ghost commented 1 year ago

@DrewRonchetti We tried to reproduce your problem from a clean state, but we couldn't do that successfully. Can you share your TF and TF state files with us? You can send it via email to my address. Alternatively, we can have a debugging session.

DrewRonchetti commented 1 year ago

@rollbar-bborsits We are running this via Terraform Cloud. We are able to build from scratch and recreate the issue. A debug session maybe the best way to show how to recreate? I am currently in MST and open on Fridays.

ghost commented 1 year ago

@DrewRonchetti Got it. Yeah, the debugging session makes more sense then. Are you available for a quick session today?

DrewRonchetti commented 1 year ago

@rollbar-bborsits It looks like terraform cloud updated to 1.3.5. Doing extensive testing this morning, I am unable to reproduce these errors with this new version of terraform. I'll continue to run builds and if I notice anything I'll be sure to let you all know. I appreciate all the help looking into this!

ghost commented 1 year ago

Thanks for getting back to me @DrewRonchetti. I'll close this issue for now, but don't hesitate to reopen it if it still occurs.