Databricks CLI
Go to file
Andrew Nester 473d2bf503
Improved error message when 'bricks bundle run' is executed before 'bricks bundle deploy' (#378)
## Changes
Improved error message when 'bricks bundle run' is executed before
'bricks bundle deploy'

The error happens when we attempt to load terraform state when it does
not exist.

The best way to check if terraform state actually exists is to call
`terraform show -json` and that's what already happens here

https://github.com/databricks/bricks/compare/main...error-before-deploy#diff-8c50f8c04e568397bc865b7e02d1f4ec5b18379d8d32daddfeb041035d804f5fL28

Absence of `state.Values` indicates that there is no state and likely
bundle was just never deployed.

## Tests
Ran `bricks bundle run test_job` on a new non-deployed bundle.

**Output:**

`Error: terraform show: No state. Did you forget to run 'bricks bundle
deploy'?`

Running `bricks bundle deploy && bricks bundle run test_job` succeeds.

---------

Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
2023-05-10 11:02:25 +02:00
.codegen Added OpenAPI command coverage (#357) 2023-04-26 13:06:16 +02:00
.github Fix workflow to publish latest release (#364) 2023-04-26 16:54:52 +02:00
.vscode Let vscode trim whitespace on save (#172) 2023-01-23 09:52:50 +01:00
bundle Improved error message when 'bricks bundle run' is executed before 'bricks bundle deploy' (#378) 2023-05-10 11:02:25 +02:00
cmd Added OpenAPI command coverage (#357) 2023-04-26 13:06:16 +02:00
docs Fix table of content by removing not required top-level item (#366) 2023-04-28 19:45:59 +02:00
folders Don't depend on working directory in folders.FindDirWithLeaf (#54) 2022-09-14 15:08:55 +02:00
internal Fix api post integration tests (#371) 2023-05-01 11:10:02 +02:00
libs Add git config block to bundle config (#356) 2023-04-26 16:54:36 +02:00
python Update to Go SDK v0.8.0 (#351) 2023-04-21 10:30:20 +02:00
.codegen.json Added OpenAPI command coverage (#357) 2023-04-26 13:06:16 +02:00
.gitattributes Added OpenAPI command coverage (#357) 2023-04-26 13:06:16 +02:00
.gitignore Implement Terraform state synchronization and deploy (#98) 2022-12-06 00:40:45 +01:00
.goreleaser.yaml Publish snapshot binaries to snapshot release (#329) 2023-04-12 22:16:30 +02:00
CHANGELOG.md Release v0.0.31 (#365) 2023-04-26 17:08:55 +02:00
Makefile goreleaser deprecated --rm-dist in favor of --clean (#349) 2023-04-20 11:59:34 +02:00
README.md Added `bricks` OpenAPI commands (#362) 2023-04-26 15:35:48 +02:00
go.mod Added OpenAPI command coverage (#357) 2023-04-26 13:06:16 +02:00
go.sum Added OpenAPI command coverage (#357) 2023-04-26 13:06:16 +02:00
main.go Added OpenAPI command coverage (#357) 2023-04-26 13:06:16 +02:00
main_test.go Configure user agent in root command (#195) 2023-02-03 16:47:33 +01:00

README.md

Bricks CLI

build

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/bricks-cli.html.

Installation

This CLI is packaged as a dependency-free binary executable and may be located in any directory.

For convenient access, copy the bricks binary to any directory listed in $PATH.

Confirm the binary works by executing bricks version.

Authentication

This CLI follows the Databricks Unified Authentication principles.

You can find a detailed description at https://github.com/databricks/databricks-sdk-go#authentication.