-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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_column for azurerm_data_factory_dataset_snowflake resource #13344
Fix schema_column for azurerm_data_factory_dataset_snowflake resource #13344
Conversation
Merge main master from fork
Merge with master
Merge new releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix @orestiskats19 - have a couple quesions/comments i've left inline
"Byte", | ||
"Byte[]", | ||
"Boolean", | ||
"Date", | ||
"DateTime", | ||
"DateTimeOffset", | ||
"Decimal", | ||
"Double", | ||
"Guid", | ||
"Int16", | ||
"Int32", | ||
"Int64", | ||
"Single", | ||
"String", | ||
"TimeSpan", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we cannot remove these until 3.0 - can we add a comment to that affect and leave these in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing my PR @katbyte. Why we can't replace those with the right data types of Snowflake? Don't think it works as it is now...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone might have a confid with it somewhere, that maybe hasn't run for a while and used to work and the API is returning these old values - we don't want tf to suddenly fail so we need to keep them around until 3.0 (which is in the next 6 months) - as such this would be a breaking change we can only make then
}, false), | ||
}, | ||
"description": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come we are removing the description property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that the description property is used only for the structure column (used in other resources) and not for the snowflake schema column. For every column in Snowflake the properties are name, type, precision and scale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh ok. as above removing this is a breaking change even if it currently does nothing, could we instead deprecate it and we'll remove it in 3.0 - thanks!
…umn to structure_column
Thanks @katbyte. I did a step back and made it backwards compatible with structure column. It is renamed now from schema_column to structure_column. Acceptance tests: ==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test -v ./internal/services/datafactory/data_factory_dataset_snowflake_resource_test.go -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN TestAccDataFactoryDatasetSnowflake_basic
=== PAUSE TestAccDataFactoryDatasetSnowflake_basic
=== RUN TestAccDataFactoryDatasetSnowflake_update
=== PAUSE TestAccDataFactoryDatasetSnowflake_update
=== CONT TestAccDataFactoryDatasetSnowflake_basic
=== CONT TestAccDataFactoryDatasetSnowflake_update
--- PASS: TestAccDataFactoryDatasetSnowflake_basic (221.14s)
--- PASS: TestAccDataFactoryDatasetSnowflake_update (303.24s)
PASS
ok command-line-arguments 304.599s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @orestiskats19 - overall looks great! however i'm guessing the intent is to replace the old colum with the new one so we should probably deprecate it and point users to the new one?
@@ -107,7 +107,7 @@ func resourceDataFactoryDatasetSnowflake() *pluginsdk.Resource { | |||
}, | |||
}, | |||
|
|||
"schema_column": { | |||
"structure_column": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably deprecate this property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @katbyte, I added the deprecated warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes @orestiskats19 - this LGTM now 🚀
For some additional context - after merge when preparing the changelog message i realized this is a breaking change as the wrong block was being assigned to the wrong property. After toying with changing it/reverting it back to its mostly broken state we decided to keep this as is and detail it in the upgrade notes. If you wish to retain the old behaviour please change schema_column to structure_column. |
This functionality has been released in v2.78.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Acceptance Tests: