File tree Expand file tree Collapse file tree 2 files changed +16
-25
lines changed
acceptance/bundle/resources/schemas/update Expand file tree Collapse file tree 2 files changed +16
-25
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Deploying resources...
55Updating deployment state...
66Deployment complete!
77
8- >>> print_requests
8+ >>> print_requests.py //unity
99{
1010 "method": "POST",
1111 "path": "/api/2.1/unity-catalog/schemas",
@@ -26,14 +26,10 @@ Deploying resources...
2626Updating deployment state...
2727Deployment complete!
2828
29- >>> print_requests
30- {
31- "method": "PATCH",
32- "path": "/api/2.1/unity-catalog/schemas/main.myschema",
33- "body": {
34- "comment": "COMMENT2"
35- }
36- }
29+ >>> print_requests.py //unity
30+ json.method = "PATCH";
31+ json.path = "/api/2.1/unity-catalog/schemas/main.myschema";
32+ json.body.comment = "COMMENT2";
3733schemas schema1 id='main.myschema' name='myschema' catalog_name='main' comment='COMMENT2'
3834
3935=== Restore comment to original value and re-deploy
@@ -45,12 +41,8 @@ Deploying resources...
4541Updating deployment state...
4642Deployment complete!
4743
48- >>> print_requests
49- {
50- "method": "PATCH",
51- "path": "/api/2.1/unity-catalog/schemas/main.myschema",
52- "body": {
53- "comment": "COMMENT1"
54- }
55- }
44+ >>> print_requests.py //unity
45+ json.method = "PATCH";
46+ json.path = "/api/2.1/unity-catalog/schemas/main.myschema";
47+ json.body.comment = "COMMENT1";
5648schemas schema1 id='main.myschema' name='myschema' catalog_name='main' comment='COMMENT1'
Original file line number Diff line number Diff line change 11echo "*" > .gitignore
22trace $CLI bundle deploy
33
4- print_requests() {
5- jq 'select(.method != "GET" and (.path | contains("/unity")))' < out.requests.txt
6- rm out.requests.txt
7- }
8-
9- trace print_requests
4+ trace print_requests.py //unity
105read_state.py schemas schema1 id name catalog_name comment
116
127title "Update comment and re-deploy"
138trace update_file.py databricks.yml COMMENT1 COMMENT2
149trace $CLI bundle deploy
15- trace print_requests
10+ # Why the first time request match for direct & terraform, the requests from second deploy no longer match:
11+ # Terraform also sends "enable_predictive_optimization": "INHERIT" which is remote value that it stored in the state.
12+ trace print_requests.py //unity | gron.py | grep -v enable_predictive_optimization
1613read_state.py schemas schema1 id name catalog_name comment
1714
1815title "Restore comment to original value and re-deploy"
1916trace update_file.py databricks.yml COMMENT2 COMMENT1
2017trace $CLI bundle deploy
21- trace print_requests
18+ trace print_requests.py //unity | gron.py | grep -v enable_predictive_optimization
2219read_state.py schemas schema1 id name catalog_name comment
20+
21+ rm -f out.requests.txt
You can’t perform that action at this time.
0 commit comments