More diagnostics

This commit is contained in:
Denis Bilenko 2025-02-14 13:31:23 +01:00
parent 406cd3f894
commit 5d29d84441
2 changed files with 13 additions and 1 deletions

View File

@ -2,6 +2,7 @@
>>> [CLI] bundle init default-python --config-file ./input.json --output-dir output
Welcome to the default Python template for Databricks Asset Bundles!
Warn: Auto-detected that serverless is not enabled for your workspace 900800700600
Workspace to use (auto-detected, edit in 'my_default_python/databricks.yml'): [DATABRICKS_URL]
✨ Your new project has been created in the 'my_default_python' directory!

View File

@ -222,5 +222,16 @@ func isServerlessSupported(ctx context.Context, w *databricks.WorkspaceClient) b
log.Warnf(ctx, "Failed to detect if serverless is supported: %s failed: %s", apiEndpoint, err)
return defaultServerlessSupported
}
return response.Setting.Value.PreviewEnablementVal.Enabled
log.Debugf(ctx, "Called %s: %#v", apiEndpoint, response)
isSupported := response.Setting.Value.PreviewEnablementVal.Enabled
if isSupported {
log.Infof(ctx, "Auto-detected that serverless is enabled for your workspace %d", workspaceId)
} else {
log.Warnf(ctx, "Auto-detected that serverless is not enabled for your workspace %d", workspaceId)
}
return isSupported
}