mirror of https://github.com/databricks/cli.git
Compare commits
2 Commits
bfec3c48fe
...
1656bf5506
Author | SHA1 | Date |
---|---|---|
|
1656bf5506 | |
|
6dd8fc228e |
acceptance/bundle/variables
|
@ -10,7 +10,8 @@ trace $CLI bundle validate -o json --var="cluster_key=mlops_stacks-cluster" | jq
|
|||
trace errcode $CLI bundle validate -o json --var-file=var_files/normal.json --var="cluster_key=mlops_stacks-cluster" | jq $cluster_expr
|
||||
|
||||
# file not found
|
||||
trace errcode $CLI bundle validate -o json --var-file=var_files/not_found.json 2> >(sed 's/\(Error: failed to read variables file: open var_files\/not_found.json:\).*/\1<stripped>/' >&2) | jq -b $cluster_expr
|
||||
trace errcode $CLI bundle validate -o json --var-file=var_files/not_found.json 2> >(sed 's/\(Error: failed to read variables file: open var_files\/not_found.json:\).*/\1<stripped>/' >&2) > tmp.txt
|
||||
jq "$cluster_expr" tmp.txt
|
||||
|
||||
# file cannot be parsed
|
||||
trace errcode $CLI bundle validate -o json --var-file=var_files/invalid_json.json | jq $cluster_expr
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
bundle:
|
||||
name: TestResolveVariablesFromFlag
|
||||
|
||||
variables:
|
||||
cluster:
|
||||
type: "complex"
|
||||
default:
|
||||
node_type_id: "undefined"
|
||||
cluster_key:
|
||||
default: "undefined"
|
||||
cluster_workers:
|
||||
default: 1
|
||||
|
||||
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}
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
>>> $CLI bundle validate -o json --var=cluster_key=mlops_stacks-cluster
|
||||
"mlops_stacks-cluster"
|
|
@ -1,2 +0,0 @@
|
|||
# single flag
|
||||
trace $CLI bundle validate -o json --var="cluster_key=mlops_stacks-cluster" | jq .resources.jobs.job1.job_clusters[0].job_cluster_key
|
Loading…
Reference in New Issue