Fix env_overrides not to use variables in workspace.profile (#2251)

This does not work when this test is run against cloud.

Needed for https://github.com/databricks/cli/pull/2242
This commit is contained in:
Denis Bilenko 2025-01-28 15:22:56 +01:00 committed by GitHub
parent 0256225408
commit 4ba222ab36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -18,12 +18,13 @@ variables:
description: variable with lookup
lookup:
cluster_policy: wrong-cluster-policy
result:
default: ${var.a} ${var.b}
bundle:
name: test bundle
workspace:
profile: ${var.a} ${var.b}
targets:
env-with-single-variable-override:
variables:

View File

@ -36,5 +36,6 @@ Exit code: 1
"b": "prod-b",
"d": "4321",
"e": "1234",
"f": "9876"
"f": "9876",
"result": "default-a prod-b"
}

View File

@ -1,6 +1,6 @@
trace $CLI bundle validate -t env-with-single-variable-override -o json | jq .workspace.profile
trace $CLI bundle validate -t env-with-two-variable-overrides -o json | jq .workspace.profile
trace BUNDLE_VAR_b=env-var-b $CLI bundle validate -t env-with-two-variable-overrides -o json | jq .workspace.profile
trace $CLI bundle validate -t env-with-single-variable-override -o json | jq .variables.result.value
trace $CLI bundle validate -t env-with-two-variable-overrides -o json | jq .variables.result.value
trace BUNDLE_VAR_b=env-var-b $CLI bundle validate -t env-with-two-variable-overrides -o json | jq .variables.result.value
trace errcode $CLI bundle validate -t env-missing-a-required-variable-assignment
trace errcode $CLI bundle validate -t env-using-an-undefined-variable
trace $CLI bundle validate -t env-overrides-lookup -o json | jq '.variables | map_values(.value)'