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
2 changes: 1 addition & 1 deletion acceptance/bundle/generate/auto-bind/out.test.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Cloud = true
EnvMatrix.DMS = [""]
EnvMatrix.DMS = ["", "true"]
3 changes: 0 additions & 3 deletions acceptance/bundle/generate/auto-bind/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ Ignore = [
# C:/Program Files/Git/Users/$username/UNIQUE_NAME before passing it to the CLI
# Setting this environment variable prevents that conversion on windows.
Env.MSYS_NO_PATHCONV = "1"

# bind is unsupported with deployment-history recording; pin DMS off so it runs on the plain cell.
EnvMatrix.DMS = [""]
4 changes: 4 additions & 0 deletions acceptance/bundle/generate/dashboard-inplace/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
"warehouse_id": ""
}

>>> fault.py GET /api/2.0/bundle/deployments/* 403 0 1 PERMISSION_DENIED

=== update the dashboard file using bundle generate
>>> [CLI] bundle generate dashboard --resource test_dashboard --force
Writing dashboard to dash.lvdash.json
Expand All @@ -32,3 +34,5 @@ Writing dashboard to dash.lvdash.json
{
"a": "b"
}

>>> print_requests.py --dms //api/2.0/bundle --get --oneline
6 changes: 6 additions & 0 deletions acceptance/bundle/generate/dashboard-inplace/script
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ dashboard_id=$($CLI bundle summary --output json | jq -r '.resources.dashboards.
title "update the dashboard"
trace $CLI lakeview update $dashboard_id --serialized-dashboard '{"a":"b"}'

# Generating from file-backed state must not depend on the history service.
rm -f "$OUT_REQUESTS"
trace fault.py "GET /api/2.0/bundle/deployments/*" 403 0 1 PERMISSION_DENIED

title "update the dashboard file using bundle generate"
trace $CLI bundle generate dashboard --resource test_dashboard --force

trace cat dash.lvdash.json

trace print_requests.py --dms //api/2.0/bundle --get --oneline
3 changes: 3 additions & 0 deletions acceptance/bundle/generate/dashboard-inplace/test.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
RecordRequests = true
Ignore = [".databricks"]

[[Repls]]
Old = "[0-9a-f]{32}"
New = "[DASHBOARD_ID]"
Expand Down
4 changes: 4 additions & 0 deletions acceptance/bundle/generate/genie_space_inplace/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
"warehouse_id": "my-warehouse-1234"
}

>>> fault.py GET /api/2.0/bundle/deployments/* 403 0 1 PERMISSION_DENIED

=== update the genie space file using bundle generate
>>> [CLI] bundle generate genie-space --resource test_genie_space --force
Writing genie space to space.geniespace.json
Expand All @@ -28,3 +30,5 @@ Writing genie space to space.geniespace.json
{
"a": "b"
}

>>> print_requests.py --dms //api/2.0/bundle --get --oneline
6 changes: 6 additions & 0 deletions acceptance/bundle/generate/genie_space_inplace/script
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ genie_space_id=$($CLI bundle summary --output json | jq -r '.resources.genie_spa
title "update the genie space"
trace $CLI genie update-space $genie_space_id --serialized-space '{"a":"b"}'

# Generating from file-backed state must not depend on the history service.
rm -f "$OUT_REQUESTS"
trace fault.py "GET /api/2.0/bundle/deployments/*" 403 0 1 PERMISSION_DENIED

title "update the genie space file using bundle generate"
trace $CLI bundle generate genie-space --resource test_genie_space --force

trace cat space.geniespace.json

trace print_requests.py --dms //api/2.0/bundle --get --oneline
3 changes: 3 additions & 0 deletions acceptance/bundle/generate/genie_space_inplace/test.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
RecordRequests = true
Ignore = [".databricks"]

# Genie spaces are only deployed via the direct deployment engine.

[[Repls]]
Expand Down
5 changes: 0 additions & 5 deletions cmd/bundle/utils/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,6 @@ func OpenDirectStateForRead(ctx context.Context, b *bundle.Bundle, stateDesc *st
if err := b.DeploymentBundle.StateDB.Open(ctx, localPath, dstate.ReadingFile, dstate.WithRecovery(true), dstate.OpenDmsArgs{}); err != nil {
return err
}
if configuresDeploymentHistory(ctx, b) {
if _, err := prepareDeploymentHistoryShadow(ctx, b); err != nil {
log.Warnf(ctx, "Could not read deployment history: %s", err)
}
}
return nil
}

Expand Down
Loading