Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
{
"action": "skip",
"remote_state": {
"create_time": "[TIMESTAMP]",
"default_endpoint_settings": {
"autoscaling_limit_max_cu": 4,
"autoscaling_limit_min_cu": 0.5,
"suspend_timeout_duration": "300s"
},
"display_name": "Original Name",
"history_retention_duration": "604800s",
"name": "[MY_PROJECT_ID]",
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_logical_size_limit_bytes": [BRANCH_SIZE_LIMIT],
"default_branch": "[MY_PROJECT_ID]/branches/production",
"default_endpoint_settings": {
"autoscaling_limit_max_cu": 4,
"autoscaling_limit_min_cu": 0.5,
"suspend_timeout_duration": "300s"
},
"display_name": "Original Name",
"enable_pg_native_login": false,
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]",
"update_time": "[TIMESTAMP]"
},
"changes": {
"pg_version": {
"action": "skip",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,6 @@
"project_id": "test-pg-proj-[UNIQUE_NAME]"
}
},
"remote_state": {
"create_time": "[TIMESTAMP]",
"default_endpoint_settings": {
"autoscaling_limit_max_cu": 4,
"autoscaling_limit_min_cu": 0.5,
"suspend_timeout_duration": "300s"
},
"display_name": "Updated Name",
"history_retention_duration": "604800s",
"name": "[MY_PROJECT_ID]",
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_logical_size_limit_bytes": [BRANCH_SIZE_LIMIT],
"default_branch": "[MY_PROJECT_ID]/branches/production",
"default_endpoint_settings": {
"autoscaling_limit_max_cu": 4,
"autoscaling_limit_min_cu": 0.5,
"suspend_timeout_duration": "300s"
},
"display_name": "Updated Name",
"enable_pg_native_login": false,
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]",
"update_time": "[TIMESTAMP]"
},
"changes": {
"display_name": {
"action": "update",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,6 @@
"project_id": "test-pg-proj-[UNIQUE_NAME]"
}
},
"remote_state": {
"create_time": "[TIMESTAMP]",
"default_endpoint_settings": {
"autoscaling_limit_max_cu": 4,
"autoscaling_limit_min_cu": 0.5,
"suspend_timeout_duration": "300s"
},
"display_name": "Original Name",
"history_retention_duration": "604800s",
"name": "[MY_PROJECT_ID]",
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"status": {
"branch_logical_size_limit_bytes": [BRANCH_SIZE_LIMIT],
"default_branch": "[MY_PROJECT_ID]/branches/production",
"default_endpoint_settings": {
"autoscaling_limit_max_cu": 4,
"autoscaling_limit_min_cu": 0.5,
"suspend_timeout_duration": "300s"
},
"display_name": "Original Name",
"enable_pg_native_login": false,
"history_retention_duration": "604800s",
"owner": "[USERNAME]",
"pg_version": 16,
"project_id": "test-pg-proj-[UNIQUE_NAME]",
"synthetic_storage_size_bytes": 0
},
"uid": "[UUID]",
"update_time": "[TIMESTAMP]"
},
"changes": {
"display_name": {
"action": "update",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ project_id_1=`read_id.py my_project`
trace $CLI postgres get-project "${project_name}" | project_fields

title "Verify no changes"
# remote_state is the full GetProject payload, whose backend-computed status fields
# (e.g. compute_last_active_time) come and go; changes[*].remote still records the remote value.
trace $CLI bundle plan
trace $CLI bundle plan -o json | nostamp | jq '.plan."resources.postgres_projects.my_project" // .' > out.plan.no_change.json
trace $CLI bundle plan -o json | nostamp | jq '(.plan."resources.postgres_projects.my_project" // .) | del(.remote_state)' > out.plan.no_change.json
rm -f "$OUT_REQUESTS"
trace $CLI bundle deploy

Expand All @@ -38,7 +40,7 @@ trace update_file.py databricks.yml "Original Name" "Updated Name"
trace cat databricks.yml

trace $CLI bundle plan
trace $CLI bundle plan -o json | nostamp | jq '.plan."resources.postgres_projects.my_project" // .' > out.plan.update.json
trace $CLI bundle plan -o json | nostamp | jq '(.plan."resources.postgres_projects.my_project" // .) | del(.remote_state)' > out.plan.update.json
rm -f "$OUT_REQUESTS"
trace $CLI bundle deploy

Expand All @@ -50,7 +52,7 @@ trace $CLI postgres get-project "${project_name}" | project_fields
title "Restore display_name to original value"
trace update_file.py databricks.yml "Updated Name" "Original Name"
trace $CLI bundle plan
trace $CLI bundle plan -o json | nostamp | jq '.plan."resources.postgres_projects.my_project" // .' > out.plan.restore.json
trace $CLI bundle plan -o json | nostamp | jq '(.plan."resources.postgres_projects.my_project" // .) | del(.remote_state)' > out.plan.restore.json
rm -f "$OUT_REQUESTS"
trace $CLI bundle deploy

Expand Down
Loading