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

The terraform-provider-snowflake_v0.76.0 plugin crashes when creating a stream #2221

Closed
alexey-vasin opened this issue Nov 28, 2023 · 3 comments
Labels
bug Used to mark issues with provider's incorrect behavior

Comments

@alexey-vasin
Copy link

Terraform CLI and Provider Versions

v0.76.0

Terraform Configuration

n/a

Expected Behavior

Stream is created

Actual Behavior

snowflake_stream.BIOMETRICS_REPORTING_EVENTS_STREAM will be created

  • resource "snowflake_stream" "BIOMETRICS_REPORTING_EVENTS_STREAM" {
    • append_only = true
    • database = "PROD_RAW_TSA_MSK_DB"
    • id = (known after apply)
    • insert_only = false
    • name = "BIOMETRICS_REPORTING_EVENTS_STREAM"
    • on_table = "BIOMETRICS_REPORTING_EVENTS_428720534"
    • owner = (known after apply)
    • schema = "CLEAR_EVENTS"
    • show_initial_rows = false
      }

snowflake_stream.ENROLLMENTS_REPORTING_EVENTS_STREAM will be created

  • resource "snowflake_stream" "ENROLLMENTS_REPORTING_EVENTS_STREAM" {
    • append_only = true
    • database = "PROD_RAW_TSA_MSK_DB"
    • id = (known after apply)
    • insert_only = false
    • name = "ENROLLMENTS_REPORTING_EVENTS_STREAM"
    • on_table = "ENROLLMENTS_REPORTING_EVENTS_1849583178"
    • owner = (known after apply)
    • schema = "CLEAR_EVENTS"
    • show_initial_rows = false
      }

snowflake_stream.airport_reporting_events_stream will be created

  • resource "snowflake_stream" "airport_reporting_events_stream" {
    • append_only = true
    • database = "PROD_RAW_TSA_MSK_DB"
    • id = (known after apply)
    • insert_only = false
    • name = ""airport_reporting_events_stream""
    • on_table = ""AIRPORT_REPORTING_EVENTS_1411665498""
    • owner = (known after apply)
    • schema = ""CLEAR_EVENTS""
    • show_initial_rows = false
      }

Plan: 3 to add, 1 to change, 0 to destroy.
snowflake_stream.airport_reporting_events_stream: Creating...

│ Error: Plugin did not respond

│ The plugin encountered an error, and failed to respond to the
│ plugin6.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.


│ Error: Plugin did not respond

│ The plugin encountered an error, and failed to respond to the
│ plugin6.(*GRPCProvider).ValidateResourceConfig call. The plugin logs may
│ contain more details.


│ Error: Plugin did not respond

│ The plugin encountered an error, and failed to respond to the
│ plugin6.(*GRPCProvider).PlanResourceChange call. The plugin logs may
│ contain more details.


│ Error: Plugin did not respond

│ The plugin encountered an error, and failed to respond to the
│ plugin6.(*GRPCProvider).PlanResourceChange call. The plugin logs may
│ contain more details.

Stack trace from the terraform-provider-snowflake_v0.76.0 plugin:

panic: interface conversion: sdk.ObjectIdentifier is sdk.AccountObjectIdentifier, not sdk.SchemaObjectIdentifier

goroutine 53 [running]:
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources.CreateStream(0x0?, {0x1ced480?, 0xc000615860})
github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources/stream.go:132 +0x1b54
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x2054060?, {0x2054060?, 0xc000f1ef60?}, 0xd?, {0x1ced480?, 0xc000615860?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:766 +0x178
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc00024f0a0, {0x2054060, 0xc000f1ef60}, 0xc000e2bc70, 0xc000926e00, {0x1ced480, 0xc000615860})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:909 +0xa7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc00094ab28, {0x2054060?, 0xc000f1ed80?}, 0xc000f1c780)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1060 +0xe8d
github.com/hashicorp/terraform-plugin-mux/tf5to6server.v5tov6Server.ApplyResourceChange({{0x2073560?, 0xc00094ab28?}}, {0x2054060, 0xc000f1ed80}, 0x0?)
github.com/hashicorp/[email protected]/tf5to6server/tf5to6server.go:37 +0x5a
github.com/hashicorp/terraform-plugin-mux/tf6muxserver.(*muxServer).ApplyResourceChange(0x2053fb8?, {0x2054060?, 0xc000f1ea50?}, 0xc000f1c730)
github.com/hashicorp/[email protected]/tf6muxserver/mux_server_ApplyResourceChange.go:36 +0x1b5
github.com/hashicorp/terraform-plugin-go/tfprotov6/tf6server.(*server).ApplyResourceChange(0xc00083a000, {0x2054060?, 0xc000f1e060?}, 0xc000aa4cb0)
github.com/hashicorp/[email protected]/tfprotov6/tf6server/server.go:857 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov6/internal/tfplugin6._Provider_ApplyResourceChange_Handler({0x1c998c0?, 0xc00083a000}, {0x2054060, 0xc000f1e060}, 0xc000aa4c40, 0x0)
github.com/hashicorp/[email protected]/tfprotov6/internal/tfplugin6/tfplugin6_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00057f4a0, {0x2063ec0, 0xc0001abd40}, 0xc000ec6c60, 0xc00075d080, 0x2d7e8d8, 0x0)
google.golang.org/[email protected]/server.go:1376 +0xdd2
google.golang.org/grpc.(*Server).handleStream(0xc00057f4a0, {0x2063ec0, 0xc0001abd40}, 0xc000ec6c60, 0x0)
google.golang.org/[email protected]/server.go:1753 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/[email protected]/server.go:998 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:996 +0x18c

Error: The terraform-provider-snowflake_v0.76.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.

Steps to Reproduce

  1. terraform apply

How much impact is this issue causing?

High

Logs

https://gist.github.com/alexey-vasin/0776e87babd90a82381c496d0228d068

Additional Information

No response

@alexey-vasin alexey-vasin added the bug Used to mark issues with provider's incorrect behavior label Nov 28, 2023
@sfc-gh-asawicki
Copy link
Collaborator

Hey @alexey-vasin. Thanks for reporting the issue.

Identifiers are lately taking their toll. This is one of the topics we will address globally inside the provider before going to v1.0.0. Please try setting on_table as a fully qualified name (with database and schema). Let me know if this helps.

@alexey-vasin
Copy link
Author

Hey @sfc-gh-asawicki thanks for your suggestion, it worked!

@sfc-gh-asawicki
Copy link
Collaborator

@alexey-vasin, great to hear that!

Can you then close the issue, please? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to mark issues with provider's incorrect behavior
Projects
None yet
Development

No branches or pull requests

2 participants