Skip to content

Commit 67979c0

Browse files
Regenerate acceptance test golden files with Python 3.10+
Previous golden files were generated with Python 3.6 which doesn't support f-string self-documenting expressions used in update_file.py, causing bogus SyntaxError output that would fail in CI. Co-authored-by: Isaac
1 parent 024c840 commit 67979c0

4 files changed

Lines changed: 158 additions & 10 deletions

File tree

acceptance/bundle/resources/app_spaces/recreate/out.requests.direct.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,19 @@
66
"method": "POST",
77
"path": "/api/2.0/app-spaces"
88
}
9+
{
10+
"method": "DELETE",
11+
"path": "/api/2.0/app-spaces/original-space-name"
12+
}
13+
{
14+
"body": {
15+
"description": "my_space_description",
16+
"name": "renamed-space"
17+
},
18+
"method": "POST",
19+
"path": "/api/2.0/app-spaces"
20+
}
21+
{
22+
"method": "DELETE",
23+
"path": "/api/2.0/app-spaces/renamed-space"
24+
}

acceptance/bundle/resources/app_spaces/recreate/output.txt

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,39 @@ Deployment complete!
1414

1515
=== Change name (immutable field - should recreate)
1616
>>> update_file.py databricks.yml original-space-name renamed-space
17-
File "<fstring>", line 1
18-
(old=)
19-
^
20-
SyntaxError: invalid syntax
2117

22-
Exit code: 1
18+
>>> [CLI] bundle plan
19+
recreate app_spaces.mykey
20+
21+
Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged
22+
23+
>>> [CLI] bundle deploy
24+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
25+
Deploying resources...
26+
Updating deployment state...
27+
Deployment complete!
28+
29+
>>> print_requests
30+
31+
>>> [CLI] bundle summary
32+
Name: test-bundle
33+
Target: default
34+
Workspace:
35+
User: [USERNAME]
36+
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
37+
Resources:
38+
App Spaces:
39+
mykey:
40+
Name: renamed-space
41+
URL: (not deployed)
42+
43+
>>> [CLI] bundle destroy --auto-approve
44+
The following resources will be deleted:
45+
delete resources.app_spaces.mykey
46+
47+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
48+
49+
Deleting files...
50+
Destroy complete!
51+
52+
>>> print_requests

acceptance/bundle/resources/app_spaces/update/out.requests.direct.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,30 @@
66
"method": "POST",
77
"path": "/api/2.0/app-spaces"
88
}
9+
{
10+
"body": {
11+
"description": "MY_SPACE_DESCRIPTION",
12+
"name": "myspacename"
13+
},
14+
"method": "PATCH",
15+
"path": "/api/2.0/app-spaces/myspacename",
16+
"q": {
17+
"update_mask": "description,resources,user_api_scopes,usage_policy_id"
18+
}
19+
}
20+
{
21+
"method": "DELETE",
22+
"path": "/api/2.0/app-spaces/myspacename"
23+
}
24+
{
25+
"body": {
26+
"description": "MY_SPACE_DESCRIPTION",
27+
"name": "mynewspacename"
28+
},
29+
"method": "POST",
30+
"path": "/api/2.0/app-spaces"
31+
}
32+
{
33+
"method": "DELETE",
34+
"path": "/api/2.0/app-spaces/mynewspacename"
35+
}

acceptance/bundle/resources/app_spaces/update/output.txt

Lines changed: 80 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,84 @@ Resources:
2626

2727
=== Update description and re-deploy
2828
>>> update_file.py databricks.yml my_space_description MY_SPACE_DESCRIPTION
29-
File "<fstring>", line 1
30-
(old=)
31-
^
32-
SyntaxError: invalid syntax
3329

34-
Exit code: 1
30+
>>> [CLI] bundle plan
31+
update app_spaces.mykey
32+
33+
Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
34+
35+
>>> [CLI] bundle deploy
36+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
37+
Deploying resources...
38+
Updating deployment state...
39+
Deployment complete!
40+
41+
>>> print_requests
42+
43+
>>> [CLI] bundle summary
44+
Name: test-bundle
45+
Target: default
46+
Workspace:
47+
User: [USERNAME]
48+
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
49+
Resources:
50+
App Spaces:
51+
mykey:
52+
Name: myspacename
53+
URL: (not deployed)
54+
55+
=== Update name and re-deploy
56+
>>> update_file.py databricks.yml myspacename mynewspacename
57+
58+
>>> [CLI] bundle plan
59+
recreate app_spaces.mykey
60+
61+
Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged
62+
63+
>>> [CLI] bundle summary
64+
Name: test-bundle
65+
Target: default
66+
Workspace:
67+
User: [USERNAME]
68+
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
69+
Resources:
70+
App Spaces:
71+
mykey:
72+
Name: myspacename
73+
URL: (not deployed)
74+
75+
>>> [CLI] bundle deploy
76+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
77+
Deploying resources...
78+
Updating deployment state...
79+
Deployment complete!
80+
81+
>>> print_requests
82+
83+
>>> [CLI] bundle plan
84+
update app_spaces.mykey
85+
86+
Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
87+
88+
>>> [CLI] bundle summary
89+
Name: test-bundle
90+
Target: default
91+
Workspace:
92+
User: [USERNAME]
93+
Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
94+
Resources:
95+
App Spaces:
96+
mykey:
97+
Name: mynewspacename
98+
URL: (not deployed)
99+
100+
>>> [CLI] bundle destroy --auto-approve
101+
The following resources will be deleted:
102+
delete resources.app_spaces.mykey
103+
104+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
105+
106+
Deleting files...
107+
Destroy complete!
108+
109+
>>> print_requests

0 commit comments

Comments
 (0)