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

A panic when importing a metric #37

Open
nikolay opened this issue Feb 24, 2021 · 3 comments
Open

A panic when importing a metric #37

nikolay opened this issue Feb 24, 2021 · 3 comments

Comments

@nikolay
Copy link

nikolay commented Feb 24, 2021

$ terraform import 'statuspage_metric.metrics["pingdom_docs"]' '[REDACTED]/[REDACTED]'
statuspage_metric.metrics["pingdom_docs"]: Importing from ID "[REDACTED]/[REDACTED]"...

Error: rpc error: code = Unavailable desc = transport is closing


panic: runtime error: invalid memory address or nil pointer dereference
2021-02-23T16:56:13.529-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x19e8bb6]
2021-02-23T16:56:13.529-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7:
2021-02-23T16:56:13.529-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: goroutine 14 [running]:
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: github.com/yannh/terraform-provider-statuspage/statuspage.resourceMetricRead(0xc0001a8150, 0x1aeb520, 0xc000204280, 0x1a7b8e0, 0xc0004bea70)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	github.com/yannh/terraform-provider-statuspage/statuspage/resource_metric.go:83 +0x816
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: github.com/yannh/terraform-provider-statuspage/statuspage.resourceMetricImport(0xc0001a8150, 0x1aeb520, 0xc000204280, 0x11, 0xc0004c0578, 0xc000681601, 0x0, 0x10747fc)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	github.com/yannh/terraform-provider-statuspage/statuspage/resource_metric.go:146 +0x4d5
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: github.com/hashicorp/terraform/helper/schema.(*Provider).ImportState(0xc00019cb00, 0xc000149990, 0xc00069c0a0, 0x19, 0xc000202510, 0xc000202518, 0xc000149910, 0x13d83e5, 0xc0001100c0)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	github.com/hashicorp/[email protected]/helper/schema/provider.go:381 +0x286
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: github.com/hashicorp/terraform/helper/plugin.(*GRPCProviderServer).ImportResourceState(0xc00000ea58, 0x1d93580, 0xc0002024e0, 0xc0002c0180, 0xc00000ea58, 0xc0002024e0, 0xc000141a48)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	github.com/hashicorp/[email protected]/helper/plugin/grpc_provider.go:970 +0xd3
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: github.com/hashicorp/terraform/internal/tfplugin5._Provider_ImportResourceState_Handler(0x1bdd3c0, 0xc00000ea58, 0x1d93580, 0xc0002024e0, 0xc000098370, 0x0, 0x1d93580, 0xc0002024e0, 0xc0001100c0, 0x2e)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3235 +0x214
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000682c00, 0x1d9cdc0, 0xc000210d80, 0xc000120200, 0xc00010e5d0, 0x232fb58, 0x0, 0x0, 0x0)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	google.golang.org/[email protected]/server.go:966 +0x486
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: google.golang.org/grpc.(*Server).handleStream(0xc000682c00, 0x1d9cdc0, 0xc000210d80, 0xc000120200, 0x0)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	google.golang.org/[email protected]/server.go:1245 +0xcac
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc0001161c0, 0xc000682c00, 0x1d9cdc0, 0xc000210d80, 0xc000120200)
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	google.golang.org/[email protected]/server.go:685 +0xa5
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: created by google.golang.org/grpc.(*Server).serveStreams.func1
2021-02-23T16:56:13.530-0800 [DEBUG] plugin.terraform-provider-statuspage_v0.1.7: 	google.golang.org/[email protected]/server.go:683 +0xa5
2021-02-23T16:56:13.532-0800 [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/yannh/statuspage/0.1.7/darwin_amd64/terraform-provider-statuspage_v0.1.7 pid=30712 error="exit status 2"
2021/02/23 16:56:13 [ERROR] eval: *terraform.EvalImportState, err: rpc error: code = Unavailable desc = transport is closing
2021/02/23 16:56:13 [ERROR] eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2021/02/23 16:56:13 [TRACE] [walkImport] Exiting eval tree: statuspage_metric.metrics["pingdom_docs"] (import id "ym160lg4ny6r/vn8xp667dt7w")
2021/02/23 16:56:13 [TRACE] vertex "statuspage_metric.metrics[\"pingdom_docs\"] (import id \"ym160lg4ny6r/vn8xp667dt7w\")": visit complete
2021/02/23 16:56:13 [TRACE] dag/walk: upstream of "provider[\"registry.terraform.io/yannh/statuspage\"] (close)" errored, so skipping
2021/02/23 16:56:13 [TRACE] dag/walk: upstream of "root" errored, so skipping
2021-02-23T16:56:13.680-0800 [DEBUG] plugin: plugin exited



!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Terraform crashed! This is always indicative of a bug within Terraform.
A crash log has been placed at "crash.log" relative to your current
working directory. It would be immensely helpful if you could please
report the crash with Terraform[1] so that we can fix this.

When reporting bugs, please include your terraform version. That
information is available on the first line of crash.log. You can also
get it by running 'terraform --version' on the command line.

SECURITY WARNING: the "crash.log" file that was created may contain
sensitive information that must be redacted before it is safe to share
on the issue tracker.

[1]: https://github.com/hashicorp/terraform/issues

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!
@yannh
Copy link
Owner

yannh commented Mar 27, 2021

Thanks for the report, I will look into this soon 👍 Sorry for the delayed answer I missed the notification.

@yannh
Copy link
Owner

yannh commented Mar 31, 2021

Hi @nikolay , I've tentatively fixed this from your crash report, it looks like statuspage is not always consistent with what parameters are present in the response for some endpoints - released v0.1.8, let me know if it fixes your problem 🙏

@promaty
Copy link
Contributor

promaty commented May 19, 2021

Hey I get errors as well. I just tried specifying v0.1.8 it doesn't exist:

Could not retrieve the list of available versions for provider yannh/statuspage: no available releases match the given constraints 0.1.8

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

3 participants