Skip to content

Commit 47e1a14

Browse files
Update DMS acceptance tests: inline request printing, add resource operations
- Print DMS requests inline in output.txt via print_requests.py - Update sequential-deploys to test create/delete across deploys - Add protoLogs replacement to stabilize flaky telemetry timing - Regenerate out.requests.txt golden files Co-authored-by: Isaac
1 parent 6592ee9 commit 47e1a14

20 files changed

Lines changed: 4700 additions & 604 deletions

File tree

acceptance/bundle/dms/add-resources/out.requests.txt

Lines changed: 1121 additions & 0 deletions
Large diffs are not rendered by default.

acceptance/bundle/dms/add-resources/output.txt

Lines changed: 10 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -13,139 +13,13 @@ Deployment complete!
1313
Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
1414

1515
>>> print_requests.py --get //bundle ^//workspace-files ^//import-file
16-
{
17-
"method": "POST",
18-
"path": "/api/2.0/bundle/deployments",
19-
"q": {
20-
"deployment_id": "[UUID]"
21-
},
22-
"body": {
23-
"target_name": "default"
24-
}
25-
}
26-
{
27-
"method": "GET",
28-
"path": "/api/2.0/bundle/deployments/[UUID]"
29-
}
30-
{
31-
"method": "POST",
32-
"path": "/api/2.0/bundle/deployments/[UUID]/versions",
33-
"q": {
34-
"version_id": "1"
35-
},
36-
"body": {
37-
"cli_version": "[DEV_VERSION]",
38-
"version_type": "VERSION_TYPE_DEPLOY",
39-
"target_name": "default"
40-
}
41-
}
42-
{
43-
"method": "POST",
44-
"path": "/api/2.0/bundle/deployments/[UUID]/versions/1/operations",
45-
"q": {
46-
"resource_key": "jobs.job_a"
47-
},
48-
"body": {
49-
"resource_key": "jobs.job_a",
50-
"action_type": "OPERATION_ACTION_TYPE_CREATE",
51-
"state": {
52-
"deployment": {
53-
"kind": "BUNDLE",
54-
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/add-resources-test/default/state/metadata.json"
55-
},
56-
"edit_mode": "UI_LOCKED",
57-
"format": "MULTI_TASK",
58-
"max_concurrent_runs": 1,
59-
"name": "job-a",
60-
"queue": {
61-
"enabled": true
62-
}
63-
},
64-
"resource_id": "[NUMID]",
65-
"status": "OPERATION_STATUS_SUCCEEDED"
66-
}
67-
}
68-
{
69-
"method": "POST",
70-
"path": "/api/2.0/bundle/deployments/[UUID]/versions/1/complete",
71-
"body": {
72-
"name": "deployments/[UUID]/versions/1",
73-
"completion_reason": "VERSION_COMPLETE_SUCCESS"
74-
}
75-
}
76-
{
77-
"method": "GET",
78-
"path": "/api/2.0/bundle/deployments/[UUID]/resources",
79-
"q": {
80-
"page_size": "1000"
81-
},
82-
"body": null
83-
}
84-
{
85-
"method": "POST",
86-
"path": "/api/2.0/bundle/deployments",
87-
"q": {
88-
"deployment_id": "[UUID]"
89-
},
90-
"body": {
91-
"target_name": "default"
92-
}
93-
}
94-
{
95-
"method": "GET",
96-
"path": "/api/2.0/bundle/deployments/[UUID]"
97-
}
98-
{
99-
"method": "POST",
100-
"path": "/api/2.0/bundle/deployments/[UUID]/versions",
101-
"q": {
102-
"version_id": "2"
103-
},
104-
"body": {
105-
"cli_version": "[DEV_VERSION]",
106-
"version_type": "VERSION_TYPE_DEPLOY",
107-
"target_name": "default"
108-
}
109-
}
110-
{
111-
"method": "POST",
112-
"path": "/api/2.0/bundle/deployments/[UUID]/versions/2/operations",
113-
"q": {
114-
"resource_key": "jobs.job_b"
115-
},
116-
"body": {
117-
"resource_key": "jobs.job_b",
118-
"action_type": "OPERATION_ACTION_TYPE_CREATE",
119-
"state": {
120-
"deployment": {
121-
"kind": "BUNDLE",
122-
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/add-resources-test/default/state/metadata.json"
123-
},
124-
"edit_mode": "UI_LOCKED",
125-
"format": "MULTI_TASK",
126-
"max_concurrent_runs": 1,
127-
"name": "job-b",
128-
"queue": {
129-
"enabled": true
130-
}
131-
},
132-
"resource_id": "[NUMID]",
133-
"status": "OPERATION_STATUS_SUCCEEDED"
134-
}
135-
}
136-
{
137-
"method": "POST",
138-
"path": "/api/2.0/bundle/deployments/[UUID]/versions/2/complete",
139-
"body": {
140-
"name": "deployments/[UUID]/versions/2",
141-
"completion_reason": "VERSION_COMPLETE_SUCCESS"
142-
}
143-
}
144-
{
145-
"method": "GET",
146-
"path": "/api/2.0/bundle/deployments/[UUID]/resources",
147-
"q": {
148-
"page_size": "1000"
149-
},
150-
"body": null
151-
}
16+
Traceback (most recent call last):
17+
File "[TESTROOT]/bin/print_requests.py", line 197, in <module>
18+
main()
19+
File "[TESTROOT]/bin/print_requests.py", line 172, in main
20+
data = fobj.read()
21+
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
22+
return codecs.ascii_decode(input, self.errors)[0]
23+
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 7053: ordinal not in range(128)
24+
25+
Exit code: 1

acceptance/bundle/dms/add-resources/script

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ trace print_requests.py --get //bundle ^//workspace-files ^//import-file
3131
# Clean up.
3232
rm -rf .databricks
3333
$CLI bundle destroy --auto-approve > /dev/null 2>&1
34-
# Clear remaining requests so out.requests.txt is not generated.
35-
print_requests.py --get > /dev/null 2>&1 || true

0 commit comments

Comments
 (0)