mirror of https://github.com/databricks/cli.git
9cf0e0db24
## Changes Some of the command such as `databricks alerts create` require positional arguments which are not primitive. Since these arguments are required, we should correctly set ExactArgs for such commands Fixes #367 ## Tests Running `databricks alerts create` Before ``` andrew.nester@HFW9Y94129 cli % ./cli alerts create panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: github.com/databricks/bricks/cmd/workspace/alerts.glob..func1(0x22a1280?, {0x2321638, 0x0, 0x0?}) github.com/databricks/bricks/cmd/workspace/alerts/alerts.go:57 +0x355 github.com/spf13/cobra.(*Command).execute(0x22a1280, {0x2321638, 0x0, 0x0}) github.com/spf13/cobra@v1.7.0/command.go:940 +0x862 github.com/spf13/cobra.(*Command).ExecuteC(0x22a0700) github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd github.com/spf13/cobra.(*Command).ExecuteContextC(...) github.com/spf13/cobra@v1.7.0/command.go:1001 github.com/databricks/bricks/cmd/root.Execute() github.com/databricks/bricks/cmd/root/root.go:80 +0x6a main.main() github.com/databricks/bricks/main.go:18 +0x17 ``` After ``` andrew.nester@HFW9Y94129 cli % ./cli alerts create Error: provide command input in JSON format by specifying --json option ``` Acceptance test ``` === RUN TestAccAlertsCreateErrWhenNoArguments alerts_test.go:10: gcp helpers.go:147: Error running command: provide command input in JSON format by specifying --json option --- PASS: TestAccAlertsCreateErrWhenNoArguments (1.99s) PASS ``` |
||
---|---|---|
.codegen | ||
.github | ||
.vscode | ||
bundle | ||
cmd | ||
docs | ||
folders | ||
internal | ||
libs | ||
python | ||
.codegen.json | ||
.gitattributes | ||
.gitignore | ||
.goreleaser.yaml | ||
CHANGELOG.md | ||
LICENSE | ||
Makefile | ||
NOTICE | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go | ||
main_test.go |
README.md
Databricks CLI
This project is in private preview.
Documentation about the full REST API coverage is avaialbe in the docs folder.
Documentation is available at https://docs.databricks.com/dev-tools/cli/databricks-cli.html.
Installation
This CLI is packaged as a dependency-free binary executable and may be located in any directory. See https://github.com/databricks/cli/releases for releases and the docs pages for installation instructions.
Authentication
This CLI follows the Databricks Unified Authentication principles.
You can find a detailed description at https://github.com/databricks/databricks-sdk-go#authentication.