terraform-provider-sumologic icon indicating copy to clipboard operation
terraform-provider-sumologic copied to clipboard

Terraform crash in CreateOrUpdateContent

Open mccartney opened this issue 4 years ago • 1 comments

I don't know the steps to reproduce, but one of our CI builds has failed with:

17:32:43  Releasing state lock. This may take a few moments...
17:32:44  
17:32:44  Stack trace from the terraform-provider-sumologic_v2.11.5 plugin:
17:32:44  
17:32:44  panic: runtime error: index out of range [1] with length 1
17:32:44  
17:32:44  goroutine 917 [running]:
17:32:44  github.com/SumoLogic/terraform-provider-sumologic/sumologic.(*Client).CreateOrUpdateContent(0xc00095ee40, 0xc0006d8550, 0x10, 0xc0008a4740, 0x19, 0xc000817a00, 0x9, 0x0, 0x0, 0x18b63d0, ...)
17:32:44  	github.com/SumoLogic/terraform-provider-sumologic/sumologic/sumologic_content.go:104 +0x559
17:32:44  github.com/SumoLogic/terraform-provider-sumologic/sumologic.resourceSumologicContentUpdate(0xc0007aa150, 0x10b2f40, 0xc00095ee40, 0x0, 0x0)
17:32:44  	github.com/SumoLogic/terraform-provider-sumologic/sumologic/resource_sumologic_content.go:98 +0x128
17:32:44  github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000247ae0, 0xc000956cd0, 0xc0005965a0, 0x10b2f40, 0xc00095ee40, 0xf82401, 0xc000baf8d0, 0xc00034d230)
17:32:44  	github.com/hashicorp/[email protected]/helper/schema/resource.go:326 +0x273
17:32:44  github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc00038e000, 0xc000bafa38, 0xc000956cd0, 0xc0005965a0, 0xc0016fd948, 0xc0016cbdb0, 0xf84380)
17:32:44  	github.com/hashicorp/[email protected]/helper/schema/provider.go:294 +0x99
17:32:44  github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc000382008, 0x12ac6d0, 0xc00034c0c0, 0xc0007a62a0, 0xc000382008, 0xc00034c0c0, 0xc0005c4ba0)
17:32:44  	github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:895 +0x8a5
17:32:44  github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x10792a0, 0xc000382008, 0x12ac6d0, 0xc00034c0c0, 0xc0009b0c00, 0x0, 0x12ac6d0, 0xc00034c0c0, 0xc0012ba000, 0x13d76)
17:32:44  	github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3305 +0x214
17:32:44  google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003aba40, 0x12b5d18, 0xc000103680, 0xc0016fc120, 0xc0003887e0, 0x1876a20, 0x0, 0x0, 0x0)
17:32:44  	google.golang.org/[email protected]/server.go:1292 +0x52b
17:32:44  google.golang.org/grpc.(*Server).handleStream(0xc0003aba40, 0x12b5d18, 0xc000103680, 0xc0016fc120, 0x0)
17:32:44  	google.golang.org/[email protected]/server.go:1617 +0xd0c
17:32:44  google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0006d81b0, 0xc0003aba40, 0x12b5d18, 0xc000103680, 0xc0016fc120)
17:32:44  	google.golang.org/[email protected]/server.go:940 +0xab
17:32:44  created by google.golang.org/grpc.(*Server).serveStreams.func1
17:32:44  	google.golang.org/[email protected]/server.go:938 +0x1fd
17:32:44  
17:32:44  Error: The terraform-provider-sumologic_v2.11.5 plugin crashed!
17:32:44  
17:32:44  This is always indicative of a bug within the plugin. It would be immensely
17:32:44  helpful if you could report the crash with the plugin's maintainers so that it
17:32:44  can be fixed. The output above should help diagnose the issue.
17:32:44  

mccartney avatar Jan 11 '22 05:01 mccartney

Not fully sure if this is relevant, but the same CI build had tons of following errors before the crash:

17:32:42  │ Error: Request cancelled
17:32:42  │ 
17:32:42  │   with module.dashboards[0].sumologic_content.dashboards["REDACTED"],
17:32:42  │   on REDACTED/main.tf line 7, in resource "sumologic_content" "dashboards":
17:32:42  │    7: resource "sumologic_content" "dashboards" {
17:32:42  │ 
17:32:42  │ The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.% 

mccartney avatar Jan 11 '22 05:01 mccartney