Skip to content

Commit 6b9d06b

Browse files
committed
acc: say what each test checks and print the relevant JSON
1 parent fb0b340 commit 6b9d06b

8 files changed

Lines changed: 29 additions & 17 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
# bundle.cluster_id replaces new_cluster on every task, also when new_cluster holds a reference.
12
trace $CLI bundle validate -o json | jq '[.resources.jobs.job.tasks[] | {task_key, existing_cluster_id, new_cluster}]'
23
trace $CLI bundle deploy
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
# A target override can replace a null schedule with a reference to another monitor's schedule.
2+
# The deploy request has to carry the schedule of the referenced monitor.
13
trace $CLI bundle deploy
24
trace print_requests.py //tables/main.default.dst/monitor | jq '{schedule: .body.schedule}'

‎acceptance/bundle/resource_deps/whole_map_reference_hides_entries/databricks.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ resources:
1414
jobs:
1515
j:
1616
name: j
17-
# A whole-map reference: the preset's tags added to the typed map stay hidden.
17+
# The whole tags map is a reference, so the preset tag above is not added to it.
1818
tags: ${resources.schemas.s.properties}
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11

2-
>>> [CLI] bundle plan
3-
create jobs.j
4-
create schemas.s
5-
6-
Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
2+
>>> [CLI] bundle plan -o json
3+
{
4+
"tags": {
5+
"owner": "fixed"
6+
},
7+
"depends_on": [
8+
{
9+
"node": "resources.schemas.s",
10+
"label": "${resources.schemas.s.properties}"
11+
}
12+
]
13+
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
trace $CLI bundle plan
1+
# When a whole map is a reference, the entries a preset adds to it are not applied: the job gets the
2+
# tags of the referenced schema only, and depends on the schema.
3+
trace $CLI bundle plan -o json | jq '.plan["resources.jobs.j"] | {tags: .new_state.value.tags, depends_on}'

‎acceptance/bundle/validate/required_struct_reference/databricks.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resources:
1010
target:
1111
cluster_name: target
1212
spark_version: 15.4.x-scala2.12
13-
# clients holds only a reference, so its Go value is zero; it is still set.
13+
# clients is a required field of workload_type. Its only field is a reference.
1414
workload_type:
1515
clients:
1616
jobs: ${resources.clusters.source.is_single_node}
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11

2-
>>> [CLI] bundle validate
3-
Name: test-bundle
4-
Target: default
5-
Workspace:
6-
User: [USERNAME]
7-
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
8-
9-
Validation OK!
2+
>>> [CLI] bundle validate -o json
3+
{
4+
"clients": {
5+
"jobs": "${resources.clusters.source.is_single_node}",
6+
"notebooks": true
7+
}
8+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
trace $CLI bundle validate
1+
# workload_type.clients is required. A clients that only has a reference in it is not reported as missing.
2+
trace $CLI bundle validate -o json | jq .resources.clusters.target.workload_type

0 commit comments

Comments
 (0)