-
Notifications
You must be signed in to change notification settings - Fork 64
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
Reading variables from file #2171
base: main
Are you sure you want to change the base?
Changes from 24 commits
a794490
3f0b5f8
a75c6af
66dae81
d0db1d7
2c9adcb
15c9c5c
01a6a66
c5109cd
f52423c
2a1c4d1
bdb8f1e
19b5018
44aba7e
e4164c1
bfec3c4
6dd8fc2
1656bf5
422585c
47c8fb3
6f20e88
ad6343a
e0c81f0
38b7d27
3e1a335
229fdb2
6e8f5f3
cf42459
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Error: no value assigned to required variable a. Assignment can be done through the "--var" flag or by setting the BUNDLE_VAR_a environment variable | ||
Error: no value assigned to required variable a. Assignment can be done using "--var" or "--var-file", by setting the BUNDLE_VAR_a environment variable, or in .databricks/bundle/<target>/vars.json file | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any other suggestions for good user message are welcome! It became quite complicated |
||
Name: empty${var.a} | ||
Target: default | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"cluster": { | ||
"node_type_id": "Standard_DS3_v3" | ||
}, | ||
"cluster_key": "mlops_stacks-cluster-2", | ||
"cluster_workers": 9 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!.databricks |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
bundle: | ||
name: TestResolveVariablesFromFile | ||
|
||
variables: | ||
cluster: | ||
type: "complex" | ||
cluster_key: | ||
cluster_workers: | ||
|
||
resources: | ||
jobs: | ||
job1: | ||
job_clusters: | ||
- job_cluster_key: ${var.cluster_key} | ||
new_cluster: | ||
node_type_id: "${var.cluster.node_type_id}" | ||
num_workers: ${var.cluster_workers} | ||
|
||
targets: | ||
with-defaults: | ||
default: true | ||
variables: | ||
cluster_workers: | ||
default: 1 | ||
cluster: | ||
type: "complex" | ||
default: | ||
node_type_id: "default" | ||
cluster_key: | ||
default: "default" | ||
|
||
without-defaults: | ||
|
||
# see .databricks/bundle/default_target/ for variable values | ||
with-default-variable-file: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need a target here? The default variables are read for any target, right? so it's the same as without-defaults. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made separate target to avoid affecting other tests by this default There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. E.g. I put |
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.
This
default
message is hardcoded to avoid having invalid path value in variable