Skip to content

Commit

Permalink
Add complex-transitive-deeper acceptance test (#2140)
Browse files Browse the repository at this point in the history
Extension of complex-transitive test that shows an error instead of
simply failing to interpolate.
  • Loading branch information
denik authored Jan 14, 2025
1 parent a5e09ab commit ccb2599
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
bundle:
name: complex-transitive-deeper

variables:
catalog_1:
default:
name: hive_metastore
catalog:
default: ${var.catalog_1}
spark_conf:
default:
"spark.databricks.sql.initial.catalog.name": ${var.catalog.name}
etl_cluster_config:
type: complex
default:
spark_version: 14.3.x-scala2.12
runtime_engine: PHOTON
spark_conf: ${var.spark_conf}

resources:
clusters:
my_cluster: ${var.etl_cluster_config}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Error: expected a map to index "variables.catalog.value.name", found string

{
"my_cluster": "${var.etl_cluster_config}"
}

Exit code: 1
2 changes: 2 additions & 0 deletions acceptance/bundle/variables/complex-transitive-deeper/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Currently, this errors instead of interpolating variables
$CLI bundle validate -o json | jq '.resources.clusters'

0 comments on commit ccb2599

Please sign in to comment.