Compare commits

...

2 Commits

Author SHA1 Message Date
Ilya Kuznetsov 1656bf5506
fix: Remove redundant test 2025-01-21 14:45:56 +01:00
Ilya Kuznetsov 6dd8fc228e fix: Less flaky sed execution 2025-01-21 11:39:18 +01:00
4 changed files with 2 additions and 27 deletions

View File

@ -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

View File

@ -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}

View File

@ -1,3 +0,0 @@
>>> $CLI bundle validate -o json --var=cluster_key=mlops_stacks-cluster
"mlops_stacks-cluster"

View File

@ -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