Closed jaredscheib closed 4 years ago
It turns out this was because we were trying to pass nil
values that we failed to use the required
function for in our chart templates, and the helm linter was failing there. And these helm lint failures caused the above Go panic downstream.
Same here
Acquiring state lock. This may take a few moments...
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
------------------------------------------------------------------------
Warning: "set_string": [DEPRECATED] This argument is deprecated and will be removed in the next major version. Use `set` argument with `type` equals to `string`
on main.tf line 1, in resource "helm_release" "mercuryapp":
1: resource "helm_release" "mercuryapp" {
Error: rpc error: code = Unavailable desc = transport is closing
Error: rpc error: code = Unavailable desc = transport is closing
Error: rpc error: code = Unavailable desc = transport is closing
panic: runtime error: index out of range [1] with length 1
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4:
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: goroutine 33 [running]:
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/terraform-providers/terraform-provider-helm/helm.resultToError(0xc000ad7980, 0xc00094b420, 0x1)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/helm/resource_release.go:1036 +0x2e4
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/terraform-providers/terraform-provider-helm/helm.lintChart(0xc0002473b0, 0xc0003d6e20, 0x15, 0xc00013eb40, 0xc000ab6030, 0x15, 0x0)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/helm/resource_release.go:1022 +0x106
crash.log
2020-05-07T03:36:40.800Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4:
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: panic: runtime error: index out of range [1] with length 1
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4:
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: goroutine 33 [running]:
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/terraform-providers/terraform-provider-helm/helm.resultToError(0xc000ad7980, 0xc00094b420, 0x1)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/helm/resource_release.go:1036 +0x2e4
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/terraform-providers/terraform-provider-helm/helm.lintChart(0xc0002473b0, 0xc0003d6e20, 0x15, 0xc00013eb40, 0xc000ab6030, 0x15, 0x0)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/helm/resource_release.go:1022 +0x106
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/terraform-providers/terraform-provider-helm/helm.resourceReleaseValidate(0x2448600, 0xc000a38f40, 0x1e57f20, 0xc0002473b0, 0xc00013eb40, 0xc00013e3f0, 0xc0004a8780)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/helm/resource_release.go:1010 +0x181
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/terraform-providers/terraform-provider-helm/helm.resourceDiff(0xc000a38f40, 0x1e57f20, 0xc0002473b0, 0xc0009936a0, 0xc000a38f40)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/helm/resource_release.go:651 +0x175
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.schemaMap.Diff(0xc0004038f0, 0xc000786820, 0xc00097cc60, 0x2150258, 0x1e57f20, 0xc0002473b0, 0x1ca4100, 0x249be00, 0xffffffffffffffff, 0x0)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/schema.go:518 +0xac2
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).simpleDiff(0xc00039f3b0, 0xc000786820, 0xc00097cc60, 0x1e57f20, 0xc0002473b0, 0xc00097cc01, 0xc00094b840, 0x40d49d)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/resource.go:356 +0x85
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).SimpleDiff(0xc000675980, 0xc00094ba28, 0xc000786820, 0xc00097cc60, 0xc000914d50, 0xc00097cc60, 0x0)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/github.com/hashicorp/terraform-plugin-sdk/helper/schema/provider.go:321 +0x99
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).PlanResourceChange(0xc00000ea10, 0x249a800, 0xc000914cf0, 0xc0007da0e0, 0xc00000ea10, 0xc000914cf0, 0xc000889b30)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin/grpc_provider.go:633 +0x793
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_PlanResourceChange_Handler(0x1fc6c40, 0xc00000ea10, 0x249a800, 0xc000914cf0, 0xc00091a120, 0x0, 0x249a800, 0xc000914cf0, 0xc00091d300, 0x105f)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5/tfplugin5.pb.go:3287 +0x217
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: google.golang.org/grpc.(*Server).processUnaryRPC(0xc000275200, 0x24c2d00, 0xc000275e00, 0xc00011e700, 0xc000602540, 0x3506608, 0x0, 0x0, 0x0)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/google.golang.org/grpc/server.go:1024 +0x4f4
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: google.golang.org/grpc.(*Server).handleStream(0xc000275200, 0x24c2d00, 0xc000275e00, 0xc00011e700, 0x0)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/google.golang.org/grpc/server.go:1313 +0xd97
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00048e870, 0xc000275200, 0x24c2d00, 0xc000275e00, 0xc00011e700)
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/google.golang.org/grpc/server.go:722 +0xbb
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: created by google.golang.org/grpc.(*Server).serveStreams.func1
2020-05-07T03:36:40.804Z [DEBUG] plugin.terraform-provider-helm_v1.2.0_x4: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-helm/vendor/google.golang.org/grpc/server.go:720 +0xa1
2020-05-07T03:36:40.807Z [DEBUG] plugin: plugin process exited: path=/home/azuredevopsuser/agent/agent-1/_work/1/s/build/terraform-mercuryapp/.terraform/plugins/linux_amd64/terraform-provider-helm_v1.2.0_x4 pid=25560 error="exit status 2"
2020/05/07 03:36:40 [ERROR] <root>: eval: *terraform.EvalDiff, err: rpc error: code = Unavailable desc = transport is closing
2020/05/07 03:36:40 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/05/07 03:36:40 [TRACE] [walkPlan] Exiting eval tree: helm_release.provider0
2020/05/07 03:36:40 [ERROR] <root>: eval: *terraform.EvalDiff, err: rpc error: code = Unavailable desc = transport is closing
2020/05/07 03:36:40 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/05/07 03:36:40 [TRACE] [walkPlan] Exiting eval tree: helm_release.provider1
2020/05/07 03:36:40 [TRACE] vertex "helm_release.provider1": visit complete
2020/05/07 03:36:40 [ERROR] <root>: eval: *terraform.EvalDiff, err: rpc error: code = Unavailable desc = transport is closing
2020/05/07 03:36:40 [TRACE] vertex "helm_release.provider1": dynamic subgraph encountered errors
2020/05/07 03:36:40 [ERROR] <root>: eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2020/05/07 03:36:40 [TRACE] [walkPlan] Exiting eval tree: helm_release.mercuryapp
2020/05/07 03:36:40 [TRACE] vertex "helm_release.mercuryapp": visit complete
2020/05/07 03:36:40 [TRACE] vertex "helm_release.provider0": visit complete
2020/05/07 03:36:40 [TRACE] vertex "helm_release.mercuryapp": dynamic subgraph encountered errors
2020/05/07 03:36:40 [TRACE] vertex "helm_release.provider0": dynamic subgraph encountered errors
2020/05/07 03:36:40 [TRACE] vertex "helm_release.provider0": visit complete
2020/05/07 03:36:40 [TRACE] dag/walk: upstream of "output.provider0_release_name" errored, so skipping
2020/05/07 03:36:40 [TRACE] vertex "helm_release.provider1": visit complete
2020/05/07 03:36:40 [TRACE] dag/walk: upstream of "output.provider1_release_name" errored, so skipping
2020/05/07 03:36:40 [TRACE] vertex "helm_release.mercuryapp": visit complete
2020/05/07 03:36:40 [TRACE] dag/walk: upstream of "provider.helm (close)" errored, so skipping
2020/05/07 03:36:40 [TRACE] dag/walk: upstream of "output.release_name" errored, so skipping
2020/05/07 03:36:40 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2020/05/07 03:36:40 [TRACE] dag/walk: upstream of "root" errored, so skipping
2020/05/07 03:36:40 [INFO] backend/local: plan operation completed
2020-05-07T03:36:41.086Z [DEBUG] plugin: plugin exited
I am getting the same error when trying to install this chart.
https://hub.helm.sh/charts/stable/datadog
If run a helm pull
on this chart and then helm lint
passing in the same values that I am providing to the helm_release resource, the lint command works fine.
I think this linting functionality might need a second look or at least better error propagation. I'm going to be pinning back to 1.1.1 for the time being.
OK - I was able to reproduce this. Thanks for opening this issue and investigating @jaredscheib.
The problem is this line: resource_release.go#L1036
This code assumes that the number of items in r.Messages
with an Err
value that is not nil will be the same length as r.Errors
, but this is not the case as there appears to be warnings that will have an Err
value but not appear in the r.Errors
list.
I'll have a PR with a fix for this shortly.
Thanks @jrhouston and all! And thanks to @preichenberger for helping debug this on my end.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Provider Version
1.2.0
Terraform Version
v0.12.24
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Steps to Reproduce
terraform apply
Important Factoids
Running this as a CircleCI job:
References
I notice at https://github.com/terraform-providers/terraform-provider-aws/issues/11420 that they determined that they needed to introduce greater defensiveness on the input value, but I don't know if this is at all related, just a similar error. I'm mid-debugging, so I'll update if I find out more.