Skip to content

Commit 2c7cf79

Browse files
Record deployment history for bundle resource bindings
1 parent 33bcce3 commit 2c7cf79

22 files changed

Lines changed: 314 additions & 56 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Record deployment history when binding existing resources with `bundle deployment bind`. ([#7400](https://github.com/databricks/cli/pull/7400))

‎acceptance/bundle/deployment/bind/dashboard/recreation/out.state_after_bind.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"state_version": 3,
33
"cli_version": "[CLI_VERSION]",
44
"lineage": "[UUID]",
5-
"serial": 2,
65
"state": {
76
"resources.dashboards.dashboard1": {
87
"__id__": "[DASHBOARD_ID]",

‎acceptance/bundle/deployment/bind/dashboard/recreation/script‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cleanupRemoveDashboard() {
1313
trap cleanupRemoveDashboard EXIT
1414

1515
trace $CLI bundle deployment bind dashboard1 "${DASHBOARD_ID}" --auto-approve
16-
trace print_state.py --no-dms > out.state_after_bind.json
16+
trace print_state.py --no-dms | jq 'del(.serial, .features)' | nostamp.py --indent 1 > out.state_after_bind.json
1717
ETAG=$(jq '.state["resources.dashboards.dashboard1"].state.etag // .resources[0].instances[0].attributes.etag // "no-etag"' < out.state_after_bind.json)
1818
echo $ETAG
1919
add_repl $ETAG ETAG
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
>>> [CLI] bundle deployment bind feature1 main.myschema.boundfeature --auto-approve
3+
Successfully bound feature with an id 'main.myschema.boundfeature'
4+
Run 'bundle deploy' to deploy changes to your workspace
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
>>> [CLI] bundle deployment bind feature1 main.myschema.boundfeature --auto-approve
3+
Warn: Failed to record bind history: failed to create deployment version: operations.resource_key must have a known resource type prefix (e.g. 'jobs.', 'pipelines.'): features.feature1
4+
Successfully bound feature with an id 'main.myschema.boundfeature'
5+
Run 'bundle deploy' to deploy changes to your workspace
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Cloud = false
2-
EnvMatrix.DMS = ["", "true"]
2+
EnvMatrix.DMS = ["false", "true"]

‎acceptance/bundle/deployment/bind/feature/output.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11

2-
>>> [CLI] bundle deployment bind feature1 main.myschema.boundfeature --auto-approve
3-
Successfully bound feature with an id 'main.myschema.boundfeature'
4-
Run 'bundle deploy' to deploy changes to your workspace
5-
62
>>> [CLI] bundle summary
73
Name: test-bundle
84
Target: default

‎acceptance/bundle/deployment/bind/feature/script‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
trace $CLI bundle deployment bind feature1 main.myschema.boundfeature --auto-approve
1+
trace $CLI bundle deployment bind feature1 main.myschema.boundfeature --auto-approve 2> out.bind.$DMS.txt
22
trace $CLI bundle summary
33

44
trace $CLI bundle deployment unbind feature1

‎acceptance/bundle/deployment/bind/feature/test.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
EnvMatrix.DMS = ["false", "true"]
2+
EnvVaryOutput = "DMS"
13
Cloud = false
24

35
Ignore = [

‎acceptance/bundle/deployment/bind/pipelines/recreate/script‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ rm -f "$OUT_REQUESTS"
1212
trace $CLI bundle deployment bind foo $NEW_PIPELINE_ID --auto-approve &> out.bind-success.txt
1313
trace print_requests.py '^//import-file/' '^//workspace/'
1414

15-
trace $CLI bundle summary -o json | jq .resources > out.summary.json
15+
trace $CLI bundle summary -o json | jq .resources | nostamp.py > out.summary.json
1616
trace $CLI bundle plan
1717

1818
trace musterr $CLI bundle deploy

0 commit comments

Comments
 (0)