Skip to content

Commit 98e835c

Browse files
authored
apps: inject default description="" to match TF (#3519)
## Why To ensure that direct backend sends the same payload as terraform and there are unexpected updates in pla when users migrate. It also simplifies testing where we record request payload and expect it match in both cases.
1 parent 7c37dad commit 98e835c

File tree

15 files changed

+41
-0
lines changed

15 files changed

+41
-0
lines changed
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resources:
2+
apps:
3+
mykey:
4+
name: myappname
5+
source_code_path: .

acceptance/bundle/resources/apps/out.test.toml renamed to acceptance/bundle/resources/apps/default_description/out.test.toml

File renamed without changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
>>> [CLI] bundle deploy
3+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
4+
Deploying resources...
5+
Updating deployment state...
6+
Deployment complete!
7+
8+
>>> print_requests
9+
{
10+
"body": {
11+
"description": "",
12+
"name": "myappname"
13+
},
14+
"method": "POST",
15+
"path": "/api/2.0/apps"
16+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
print_requests() {
2+
jq --sort-keys 'select(.method != "GET" and (.path | contains("/apps")))' < out.requests.txt
3+
rm out.requests.txt
4+
}
5+
6+
trace $CLI bundle deploy
7+
trace print_requests
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello world!")
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Local = true
2+
Cloud = false
3+
4+
[EnvMatrix]
5+
DATABRICKS_CLI_DEPLOYMENT = ["terraform", "direct-exp"]
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)