From 37e8f6a77797506f405262008ce487cf91345fe6 Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Wed, 18 Nov 2026 05:22:34 +0000 Subject: [PATCH 1/2] acc: ignore postgres project compute_last_active_time in update_display_name plans The backend sets status.compute_last_active_time only once the project's compute has run, so it appears in remote_state nondeterministically. cloud: TestAccept/bundle/resources/postgres_projects/update_display_name Co-authored-by: Isaac --- .../postgres_projects/update_display_name/script | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/script b/acceptance/bundle/resources/postgres_projects/update_display_name/script index 766891a7e50..dcfa5ee0b83 100755 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/script +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/script @@ -12,10 +12,12 @@ print_requests() { rm -f "$OUT_REQUESTS" } +# status.compute_last_active_time is set by the backend only once the project's compute +# has run, so it appears in remote_state nondeterministically. title "Initial deployment" trace $CLI bundle validate trace $CLI bundle plan -trace $CLI bundle plan -o json | nostamp | jq '.plan."resources.postgres_projects.my_project" // .' > out.plan.create.json +trace $CLI bundle plan -o json | nostamp | jq '(.plan."resources.postgres_projects.my_project" // .) | del(.remote_state.status.compute_last_active_time)' > out.plan.create.json rm -f "$OUT_REQUESTS" trace $CLI bundle deploy @@ -27,7 +29,7 @@ trace $CLI postgres get-project "${project_name}" | project_fields title "Verify no changes" 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.status.compute_last_active_time)' > out.plan.no_change.json rm -f "$OUT_REQUESTS" trace $CLI bundle deploy @@ -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.status.compute_last_active_time)' > out.plan.update.json rm -f "$OUT_REQUESTS" trace $CLI bundle deploy @@ -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.status.compute_last_active_time)' > out.plan.restore.json rm -f "$OUT_REQUESTS" trace $CLI bundle deploy From bed46149b06ef25c447184fb6bfdaa2399be16a5 Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Wed, 18 Nov 2026 09:14:04 +0000 Subject: [PATCH 2/2] acc: drop remote_state from update_display_name plans remote_state is the full GetProject payload; backend-computed status fields come and go, so recording it is unstable. The create plan has no remote_state, so it is left unfiltered. cloud: TestAccept/bundle/resources/postgres_projects/update_display_name Co-authored-by: Isaac --- .../out.plan.no_change.json | 30 ------------------- .../update_display_name/out.plan.restore.json | 30 ------------------- .../update_display_name/out.plan.update.json | 30 ------------------- .../update_display_name/script | 12 ++++---- 4 files changed, 6 insertions(+), 96 deletions(-) diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json index aef35a8e1f1..6cf4670fe06 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json @@ -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", diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json index c508cf75a50..a119af48faa 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json @@ -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", diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json index ebed0764efe..e8826a0fb65 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json @@ -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", diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/script b/acceptance/bundle/resources/postgres_projects/update_display_name/script index dcfa5ee0b83..918b85ac07d 100755 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/script +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/script @@ -12,12 +12,10 @@ print_requests() { rm -f "$OUT_REQUESTS" } -# status.compute_last_active_time is set by the backend only once the project's compute -# has run, so it appears in remote_state nondeterministically. title "Initial deployment" trace $CLI bundle validate trace $CLI bundle plan -trace $CLI bundle plan -o json | nostamp | jq '(.plan."resources.postgres_projects.my_project" // .) | del(.remote_state.status.compute_last_active_time)' > out.plan.create.json +trace $CLI bundle plan -o json | nostamp | jq '.plan."resources.postgres_projects.my_project" // .' > out.plan.create.json rm -f "$OUT_REQUESTS" trace $CLI bundle deploy @@ -28,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" // .) | del(.remote_state.status.compute_last_active_time)' > 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 @@ -40,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" // .) | del(.remote_state.status.compute_last_active_time)' > 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 @@ -52,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" // .) | del(.remote_state.status.compute_last_active_time)' > 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