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
@@ -0,0 +1,10 @@
bundle:
name: test-bundle

resources:
apps:
myapp:
name: my-app
source_code_path: .
lifecycle:
started: true

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
✓ Deployment succeeded
Updating deployment state...
Deployment complete!

>>> cat out.requests.txt
{
"bool_values": [
{
"key": "local.cache.attempt",
"value": true
},
{
"key": "local.cache.miss",
"value": true
},
{
"key": "experimental.use_legacy_run_as",
"value": false
},
{
"key": "run_as_set",
"value": false
},
{
"key": "presets_name_prefix_is_set",
"value": false
},
{
"key": "python_wheel_wrapper_is_set",
"value": false
},
{
"key": "skip_artifact_cleanup",
"value": false
},
{
"key": "has_serverless_compute",
"value": false
},
{
"key": "has_classic_job_compute",
"value": false
},
{
"key": "has_classic_interactive_compute",
"value": false
},
{
"key": "app_lifecycle_started",
"value": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trace $CLI bundle deploy

trace cat out.requests.txt | jq 'select(has("path") and .path == "/telemetry-ext") | .body.protoLogs[] | fromjson | .entry.databricks_cli_log.bundle_deploy_event.experimental | {bool_values}'

rm out.requests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = ["direct"]
1 change: 1 addition & 0 deletions bundle/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ const (
ArtifactBuildCommandIsSet = "artifact_build_command_is_set"
ArtifactFilesIsSet = "artifact_files_is_set"
PresetsNamePrefixIsSet = "presets_name_prefix_is_set"
AppLifecycleStarted = "app_lifecycle_started"
)
8 changes: 8 additions & 0 deletions bundle/phases/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/config"
"github.com/databricks/cli/bundle/libraries"
"github.com/databricks/cli/bundle/metrics"
"github.com/databricks/cli/libs/dyn"
"github.com/databricks/cli/libs/log"
"github.com/databricks/cli/libs/telemetry"
Expand Down Expand Up @@ -113,6 +114,13 @@ func LogDeployTelemetry(ctx context.Context, b *bundle.Bundle, errMsg string) {
slices.Sort(clusterIds)
slices.Sort(dashboardIds)

for _, app := range b.Config.Resources.Apps {
if app != nil && app.Lifecycle != nil && app.Lifecycle.Started != nil {
b.Metrics.SetBoolValue(metrics.AppLifecycleStarted, *app.Lifecycle.Started)
Comment thread
andrewnester marked this conversation as resolved.
break
}
}

// If the bundle UUID is not set, we use a default 0 value.
bundleUuid := "00000000-0000-0000-0000-000000000000"
if b.Config.Bundle.Uuid != "" {
Expand Down
Loading