Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
bundle:
name: test-bundle
name: test-bundle-$UNIQUE_NAME

resources:
schemas:
schema1:
catalog_name: main
name: MySCHEMA
name: MySCHEMA_$UNIQUE_NAME

volumes:
vol1:
catalog_name: main
schema_name: MySCHEMA
schema_name: MySCHEMA_$UNIQUE_NAME
name: MyVOLUME
volume_type: MANAGED
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Expand All @@ -7,7 +7,7 @@ Deployment complete!
"path": "/api/2.1/unity-catalog/schemas",
"body": {
"catalog_name": "main",
"name": "MySCHEMA"
"name": "MySCHEMA_[UNIQUE_NAME]"
}
}
{
Expand All @@ -16,14 +16,14 @@ Deployment complete!
"body": {
"catalog_name": "main",
"name": "MyVOLUME",
"schema_name": "MySCHEMA",
"schema_name": "MySCHEMA_[UNIQUE_NAME]",
"volume_type": "MANAGED"
}
}
=== Bundle summary shows lowercase IDs after UC normalizes names
{
"schema_id": "main.myschema",
"volume_id": "main.myschema.myvolume"
"schema_id": "main.myschema_[UNIQUE_NAME]",
"volume_id": "main.myschema_[UNIQUE_NAME].myvolume"
}
=== Plan on no-op redeploy: mixed-case names are skipped, not recreated
[
Expand Down Expand Up @@ -55,7 +55,7 @@ Deployment complete!
}
]
=== Redeploy without changes - should be a no-op
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Error: terraform apply: exit status 1

Expand All @@ -7,8 +7,8 @@ Error: Provider produced inconsistent final plan
When expanding the plan for databricks_volume.vol1 to include new values
learned so far during apply, provider
"registry.terraform.io/databricks/databricks" produced an invalid new value
for .schema_name: was cty.StringVal("MySCHEMA"), but now
cty.StringVal("myschema").
for .schema_name: was cty.StringVal("MySCHEMA_[UNIQUE_NAME]"),
but now cty.StringVal("myschema_[UNIQUE_NAME]").

This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Expand All @@ -22,6 +22,6 @@ Exit code: 1
"path": "/api/2.1/unity-catalog/schemas",
"body": {
"catalog_name": "main",
"name": "MySCHEMA"
"name": "MySCHEMA_[UNIQUE_NAME]"
}
}
8 changes: 8 additions & 0 deletions acceptance/bundle/resources/volumes/uppercase-name/script
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
echo "*" > .gitignore
envsubst < databricks.yml.tmpl > databricks.yml

cleanup() {
$CLI bundle destroy --auto-approve &> LOG.destroy
rm -f out.requests.txt
}
trap cleanup EXIT

errcode $CLI bundle deploy &> out.deploy.$DATABRICKS_BUNDLE_ENGINE.txt
print_requests.py //unity-catalog >> out.deploy.$DATABRICKS_BUNDLE_ENGINE.txt

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ RequiresUnityCatalog = true

Ignore = [
".databricks",
"databricks.yml",
]

# TF provider fails with "inconsistent final plan" when schema_name contains
Expand Down
Loading