mirror of https://github.com/databricks/cli.git
e872b587cc
JSON output makes it easy to process synchronization progress information in downstream tools (e.g. the vscode extension). This changes introduces a `sync.Event` interface type for progress events as well as an `sync.EventNotifier` that lets the sync code pass along progress events to calling code. Example output in text mode (default, this uses the existing logger calls): ```text 2023/03/03 14:07:17 [INFO] Remote file sync location: /Repos/pieter.noordhuis@databricks.com/... 2023/03/03 14:07:18 [INFO] Initial Sync Complete 2023/03/03 14:07:22 [INFO] Action: PUT: foo 2023/03/03 14:07:23 [INFO] Uploaded foo 2023/03/03 14:07:23 [INFO] Complete 2023/03/03 14:07:25 [INFO] Action: DELETE: foo 2023/03/03 14:07:25 [INFO] Deleted foo 2023/03/03 14:07:25 [INFO] Complete ``` Example output in JSON mode: ```json {"timestamp":"2023-03-03T14:08:15.459439+01:00","seq":0,"type":"start"} {"timestamp":"2023-03-03T14:08:15.459461+01:00","seq":0,"type":"complete"} {"timestamp":"2023-03-03T14:08:18.459821+01:00","seq":1,"type":"start","put":["foo"]} {"timestamp":"2023-03-03T14:08:18.459867+01:00","seq":1,"type":"progress","action":"put","path":"foo","progress":0} {"timestamp":"2023-03-03T14:08:19.418696+01:00","seq":1,"type":"progress","action":"put","path":"foo","progress":1} {"timestamp":"2023-03-03T14:08:19.421397+01:00","seq":1,"type":"complete","put":["foo"]} {"timestamp":"2023-03-03T14:08:22.459238+01:00","seq":2,"type":"start","delete":["foo"]} {"timestamp":"2023-03-03T14:08:22.459268+01:00","seq":2,"type":"progress","action":"delete","path":"foo","progress":0} {"timestamp":"2023-03-03T14:08:22.686413+01:00","seq":2,"type":"progress","action":"delete","path":"foo","progress":1} {"timestamp":"2023-03-03T14:08:22.688989+01:00","seq":2,"type":"complete","delete":["foo"]} ``` --------- Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> |
||
---|---|---|
.github | ||
.vscode | ||
bundle | ||
cmd | ||
docs | ||
experimental/github | ||
folders | ||
internal | ||
libs | ||
project | ||
python | ||
retries | ||
sandbox | ||
terraform | ||
.gitignore | ||
.goreleaser.yaml | ||
Makefile | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go | ||
main_test.go |
README.md
Bricks CLI 🧱
Where's "data"? Secured by the unity catalog. Projects build lifecycle is secured by bricks
🧱
This is an early PoC at this stage. make build
(or download the latest from releases page).
Reuses authentication from Databricks CLI. And terraform provider. See details here: https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs#environment-variables
Supports:
- Databricks CLI
- Databricks CLI Profiles
- Azure CLI Auth
- Azure MSI Auth
- Azure SPN Auth
- Google OIDC Auth
- Direct
DATABRICKS_HOST
,DATABRICKS_TOKEN
orDATABRICKS_USERNAME
+DATABRICKS_PASSWORD
variables.
What works:
./bricks fs ls /
./bricks test
./bricks launch test.py
What doesn't work:
- Everything else.
This project reuses some code from Databricks Terraform Provider