dbt-labs / terraform-provider-dbtcloud

dbt Cloud Terraform Provider
https://registry.terraform.io/providers/dbt-labs/dbtcloud
MIT License
85 stars 19 forks source link

Plugin crashed when updating the dbt_cloud_repository `remote_url` in place #128

Closed alexsweet closed 1 year ago

alexsweet commented 1 year ago

Provider Version: 1.8.0

Steps to reproduce:

│ Error: Plugin did not respond
│ 
│   with dbt_cloud_repository.dbt_repo,
│   on dbt.tf line 12, in resource "dbt_cloud_repository" "dbt_repo":
│   12: resource "dbt_cloud_repository" "dbt_repo" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
╷
│ Error: Plugin did not respond
│ 
│   with dbt_cloud_job.daily-refresh-prod,
│   on dbt.tf line 81, in resource "dbt_cloud_job" "daily-refresh-prod":
│   81: resource "dbt_cloud_job" "daily-refresh-prod" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵
╷
│ Error: Plugin did not respond
│ 
│   with dbt_cloud_job.ci-job,
│   on dbt.tf line 108, in resource "dbt_cloud_job" "ci-job":
│  108: resource "dbt_cloud_job" "ci-job" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵

Stack trace from the terraform-provider-dbt-cloud_v0.1.8 plugin:

panic: interface conversion: interface {} is nil, not bool

goroutine 91 [running]:
github.com/gthesheep/terraform-provider-dbt-cloud/pkg/resources.resourceJobUpdate({0xcccfc8, 0xc000310540}, 0xc000346100, {0xbbab80, 0xc000416b40})
    github.com/gthesheep/terraform-provider-dbt-cloud/pkg/resources/job.go:353 +0x12c7
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0xc0002bab60, {0xccd000, 0xc000[37](https://github.com/goDataDrive/drivesure/actions/runs/4577636158/jobs/8083280077#step:9:38)4870}, 0xd, {0xbbab80, 0xc000416b40})
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.12.0/helper/schema/resource.go:376 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0002bab60, {0xccd000, 0xc000374870}, 0xc000611e10, 0xc000481e80, {0xbbab80, 0xc000416b40})
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.12.0/helper/schema/resource.go:482 +0x785
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00000d158, {0xcccf58, 0xc0006506c0}, 0xc00030e0a0)
    github.com/hashicorp/terraform-plugin-sdk/v2@v2.12.0/helper/schema/grpc_provider.go:1021 +0xdaa
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0002c20a0, {0xccd000, 0xc000489ce0}, 0xc0001b59d0)
    github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/tf5server/server.go:812 +0x56b
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xb9cf20, 0xc0002c20a0}, {0xccd000, 0xc000489ce0}, 0xc000549500, 0x0)
    github.com/hashicorp/terraform-plugin-go@v0.8.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:[38](https://github.com/goDataDrive/drivesure/actions/runs/4577636158/jobs/8083280077#step:9:39)5 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000a8700, {0xcd9d38, 0xc00024cd00}, 0xc00060aa20, 0xc0002d89c0, 0x1197ae0, 0x0)
    google.golang.org/grpc@v1.[45](https://github.com/goDataDrive/drivesure/actions/runs/4577636158/jobs/8083280077#step:9:46).0/server.go:1282 +0xccf
google.golang.org/grpc.(*Server).handleStream(0xc0000a8700, {0xcd9d38, 0xc00024cd00}, 0xc00060aa20, 0x0)
    google.golang.org/grpc@v1.45.0/server.go:1619 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
    google.golang.org/grpc@v1.45.0/server.go:921 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
    google.golang.org/grpc@v1.45.0/server.go:919 +0x294

Error: The terraform-provider-dbt-cloud_v0.1.8 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.
GtheSheep commented 1 year ago

Oh lawd! Thanks for reporting, will take a look!

GtheSheep commented 1 year ago

Hey @alexsweet - any chance you could share your config (values redacted where needed ofc), I just tried this myself and it seemed to destroy and re-create the link with no issues? If it's faff to C+P everything, could you let me know the type/ format of the repository/ url you're linking with? i.e. Github/ url format, etc Thanks!

github-actions[bot] commented 1 year ago

This issue has been marked as Stale because it has been open for 90 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.