diff --git a/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt b/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt index 1b7f5da4ee8..bc31d06d413 100644 --- a/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt +++ b/acceptance/bundle/resources/clusters/resize-terminated-fallback/output.txt @@ -7,7 +7,8 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Create a plan while cluster is running: should show resize ->>> [CLI] bundle plan -o json +>>> jq -r .plan["resources.clusters.test_cluster"].action plan.json +resize === Terminate the cluster before applying the saved plan diff --git a/acceptance/bundle/resources/clusters/resize-terminated-fallback/script b/acceptance/bundle/resources/clusters/resize-terminated-fallback/script index e8780a28bb7..46bd8f56f1a 100644 --- a/acceptance/bundle/resources/clusters/resize-terminated-fallback/script +++ b/acceptance/bundle/resources/clusters/resize-terminated-fallback/script @@ -13,7 +13,11 @@ add_repl "$CLUSTER_ID" CLUSTER_ID title "Create a plan while cluster is running: should show resize" update_file.py databricks.yml "num_workers: 2" "num_workers: 3" -trace $CLI bundle plan -o json > plan.json +# The planner picks resize only for a RUNNING cluster. Deploy returns at the first RUNNING, +# but on cloud the cluster can be out of RUNNING when the plan reads it, which plans an +# update instead. Re-plan until it says resize; once saved, the plan no longer depends on state. +RETRY_MAX_ATTEMPTS=60 RETRY_INTERVAL_MS=10000 retry --until '"action": "resize"' $CLI bundle plan -o json > plan.json +trace jq -r '.plan["resources.clusters.test_cluster"].action' plan.json title "Terminate the cluster before applying the saved plan" $CLI clusters delete "$CLUSTER_ID" > /dev/null