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 @@ -21,11 +21,11 @@ Deployment complete!
}
{
"method": "POST",
"path": "/api/2.0/sql/warehouses/[UUID]/stop",
"path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/stop",
"body": {}
}

>>> errcode [CLI] warehouses get [UUID]
>>> errcode [CLI] warehouses get [WAREHOUSE_ID]
"STOPPED"

=== Toggle started=false -> started=true: only Start should be called, no Edit
Expand All @@ -40,11 +40,11 @@ Deployment complete!
>>> print_requests.py //sql/warehouses
{
"method": "POST",
"path": "/api/2.0/sql/warehouses/[UUID]/start",
"path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/start",
"body": {}
}

>>> errcode [CLI] warehouses get [UUID]
>>> errcode [CLI] warehouses get [WAREHOUSE_ID]
"RUNNING"

=== Toggle started=true -> started=false: only Stop should be called, no Edit
Expand All @@ -59,11 +59,11 @@ Deployment complete!
>>> print_requests.py //sql/warehouses
{
"method": "POST",
"path": "/api/2.0/sql/warehouses/[UUID]/stop",
"path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/stop",
"body": {}
}

>>> errcode [CLI] warehouses get [UUID]
>>> errcode [CLI] warehouses get [WAREHOUSE_ID]
"STOPPED"

>>> [CLI] bundle destroy --auto-approve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ trap cleanup EXIT
title "Deploy with started=false: warehouse created and then stopped"
trace errcode $CLI bundle deploy
WAREHOUSE_ID=$($CLI bundle summary -o json | jq -r '.resources.sql_warehouses.mywarehouse.id')
add_repl.py "$WAREHOUSE_ID" "WAREHOUSE_ID"
trace print_requests.py //sql/warehouses
rm -f out.requests.txt
{ trace errcode $CLI warehouses get "$WAREHOUSE_ID" | jq '.state'; } || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ RecordRequests = true

Ignore = [".databricks", "databricks.yml"]

[[Repls]]
Old = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
New = "[UUID]"

[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = ["direct"]
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Deployment complete!
}
}

>>> errcode [CLI] warehouses get [UUID]
>>> errcode [CLI] warehouses get [WAREHOUSE_ID]
"RUNNING"

=== Stop warehouse externally while config says started=true: plan detects drift
>>> errcode [CLI] warehouses stop [UUID]
>>> errcode [CLI] warehouses stop [WAREHOUSE_ID]
"STOPPED"

>>> [CLI] bundle plan
Expand All @@ -42,20 +42,20 @@ Deployment complete!
>>> print_requests.py //sql/warehouses
{
"method": "POST",
"path": "/api/2.0/sql/warehouses/[UUID]/stop",
"path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/stop",
"body": {}
}
{
"method": "POST",
"path": "/api/2.0/sql/warehouses/[UUID]/start",
"path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/start",
"body": {}
}

>>> errcode [CLI] warehouses get [UUID]
>>> errcode [CLI] warehouses get [WAREHOUSE_ID]
"RUNNING"

=== Deploy with started=false while warehouse is stopped: warehouse stays stopped
>>> errcode [CLI] warehouses stop [UUID]
>>> errcode [CLI] warehouses stop [WAREHOUSE_ID]
"STOPPED"

>>> update_file.py databricks.yml started: true started: false
Expand All @@ -69,11 +69,11 @@ Deployment complete!
>>> print_requests.py //sql/warehouses
{
"method": "POST",
"path": "/api/2.0/sql/warehouses/[UUID]/stop",
"path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/stop",
"body": {}
}

>>> errcode [CLI] warehouses get [UUID]
>>> errcode [CLI] warehouses get [WAREHOUSE_ID]
"STOPPED"

=== Deploy with started=true: warehouse restarted
Expand All @@ -88,11 +88,11 @@ Deployment complete!
>>> print_requests.py //sql/warehouses
{
"method": "POST",
"path": "/api/2.0/sql/warehouses/[UUID]/start",
"path": "/api/2.0/sql/warehouses/[WAREHOUSE_ID]/start",
"body": {}
}

>>> errcode [CLI] warehouses get [UUID]
>>> errcode [CLI] warehouses get [WAREHOUSE_ID]
"RUNNING"

>>> [CLI] bundle destroy --auto-approve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ trap cleanup EXIT
title "Deploy with started=true: warehouse created and running"
trace errcode $CLI bundle deploy
WAREHOUSE_ID=$($CLI bundle summary -o json | jq -r '.resources.sql_warehouses.mywarehouse.id')
add_repl.py "$WAREHOUSE_ID" "WAREHOUSE_ID"

trace print_requests.py //sql/warehouses
rm -f out.requests.txt
{ trace errcode $CLI warehouses get "$WAREHOUSE_ID" | jq '.state'; } || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ RecordRequests = true

Ignore = [".databricks", "databricks.yml"]

[[Repls]]
Old = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
New = "[UUID]"

[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = ["direct"]
Loading