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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project is in private preview.

Documentation about the full REST API coverage is avaialbe in the [docs folder](docs/commands.md).

Documentation is available at https://docs.databricks.com/dev-tools/cli/bricks-cli.html.
Documentation is available at https://docs.databricks.com/dev-tools/cli/databricks-cli.html.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions bundle/config/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ func (w *Workspace) Client() (*databricks.WorkspaceClient, error) {
func init() {
arg0 := os.Args[0]

// Configure BRICKS_CLI_PATH only if our caller intends to use this specific version of this binary.
// Configure DATABRICKS_CLI_PATH only if our caller intends to use this specific version of this binary.
// Otherwise, if it is equal to its basename, processes can find it in $PATH.
if arg0 != filepath.Base(arg0) {
os.Setenv("BRICKS_CLI_PATH", arg0)
os.Setenv("DATABRICKS_CLI_PATH", arg0)
}
}
2 changes: 1 addition & 1 deletion bundle/internal/tf/schema/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Config struct {
AzureTenantId string `json:"azure_tenant_id,omitempty"`
AzureUseMsi bool `json:"azure_use_msi,omitempty"`
AzureWorkspaceResourceId string `json:"azure_workspace_resource_id,omitempty"`
BricksCliPath string `json:"bricks_cli_path,omitempty"`
DatabricksCliPath string `json:"databricks_cli_path,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a Terraform provider bump as well -- can be done and verified async.

ClientId string `json:"client_id,omitempty"`
ClientSecret string `json:"client_secret,omitempty"`
ConfigFile string `json:"config_file,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions cmd/root/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"github.com/spf13/cobra"
)

const envBricksOutputFormat = "BRICKS_OUTPUT_FORMAT"
const envOutputFormat = "DATABRICKS_OUTPUT_FORMAT"

var outputType flags.Output = flags.OutputText

func init() {
// Configure defaults from environment, if applicable.
// If the provided value is invalid it is ignored.
if v, ok := os.LookupEnv(envBricksOutputFormat); ok {
if v, ok := os.LookupEnv(envOutputFormat); ok {
outputType.Set(v)
}

Expand Down
12 changes: 6 additions & 6 deletions cmd/root/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
)

const (
envBricksLogFile = "BRICKS_LOG_FILE"
envBricksLogLevel = "BRICKS_LOG_LEVEL"
envBricksLogFormat = "BRICKS_LOG_FORMAT"
envLogFile = "DATABRICKS_LOG_FILE"
envLogLevel = "DATABRICKS_LOG_LEVEL"
envLogFormat = "DATABRICKS_LOG_FORMAT"
)

func initializeLogger(ctx context.Context) (context.Context, error) {
Expand Down Expand Up @@ -52,13 +52,13 @@ var logOutput = flags.OutputText
func init() {
// Configure defaults from environment, if applicable.
// If the provided value is invalid it is ignored.
if v, ok := os.LookupEnv(envBricksLogFile); ok {
if v, ok := os.LookupEnv(envLogFile); ok {
logFile.Set(v)
}
if v, ok := os.LookupEnv(envBricksLogLevel); ok {
if v, ok := os.LookupEnv(envLogLevel); ok {
logLevel.Set(v)
}
if v, ok := os.LookupEnv(envBricksLogFormat); ok {
if v, ok := os.LookupEnv(envLogFormat); ok {
logOutput.Set(v)
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/root/progress_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"golang.org/x/term"
)

const envBricksProgressFormat = "BRICKS_PROGRESS_FORMAT"
const envProgressFormat = "DATABRICKS_CLI_PROGRESS_FORMAT"

func resolveModeDefault(format flags.ProgressLogFormat) flags.ProgressLogFormat {
if (logLevel.String() == "disabled" || logFile.String() != "stderr") &&
Expand Down Expand Up @@ -40,7 +40,7 @@ var progressFormat = flags.NewProgressLogFormat()
func init() {
// Configure defaults from environment, if applicable.
// If the provided value is invalid it is ignored.
if v, ok := os.LookupEnv(envBricksProgressFormat); ok {
if v, ok := os.LookupEnv(envProgressFormat); ok {
progressFormat.Set(v)
}
RootCmd.PersistentFlags().Var(&progressFormat, "progress-format", "format for progress logs (append, inplace, json)")
Expand Down
4 changes: 2 additions & 2 deletions cmd/root/user_agent_upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
)

// Environment variables that caller can set to convey what is upstream to this CLI.
const upstreamEnvVar = "BRICKS_UPSTREAM"
const upstreamVersionEnvVar = "BRICKS_UPSTREAM_VERSION"
const upstreamEnvVar = "DATABRICKS_CLI_UPSTREAM"
const upstreamVersionEnvVar = "DATABRICKS_CLI_UPSTREAM_VERSION"

// Keys in the user agent.
const upstreamKey = "upstream"
Expand Down