From 68a8738d05eb177b31dc5ee025362a2c88e29c14 Mon Sep 17 00:00:00 2001
From: Jan Rose <jan.rose@databricks.com>
Date: Tue, 21 Apr 2026 10:26:04 +0200
Subject: [PATCH] acceptance: clean up vector_search_endpoints min_qps tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Address review nits on #4887:

- update/min_qps: drop redundant `--keep` + manual `rm` pair in
  `print_requests()` — `print_requests.py` already deletes
  `out.requests.txt` when `--keep` is omitted.
- drift/min_qps: record `bundle plan --output json` to pin down that
  `min_qps` is the only field detected as changed (old=1, new=1,
  remote=5), not just the summary line.

Co-authored-by: Isaac
---
 .../drift/min_qps/out.plan.direct.json            | 15 +++++++++++++++
 .../vector_search_endpoints/drift/min_qps/script  |  1 +
 .../update/min_qps/output.txt                     |  4 ++--
 .../vector_search_endpoints/update/min_qps/script |  3 +--
 4 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/out.plan.direct.json

diff --git a/acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/out.plan.direct.json b/acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/out.plan.direct.json
new file mode 100644
index 0000000000..93aa4f1a24
--- /dev/null
+++ b/acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/out.plan.direct.json
@@ -0,0 +1,15 @@
+{
+  "plan": {
+    "resources.vector_search_endpoints.my_endpoint": {
+      "action": "update",
+      "changes": {
+        "min_qps": {
+          "action": "update",
+          "old": 1,
+          "new": 1,
+          "remote": 5
+        }
+      }
+    }
+  }
+}
diff --git a/acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/script b/acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/script
index 54a389bda0..81e86fefcb 100644
--- a/acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/script
+++ b/acceptance/bundle/resources/vector_search_endpoints/drift/min_qps/script
@@ -16,6 +16,7 @@ trace $CLI vector-search-endpoints patch-endpoint "${endpoint_name}" --min-qps 5
 
 title "Plan detects drift and proposes update"
 trace $CLI bundle plan | contains.py "Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged"
+$CLI bundle plan --output json | jq '{plan: .plan | map_values({action, changes})}' > out.plan.$DATABRICKS_BUNDLE_ENGINE.json
 
 title "Deploy restores min_qps to 1"
 rm -f out.requests.txt
diff --git a/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/output.txt b/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/output.txt
index b77e88de53..8dec120bc4 100644
--- a/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/output.txt
+++ b/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/output.txt
@@ -6,7 +6,7 @@ Deploying resources...
 Updating deployment state...
 Deployment complete!
 
->>> print_requests.py --keep //vector-search/endpoints //permissions
+>>> print_requests.py //vector-search/endpoints //permissions
 
 >>> [CLI] vector-search-endpoints get-endpoint vs-endpoint-[UNIQUE_NAME]
 {
@@ -29,7 +29,7 @@ Deploying resources...
 Updating deployment state...
 Deployment complete!
 
->>> print_requests.py --keep //vector-search/endpoints //permissions
+>>> print_requests.py //vector-search/endpoints //permissions
 
 >>> [CLI] vector-search-endpoints get-endpoint vs-endpoint-[UNIQUE_NAME]
 {
diff --git a/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/script b/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/script
index a466d7b383..c21d64b9d9 100644
--- a/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/script
+++ b/acceptance/bundle/resources/vector_search_endpoints/update/min_qps/script
@@ -8,8 +8,7 @@ trap cleanup EXIT
 
 print_requests() {
     local name=$1
-    trace print_requests.py --keep '//vector-search/endpoints' '//permissions' > out.requests.${name}.$DATABRICKS_BUNDLE_ENGINE.json
-    rm -f out.requests.txt
+    trace print_requests.py '//vector-search/endpoints' '//permissions' > out.requests.${name}.$DATABRICKS_BUNDLE_ENGINE.json
 }
 
 title "Initial deployment"
