-
Notifications
You must be signed in to change notification settings - Fork 460
[Fix] Tables with struct subcolumns which have dot in their name are redeployed on databricks_sql_table resource #3866 #4001
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
Conversation
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.
Thank you for raising this PR. The code changes look fine, but we should definitely add a test to ensure this works as expected. You mentioned running internal integration tests. Can you add one in internal/acceptance/sql_table_test.go
? The integration tests are not very straightforward to run for external contributors now, but if you can at least add one, that would be terrific, and I can help make sure it works as expected.
Hi @p-venclovas, thanks for reaching out. This was recently raised -- regarding earlier comments, could you help add integration tests as mentioned here: #4001 (review). It should be similar to other integration tests. Then I can help run these tests on our infrastructure / add changes if required. |
@tanmay-db this one is difficult to create an integration test, as it requires an external table with struct column - I tested this locally and it works |
Head branch was pushed to by a user without write access
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Miles is on leave and all requested changes were made
## Release v1.86.0 ### Breaking Changes * Do not set `run_as from run_as_user_name in DLT pipelines. This fixes an issue where the value for run_as was unintentionally cached in the terraform state. More details and the workaround are specified in the PR: ([#4886](#4886)) ### New Features and Improvements * Don't redeploy `databricks_sql_table` for tables with struct subcolumns ([#4001](#4001)). * Added ability to add `comment` when defining a new `databricks_share` ([#4802](#4802)) * Added output attribute `endpoint_url` in `databricks_model_serving` ([#4877](#4877)). * Deprecate `egg` library type in `databricks_cluster`, `databricks_job`, and `databricks_library` ([#4881](#4881)). * Support `databricks_service_principal_secret` on workspace level ([#4896](#4896)). * Added resources and data sources for `databricks_clean_room_asset`, `databricks_clean_room_auto_approval_rule` and `databricks_clean_room_asset_revisions_clean_room_asset` ([#4907](#4907)). ### Bug Fixes * Corrected accidentally removed `SpID` field from `databricks_service_principal` ([#4868](#4868)). * Corrected optional fields in `databricks_mws_ncc_private_endpoint_rule`([#4856](#4856)). * Fix handling of `force` option in `databricks_git_credential` ([#4873](#4873)). * Restricted create or replace statement to managed tables in `databricks_sql_table`([#4874](#4874)). * Mitigate issue due to internal caching in `databricks_secret_acl` by retrying until ACL are applied with the right permission ([#4885](#4885)). * Fix schema mismatch bug in `databricks_functions` data source ([#4902](#4902)). * Set suppressDiff on string_shared_as in the Legacy databricks_share Resource ([#4904](#4904)). ### Documentation * Updated `share` documentation to be more in line with Terraform styling ([#4802](#4802)) * Refreshed `databricks_job` documentation ([#4861](#4861)). * Document `environment` block in `databricks_pipeline` ([#4878](#4878)). * Updated documentation for `databricks_disable_legacy_dbfs_setting` resource ([#4870](#4870)). * Add deprecation notice to `databricks_dbfs_file` and `databricks_mount` ([#4876](#4876)) * Updated documentation for `databricks_disable_legacy_features_setting` resource ([#4884](#4884)). * Improve docs for `databricks_compliance_security_profile_setting` ([#4880](#4880)). * Improve instructions for the Terraform Exporter ([#4892](#4892)). * Improve documentation for service principal data sources ([#4900](#4900)). * Add warning about disabling legacy features and default catalog ([#4905](#4905)). * Improve documentation for grants resources ([#4906](#4906)) ### Exporter * Added support for exporting of workspaces and related resources ([#4899](#4899)). ### Internal Changes * Promote Plugin Framework Share Resource to Production ([#4846](#4846)). * Update Go SDK to v0.79.0 ([#4907](#4907)).
Changes
Backticks are removed from the column type in order for struct subfield names to be compatible with the subfield names deployed. These subfields names are part of the column type. Example struct<`x.z`:string> == struct<x.z:string>
Tests
make test
run locallytested using internal integration tests where tables were created and terraform plans were reviewed to have no changes.