Databricks CLI
Go to file
Andrew Nester 180dfc9a40
Added ability for deferred mutator execution (#380)
## Changes
Added `DeferredMutator` and `bundle.Defer` function which allows to
always execute some mutators either in the end of execution chain or
after error occurs in the middle of execution chain.

Usage as follows:

```
deferredMutator := bundle.Defer([]bundle.Mutator{
    lock.Acquire()
    transform.DoSomething(),
    //...
}, []bundle.Mutator{
    lock.Release(),
})
```
In such case `lock.Release()` will always be executed: either when all
operations above succeed or when any of them fails

## Tests
Before the change

```
andrew.nester@HFW9Y94129 multiples-tasks % bricks bundle deploy
Starting upload of bundle files
Uploaded bundle files at /Users/andrew.nester@databricks.com/.bundle/simple-task/development/files!

Error: terraform not initialized
andrew.nester@HFW9Y94129 multiples-tasks % bricks bundle deploy
Error: deploy lock acquired by andrew.nester@databricks.com at 2023-05-10 16:41:22.902659 +0200 CEST. Use --force to override

```

After the change
```
andrew.nester@HFW9Y94129 multiples-tasks % bricks bundle deploy 
Starting upload of bundle files
Uploaded bundle files at /Users/andrew.nester@databricks.com/.bundle/simple-task/development/files!

Error: terraform not initialized
andrew.nester@HFW9Y94129 multiples-tasks % bricks bundle deploy
Starting upload of bundle files
Uploaded bundle files at /Users/andrew.nester@databricks.com/.bundle/simple-task/development/files!

Error: terraform not initialized
```
2023-05-16 18:01:50 +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 Added ability for deferred mutator execution (#380) 2023-05-16 18:01:50 +02:00
cmd Add support for variables in bundle config (#359) 2023-05-15 11:34:05 +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 Added ability for deferred mutator execution (#380) 2023-05-16 18:01:50 +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.32 (#388) 2023-05-15 16:37:47 +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 Revert "Bump github.com/imdario/mergo from 0.3.13 to 0.3.15" (#381) 2023-05-10 18:02:10 +02:00
go.sum Revert "Bump github.com/imdario/mergo from 0.3.13 to 0.3.15" (#381) 2023-05-10 18:02:10 +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.