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

fix schema panic: azurerm_snapshot #2596

Merged
merged 1 commit into from
Jan 4, 2019
Merged

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented Jan 4, 2019

fixes schema panic:

Test ended in panic.

------- Stdout: -------
=== RUN   TestAccDataSourceAzureRMSnapshot_importBasic
=== PAUSE TestAccDataSourceAzureRMSnapshot_importBasic
=== CONT  TestAccDataSourceAzureRMSnapshot_importBasic

------- Stderr: -------
panic: disk_size_gb: '' expected type 'string', got unconvertible type 'int'

goroutine 319 [running]:
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*ResourceData).Set(0xc420542690, 0x240cbe3, 0xc, 0x20b0260, 0xc42072a528, 0x0, 0x0)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/resource_data.go:191 +0x237
github.com/terraform-providers/terraform-provider-azurerm/azurerm.dataSourceArmSnapshotRead(0xc420542690, 0x23cc8e0, 0xc420ee8000, 0xc420542690, 0x0)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/azurerm/data_source_snapshot.go:123 +0x972
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*Resource).ReadDataApply(0xc4202c8fc0, 0xc4204b1c80, 0x23cc8e0, 0xc420ee8000, 0xc420293570, 0xc420291101, 0xc4204b4a40)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/resource.go:290 +0x88
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema.(*Provider).ReadDataApply(0xc4201901c0, 0xc4205e3950, 0xc4204b1c80, 0x0, 0x30, 0xc420ccc000)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/helper/schema/provider.go:426 +0x9a
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform.(*EvalReadDataApply).Eval(0xc4204b1000, 0x2741bc0, 0xc4209f1450, 0x2, 0x2, 0x2402b44, 0x4)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform/eval_read_data.go:122 +0xfe
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform.EvalRaw(0x2708420, 0xc4204b1000, 0x2741bc0, 0xc4209f1450, 0x0, 0x0, 0x0, 0x0)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform/eval.go:53 +0x156
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform.(*EvalSequence).Eval(0xc4204b1060, 0x2741bc0, 0xc4209f1450, 0x2, 0x2, 0x2402b44, 0x4)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform/eval_sequence.go:14 +0x7a
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform.EvalRaw(0x2708520, 0xc4204b1060, 0x2741bc0, 0xc4209f1450, 0x212a320, 0x38afac2, 0x20b0e60, 0xc420742dd0)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform/eval.go:53 +0x156
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform.Eval(0x2708520, 0xc4204b1060, 0x2741bc0, 0xc4209f1450, 0xc4204b1060, 0x2708520, 0xc4204b1060, 0xc4208e9be0)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform/eval.go:34 +0x4d
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform.(*Graph).walk.func1(0x2372760, 0xc4204a9628, 0x0, 0x0)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/terraform/graph.go:126 +0xc26
github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/dag.(*Walker).walkVertex(0xc42048dea0, 0x2372760, 0xc4204a9628, 0xc420727a80)
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/dag/walk.go:387 +0x3a0
created by github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/dag.(*Walker).Update
	/opt/teamcity-agent/work/458e5e4800bd94f6/src/github.com/terraform-providers/terraform-provider-azurerm/vendor/github.com/hashicorp/terraform/dag/walk.go:310 +0x1248

@katbyte katbyte added the bug label Jan 4, 2019
@katbyte katbyte added this to the 1.21.0 milestone Jan 4, 2019
@katbyte katbyte requested a review from a team January 4, 2019 03:13
@ghost ghost added the size/XS label Jan 4, 2019
@katbyte
Copy link
Collaborator Author

katbyte commented Jan 4, 2019

tests:

==> Fixing source code with gofmt...
gofmt -s -w ./azurerm
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -test.run=TestAccDataSourceAzureRMSnapshot -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceAzureRMSnapshot_basic
=== PAUSE TestAccDataSourceAzureRMSnapshot_basic
=== RUN   TestAccDataSourceAzureRMSnapshot_encryption
=== PAUSE TestAccDataSourceAzureRMSnapshot_encryption
=== CONT  TestAccDataSourceAzureRMSnapshot_basic
=== CONT  TestAccDataSourceAzureRMSnapshot_encryption
--- PASS: TestAccDataSourceAzureRMSnapshot_basic (218.23s)
--- PASS: TestAccDataSourceAzureRMSnapshot_encryption (297.96s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	299.122s

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@tombuildsstuff tombuildsstuff merged commit 3e26e9b into master Jan 4, 2019
@tombuildsstuff tombuildsstuff deleted the schema_panic/snapshot branch January 4, 2019 15:34
tombuildsstuff added a commit that referenced this pull request Jan 4, 2019
@ghost
Copy link

ghost commented Mar 5, 2019

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!

@ghost ghost locked and limited conversation to collaborators Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants