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
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading