Skip to content

Commit 6907378

Browse files
acceptance: cover /workspace/import drop-in edge cases + restore deleted goldens
Add a focused acceptance test (acceptance/bundle/sync/upload-edge-cases) that exercises the multipart upload pipeline with the inputs that differ in shape between the legacy import-file and the new /workspace/import endpoints: - A 12 MiB binary file (above the JSON-body 10 MiB cap that the multipart variant lifts). - An empty file (multipart encodes an empty content part distinct from JSON's empty string). - A python notebook (auto-detected as NOTEBOOK; testserver mirrors extension stripping). - A .lvdash.json dashboard descriptor (real workspace assigns DASHBOARD; testserver records the upload-side request shape). - A non-ASCII filename (héllo.txt — multipart encodes filenames with quoted string rules). - A filename with a space. Assertions inspect out.requests.txt and pin: the set of multipart_form.path values, that every upload sets format=AUTO. Also restore 11 golden out.requests.txt files that the previous regenerate sweep accidentally deleted (templates/telemetry/*, run/inline-script/**, run/scripts/**, resources/volumes/change-schema-name) — they were present on main and silently disappeared during the rebase that brought their goldens together with the removal patch. Co-authored-by: Isaac
1 parent e86aeba commit 6907378

16 files changed

Lines changed: 641 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"method": "GET",
3+
"path": "/api/2.1/unity-catalog/volumes/main.myschema.myvolume"
4+
}
5+
{
6+
"method": "GET",
7+
"path": "/api/2.1/unity-catalog/volumes/main.myschema.mynewvolume"
8+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"method": "GET",
3+
"path": "/.well-known/databricks-config"
4+
}
5+
{
6+
"method": "GET",
7+
"path": "/oidc/.well-known/oauth-authorization-server"
8+
}
9+
{
10+
"headers": {
11+
"Authorization": [
12+
"Basic [ENCODED_AUTH]"
13+
]
14+
},
15+
"method": "POST",
16+
"path": "/oidc/v1/token",
17+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
18+
}
19+
{
20+
"method": "GET",
21+
"path": "/oidc/.well-known/oauth-authorization-server"
22+
}
23+
{
24+
"headers": {
25+
"Authorization": [
26+
"Basic [ENCODED_AUTH]"
27+
]
28+
},
29+
"method": "POST",
30+
"path": "/oidc/v1/token",
31+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
32+
}
33+
{
34+
"headers": {
35+
"Authorization": [
36+
"Bearer oauth-token"
37+
]
38+
},
39+
"method": "GET",
40+
"path": "/api/2.0/preview/scim/v2/Me"
41+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"method": "GET",
3+
"path": "/.well-known/databricks-config"
4+
}
5+
{
6+
"headers": {
7+
"Authorization": [
8+
"Bearer [DATABRICKS_TOKEN]"
9+
]
10+
},
11+
"method": "GET",
12+
"path": "/api/2.0/preview/scim/v2/Me"
13+
}
14+
{
15+
"headers": {
16+
"Authorization": [
17+
"Bearer [DATABRICKS_TOKEN]"
18+
]
19+
},
20+
"method": "GET",
21+
"path": "/api/2.0/workspace/get-status",
22+
"q": {
23+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/pat/files"
24+
}
25+
}
26+
{
27+
"headers": {
28+
"Authorization": [
29+
"Bearer [DATABRICKS_TOKEN]"
30+
]
31+
},
32+
"method": "POST",
33+
"path": "/api/2.0/workspace/mkdirs",
34+
"body": {
35+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/pat/files"
36+
}
37+
}
38+
{
39+
"headers": {
40+
"Authorization": [
41+
"Bearer [DATABRICKS_TOKEN]"
42+
]
43+
},
44+
"method": "GET",
45+
"path": "/api/2.0/workspace/get-status",
46+
"q": {
47+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/pat/files"
48+
}
49+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"method": "GET",
3+
"path": "/.well-known/databricks-config"
4+
}
5+
{
6+
"method": "GET",
7+
"path": "/oidc/.well-known/oauth-authorization-server"
8+
}
9+
{
10+
"headers": {
11+
"Authorization": [
12+
"Basic [ENCODED_AUTH]"
13+
]
14+
},
15+
"method": "POST",
16+
"path": "/oidc/v1/token",
17+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
18+
}
19+
{
20+
"method": "GET",
21+
"path": "/oidc/.well-known/oauth-authorization-server"
22+
}
23+
{
24+
"headers": {
25+
"Authorization": [
26+
"Basic [ENCODED_AUTH]"
27+
]
28+
},
29+
"method": "POST",
30+
"path": "/oidc/v1/token",
31+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
32+
}
33+
{
34+
"headers": {
35+
"Authorization": [
36+
"Bearer oauth-token"
37+
]
38+
},
39+
"method": "GET",
40+
"path": "/api/2.0/preview/scim/v2/Me"
41+
}
42+
{
43+
"headers": {
44+
"Authorization": [
45+
"Bearer oauth-token"
46+
]
47+
},
48+
"method": "GET",
49+
"path": "/api/2.0/workspace/get-status",
50+
"q": {
51+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/oauth/files"
52+
}
53+
}
54+
{
55+
"headers": {
56+
"Authorization": [
57+
"Bearer oauth-token"
58+
]
59+
},
60+
"method": "POST",
61+
"path": "/api/2.0/workspace/mkdirs",
62+
"body": {
63+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/oauth/files"
64+
}
65+
}
66+
{
67+
"headers": {
68+
"Authorization": [
69+
"Bearer oauth-token"
70+
]
71+
},
72+
"method": "GET",
73+
"path": "/api/2.0/workspace/get-status",
74+
"q": {
75+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/oauth/files"
76+
}
77+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"method": "GET",
3+
"path": "/.well-known/databricks-config"
4+
}
5+
{
6+
"method": "GET",
7+
"path": "/oidc/.well-known/oauth-authorization-server"
8+
}
9+
{
10+
"headers": {
11+
"Authorization": [
12+
"Basic [ENCODED_AUTH]"
13+
]
14+
},
15+
"method": "POST",
16+
"path": "/oidc/v1/token",
17+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
18+
}
19+
{
20+
"headers": {
21+
"Authorization": [
22+
"Bearer oauth-token"
23+
]
24+
},
25+
"method": "GET",
26+
"path": "/api/2.0/preview/scim/v2/Me"
27+
}
28+
{
29+
"method": "GET",
30+
"path": "/.well-known/databricks-config"
31+
}
32+
{
33+
"method": "GET",
34+
"path": "/oidc/.well-known/oauth-authorization-server"
35+
}
36+
{
37+
"headers": {
38+
"Authorization": [
39+
"Basic [ENCODED_AUTH]"
40+
]
41+
},
42+
"method": "POST",
43+
"path": "/oidc/v1/token",
44+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
45+
}
46+
{
47+
"headers": {
48+
"Authorization": [
49+
"Bearer oauth-token"
50+
]
51+
},
52+
"method": "GET",
53+
"path": "/api/2.0/preview/scim/v2/Me"
54+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"method": "GET",
3+
"path": "/.well-known/databricks-config"
4+
}
5+
{
6+
"headers": {
7+
"Authorization": [
8+
"Bearer [DATABRICKS_TOKEN]"
9+
]
10+
},
11+
"method": "GET",
12+
"path": "/api/2.0/preview/scim/v2/Me"
13+
}
14+
{
15+
"method": "GET",
16+
"path": "/.well-known/databricks-config"
17+
}
18+
{
19+
"headers": {
20+
"Authorization": [
21+
"Bearer [DATABRICKS_TOKEN]"
22+
]
23+
},
24+
"method": "GET",
25+
"path": "/api/2.0/preview/scim/v2/Me"
26+
}
27+
{
28+
"headers": {
29+
"Authorization": [
30+
"Bearer [DATABRICKS_TOKEN]"
31+
]
32+
},
33+
"method": "GET",
34+
"path": "/api/2.0/workspace/get-status",
35+
"q": {
36+
"path": "/Workspace/Users/[USERNAME]/.bundle/foobar/pat/files"
37+
}
38+
}
39+
{
40+
"headers": {
41+
"Authorization": [
42+
"Bearer [DATABRICKS_TOKEN]"
43+
]
44+
},
45+
"method": "POST",
46+
"path": "/api/2.0/workspace/mkdirs",
47+
"body": {
48+
"path": "/Workspace/Users/[USERNAME]/.bundle/foobar/pat/files"
49+
}
50+
}
51+
{
52+
"headers": {
53+
"Authorization": [
54+
"Bearer [DATABRICKS_TOKEN]"
55+
]
56+
},
57+
"method": "GET",
58+
"path": "/api/2.0/workspace/get-status",
59+
"q": {
60+
"path": "/Workspace/Users/[USERNAME]/.bundle/foobar/pat/files"
61+
}
62+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"method": "GET",
3+
"path": "/.well-known/databricks-config"
4+
}
5+
{
6+
"method": "GET",
7+
"path": "/oidc/.well-known/oauth-authorization-server"
8+
}
9+
{
10+
"headers": {
11+
"Authorization": [
12+
"Basic [ENCODED_AUTH]"
13+
]
14+
},
15+
"method": "POST",
16+
"path": "/oidc/v1/token",
17+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
18+
}
19+
{
20+
"headers": {
21+
"Authorization": [
22+
"Bearer oauth-token"
23+
]
24+
},
25+
"method": "GET",
26+
"path": "/api/2.0/preview/scim/v2/Me"
27+
}
28+
{
29+
"method": "GET",
30+
"path": "/.well-known/databricks-config"
31+
}
32+
{
33+
"method": "GET",
34+
"path": "/oidc/.well-known/oauth-authorization-server"
35+
}
36+
{
37+
"headers": {
38+
"Authorization": [
39+
"Basic [ENCODED_AUTH]"
40+
]
41+
},
42+
"method": "POST",
43+
"path": "/oidc/v1/token",
44+
"raw_body": "grant_type=client_credentials\u0026scope=all-apis"
45+
}
46+
{
47+
"headers": {
48+
"Authorization": [
49+
"Bearer oauth-token"
50+
]
51+
},
52+
"method": "GET",
53+
"path": "/api/2.0/preview/scim/v2/Me"
54+
}
55+
{
56+
"headers": {
57+
"Authorization": [
58+
"Bearer oauth-token"
59+
]
60+
},
61+
"method": "GET",
62+
"path": "/api/2.0/workspace/get-status",
63+
"q": {
64+
"path": "/Workspace/Users/[USERNAME]/.bundle/foobar/oauth/files"
65+
}
66+
}
67+
{
68+
"headers": {
69+
"Authorization": [
70+
"Bearer oauth-token"
71+
]
72+
},
73+
"method": "POST",
74+
"path": "/api/2.0/workspace/mkdirs",
75+
"body": {
76+
"path": "/Workspace/Users/[USERNAME]/.bundle/foobar/oauth/files"
77+
}
78+
}
79+
{
80+
"headers": {
81+
"Authorization": [
82+
"Bearer oauth-token"
83+
]
84+
},
85+
"method": "GET",
86+
"path": "/api/2.0/workspace/get-status",
87+
"q": {
88+
"path": "/Workspace/Users/[USERNAME]/.bundle/foobar/oauth/files"
89+
}
90+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bundle:
2+
name: upload-edge-cases

acceptance/bundle/sync-upload-edge-cases/out.test.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)