Skip to content

Commit a8100b3

Browse files
authored
acc: update user_agent test to sort requests (#3814)
Needed for #3797 where parallel requests are made to state files.
1 parent 08839b5 commit a8100b3

15 files changed

+315
-315
lines changed

acceptance/bundle/user_agent/output.txt

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

acceptance/bundle/user_agent/simple/out.requests.deploy.direct-exp.json

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,11 @@
1313
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS cmd/bundle_deploy cmd-exec-id/[UUID] auth/pat"
1414
]
1515
},
16-
"method": "POST",
17-
"path": "/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
16+
"method": "GET",
17+
"path": "/api/2.0/workspace/export",
1818
"q": {
19-
"overwrite": "false"
20-
},
21-
"body": {
22-
"ID": "[UUID]",
23-
"AcquisitionTime": "[TIMESTAMP]",
24-
"IsForced": false,
25-
"User": "[USERNAME]"
19+
"direct_download": "true",
20+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock"
2621
}
2722
}
2823
{
@@ -32,10 +27,10 @@
3227
]
3328
},
3429
"method": "GET",
35-
"path": "/api/2.0/workspace/get-status",
30+
"path": "/api/2.0/workspace/export",
3631
"q": {
37-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
38-
"return_export_info": "true"
32+
"direct_download": "true",
33+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock"
3934
}
4035
}
4136
{
@@ -45,10 +40,9 @@
4540
]
4641
},
4742
"method": "GET",
48-
"path": "/api/2.0/workspace/export",
43+
"path": "/api/2.0/workspace/get-status",
4944
"q": {
50-
"direct_download": "true",
51-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock"
45+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
5246
}
5347
}
5448
{
@@ -60,7 +54,7 @@
6054
"method": "GET",
6155
"path": "/api/2.0/workspace/get-status",
6256
"q": {
63-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json",
57+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
6458
"return_export_info": "true"
6559
}
6660
}
@@ -73,7 +67,7 @@
7367
"method": "GET",
7468
"path": "/api/2.0/workspace/get-status",
7569
"q": {
76-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deployment.json",
70+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
7771
"return_export_info": "true"
7872
}
7973
}
@@ -83,11 +77,11 @@
8377
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS cmd/bundle_deploy cmd-exec-id/[UUID] auth/pat"
8478
]
8579
},
86-
"method": "POST",
87-
"path": "/api/2.0/workspace/delete",
88-
"body": {
89-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal",
90-
"recursive": true
80+
"method": "GET",
81+
"path": "/api/2.0/workspace/get-status",
82+
"q": {
83+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
84+
"return_export_info": "true"
9185
}
9286
}
9387
{
@@ -96,10 +90,11 @@
9690
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS cmd/bundle_deploy cmd-exec-id/[UUID] auth/pat"
9791
]
9892
},
99-
"method": "POST",
100-
"path": "/api/2.0/workspace/mkdirs",
101-
"body": {
102-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal"
93+
"method": "GET",
94+
"path": "/api/2.0/workspace/get-status",
95+
"q": {
96+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deployment.json",
97+
"return_export_info": "true"
10398
}
10499
}
105100
{
@@ -111,7 +106,8 @@
111106
"method": "GET",
112107
"path": "/api/2.0/workspace/get-status",
113108
"q": {
114-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
109+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json",
110+
"return_export_info": "true"
115111
}
116112
}
117113
{
@@ -126,6 +122,24 @@
126122
"overwrite": "true"
127123
}
128124
}
125+
{
126+
"headers": {
127+
"User-Agent": [
128+
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS cmd/bundle_deploy cmd-exec-id/[UUID] auth/pat"
129+
]
130+
},
131+
"method": "POST",
132+
"path": "/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
133+
"q": {
134+
"overwrite": "false"
135+
},
136+
"body": {
137+
"ID": "[UUID]",
138+
"AcquisitionTime": "[TIMESTAMP]",
139+
"IsForced": false,
140+
"User": "[USERNAME]"
141+
}
142+
}
129143
{
130144
"headers": {
131145
"User-Agent": [
@@ -158,10 +172,27 @@
158172
]
159173
},
160174
"method": "POST",
161-
"path": "/api/2.1/unity-catalog/schemas",
175+
"path": "/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/metadata.json",
176+
"q": {
177+
"overwrite": "true"
178+
},
162179
"body": {
163-
"catalog_name": "mycatalog",
164-
"name": "myschema"
180+
"version": 1,
181+
"config": {
182+
"bundle": {
183+
"git": {
184+
"bundle_root_path": "."
185+
}
186+
},
187+
"workspace": {
188+
"file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
189+
},
190+
"resources": {},
191+
"presets": {
192+
"source_linked_deployment": false
193+
}
194+
},
195+
"extra": {}
165196
}
166197
}
167198
{
@@ -196,40 +227,10 @@
196227
]
197228
},
198229
"method": "POST",
199-
"path": "/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/metadata.json",
200-
"q": {
201-
"overwrite": "true"
202-
},
230+
"path": "/api/2.0/workspace/delete",
203231
"body": {
204-
"version": 1,
205-
"config": {
206-
"bundle": {
207-
"git": {
208-
"bundle_root_path": "."
209-
}
210-
},
211-
"workspace": {
212-
"file_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
213-
},
214-
"resources": {},
215-
"presets": {
216-
"source_linked_deployment": false
217-
}
218-
},
219-
"extra": {}
220-
}
221-
}
222-
{
223-
"headers": {
224-
"User-Agent": [
225-
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS cmd/bundle_deploy cmd-exec-id/[UUID] auth/pat"
226-
]
227-
},
228-
"method": "GET",
229-
"path": "/api/2.0/workspace/get-status",
230-
"q": {
231-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
232-
"return_export_info": "true"
232+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal",
233+
"recursive": true
233234
}
234235
}
235236
{
@@ -238,11 +239,10 @@
238239
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS cmd/bundle_deploy cmd-exec-id/[UUID] auth/pat"
239240
]
240241
},
241-
"method": "GET",
242-
"path": "/api/2.0/workspace/get-status",
243-
"q": {
244-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock",
245-
"return_export_info": "true"
242+
"method": "POST",
243+
"path": "/api/2.0/workspace/delete",
244+
"body": {
245+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock"
246246
}
247247
}
248248
{
@@ -251,11 +251,10 @@
251251
"cli/[DEV_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/OS cmd/bundle_deploy cmd-exec-id/[UUID] auth/pat"
252252
]
253253
},
254-
"method": "GET",
255-
"path": "/api/2.0/workspace/export",
256-
"q": {
257-
"direct_download": "true",
258-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock"
254+
"method": "POST",
255+
"path": "/api/2.0/workspace/mkdirs",
256+
"body": {
257+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal"
259258
}
260259
}
261260
{
@@ -265,8 +264,9 @@
265264
]
266265
},
267266
"method": "POST",
268-
"path": "/api/2.0/workspace/delete",
267+
"path": "/api/2.1/unity-catalog/schemas",
269268
"body": {
270-
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deploy.lock"
269+
"catalog_name": "mycatalog",
270+
"name": "myschema"
271271
}
272272
}

0 commit comments

Comments
 (0)