Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add job_escaped_refs invariant config; include issue's exact reproducer
Add acceptance/bundle/invariant/configs/job_escaped_refs.yml.tmpl to
exercise $${...} escaping through the full plan+deploy path (the
invariant no_drift test). Also include the verbatim reproducer from
the issue (option_a: $${test_var}) in the variables/escape validate test.

Co-authored-by: Isaac
  • Loading branch information
denik committed Sep 2, 2026
commit afb9e3bedc978e85836dae9178498bae1312da3a
20 changes: 20 additions & 0 deletions acceptance/bundle/invariant/configs/job_escaped_refs.yml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
bundle:
name: test-bundle-$UNIQUE_NAME

variables:
catalog:
default: main

resources:
jobs:
foo:
name: test-job-$UNIQUE_NAME
tasks:
- task_key: only_task
notebook_task:
notebook_path: /Shared/notebook
base_parameters:
option_a: $${test_var}
catalog: ${var.catalog}
source_file: $${source_file}
date_range: $${business_date[0..9]}
1 change: 1 addition & 0 deletions acceptance/bundle/invariant/no_drift/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/invariant/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ EnvMatrix.INPUT_CONFIG = [
"job_pydabs_10_tasks.yml.tmpl",
"job_pydabs_1000_tasks.yml.tmpl",
"job_cross_resource_ref.yml.tmpl",
"job_escaped_refs.yml.tmpl",
"job_permission_ref.yml.tmpl",
"job_run.yml.tmpl",
"job_run_job_ref.yml.tmpl",
Expand Down
8 changes: 4 additions & 4 deletions acceptance/bundle/variables/escape/databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ resources:
notebook_task:
notebook_path: /notebooks/ingest
base_parameters:
# $${...} is the escape for a literal ${...} that the Databricks
# runtime should interpret, not the bundle variable system.
# Mixed: ${var.catalog} is a real bundle variable; $${source_file}
# is a literal that should reach the API as "${source_file}".
# Verbatim from the issue: pure escaped reference
option_a: $${test_var}
# Mixed: real bundle variable alongside escaped runtime placeholders
catalog: ${var.catalog}
source_file: $${source_file}
# Escaped reference with brackets (common in date-range patterns)
date_range: $${business_date[0..9]}
1 change: 1 addition & 0 deletions acceptance/bundle/variables/escape/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
{
"catalog": "main",
"date_range": "${business_date[0..9]}",
"option_a": "${test_var}",
"source_file": "${source_file}"
}
2 changes: 1 addition & 1 deletion libs/dyn/dynvar/ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func NewRef(v dyn.Value) (Ref, bool) {
match := make([]string, len(idx)/2)
for i := range len(idx) / 2 {
if idx[2*i] >= 0 {
match[i] = s[idx[2*i] : idx[2*i+1]]
match[i] = s[idx[2*i]:idx[2*i+1]]
}
}
m = append(m, match)
Expand Down
Loading