Skip to content

Commit e4809d6

Browse files
committed
Agent review
1 parent dfbc1c6 commit e4809d6

54 files changed

Lines changed: 1181 additions & 275 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

acceptance/bundle/generate/genie_space/out/genie_space/test_genie_space.genie.json renamed to acceptance/bundle/generate/genie_space/out/genie_space/test_genie_space.geniespace.json

File renamed without changes.

acceptance/bundle/generate/genie_space/out/resource/test_genie_space.genie_space.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ resources:
33
test_genie_space:
44
title: "test genie space"
55
warehouse_id: test-warehouse-id
6-
file_path: ../genie_space/test_genie_space.genie.json
6+
file_path: ../genie_space/test_genie_space.geniespace.json
77
description: test description
88
parent_path: /Workspace/test-[UNIQUE_NAME]

acceptance/bundle/generate/genie_space/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
>>> [CLI] workspace mkdirs /Workspace/test-[UNIQUE_NAME]
33

44
>>> [CLI] bundle generate genie-space --existing-id [GENIE_SPACE_ID] --genie-space-dir out/genie_space --resource-dir out/resource
5-
Writing genie space to out/genie_space/test_genie_space.genie.json
5+
Writing genie space to out/genie_space/test_genie_space.geniespace.json
66
Writing configuration to out/resource/test_genie_space.genie_space.yml

acceptance/bundle/resources/genie_spaces/inline/out.plan.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@
88
"action": "skip",
99
"remote_state": {
1010
"description": "Inline serialized_space test",
11+
"etag": "1",
1112
"serialized_space": "{\"config\":{\"sample_questions\":[{\"id\":\"sq-001\",\"question\":[\"What is the total revenue?\"]}]},\"data_sources\":{\"tables\":[{\"column_configs\":[{\"column_name\":\"amount\",\"get_example_values\":true}],\"identifier\":\"main.sales.orders\"}]},\"version\":1}",
1213
"space_id": "[GENIE_SPACE_ID]",
1314
"title": "Sales Analytics Inline Genie",
1415
"warehouse_id": "test-warehouse-id"
1516
},
1617
"changes": {
18+
"etag": {
19+
"action": "skip",
20+
"reason": "custom",
21+
"old": "1",
22+
"remote": "1"
23+
},
1724
"parent_path": {
1825
"action": "skip",
1926
"reason": "input_only",

acceptance/bundle/resources/genie_spaces/inline/out.test.toml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
Local = true
22
RecordRequests = false
33

4-
# Genie spaces only support direct deployment engine (no Terraform provider yet)
5-
[EnvMatrix]
6-
DATABRICKS_BUNDLE_ENGINE = ["direct"]
7-
84
Ignore = [
95
"databricks.yml",
106
]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bundle:
2+
name: recreate-genie-space-$UNIQUE_NAME
3+
4+
resources:
5+
genie_spaces:
6+
recreate_target:
7+
title: "Recreate Target"
8+
warehouse_id: "test-warehouse-id"
9+
parent_path: PARENT_PATH_PLACEHOLDER
10+
serialized_space: "{}"

acceptance/bundle/validate/genie_space_permissions_unsupported/out.test.toml renamed to acceptance/bundle/resources/genie_spaces/parent_path_recreate/out.test.toml

File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
>>> [CLI] bundle deploy
3+
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-genie-space-[UNIQUE_NAME]/default/files...
4+
Deploying resources...
5+
Updating deployment state...
6+
Deployment complete!
7+
8+
=== Plan after changing parent_path should show recreate
9+
>>> [CLI] bundle plan
10+
recreate genie_spaces.recreate_target
11+
12+
Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged
13+
14+
>>> [CLI] bundle destroy --auto-approve
15+
The following resources will be deleted:
16+
delete resources.genie_spaces.recreate_target
17+
18+
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/recreate-genie-space-[UNIQUE_NAME]/default
19+
20+
Deleting files...
21+
Destroy complete!
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cleanup() {
2+
trace $CLI bundle destroy --auto-approve
3+
}
4+
trap cleanup EXIT
5+
6+
# Deploy with the original parent_path.
7+
envsubst < databricks.yml.tmpl | sed "s|PARENT_PATH_PLACEHOLDER|/Users/$CURRENT_USER_NAME/genie-old|" > databricks.yml
8+
trace $CLI bundle deploy
9+
10+
# Change parent_path. parent_path is recreate_on_changes in resources.yml,
11+
# so the plan should show a recreate (delete + create) rather than an update.
12+
envsubst < databricks.yml.tmpl | sed "s|PARENT_PATH_PLACEHOLDER|/Users/$CURRENT_USER_NAME/genie-new|" > databricks.yml
13+
title "Plan after changing parent_path should show recreate"
14+
trace $CLI bundle plan

0 commit comments

Comments
 (0)