Commit Graph

72 Commits

Author SHA1 Message Date
Pieter Noordhuis a7701cc8f3
Store project object in context.Context instead of global (#61)
* Load project root from `BRICKS_ROOT` environment variable
* Rename project.Project -> project.Config
* Rename project.inner -> project.project
* Upgrade cobra to 1.5.0 for cmd.SetContext
2022-09-16 11:06:58 +02:00
shreyas-goenka 836ab58473
Fix flaky test `TestDiff` (#59) 2022-09-15 15:40:47 +02:00
shreyas-goenka f9b66b3536
Make `bricks sync` feature work (#48)
Tested manually and partially by unit tests
2022-09-14 17:50:29 +02:00
shreyas-goenka 21bc774491
Replace scim Me terraform call with go sdk (#46)
This PR:
1. Replaces scim.Me call to use the go SDK instead of the terraform
client
2. Removes terraform client from bricks project

Tested manually that the scim.Me call works now and returns the correct
user
go build works
2022-09-08 15:50:00 +02:00
Pieter Noordhuis 2e12a2aa01
Make tests pass (#40)
By:
* Add .gitkeep to retain test fixture directories under
./python/testdata
* Move GitHub related functionality to ./experimental (it is not in use)
* Comment out test in ./cmd/sync
* Fix test in ./git
2022-09-07 20:08:42 +02:00
Pieter Noordhuis 80a4c47d62
Fix lint error regarding struct with unexported fields (#38)
Unexported fields are skipped during marshalling, so this would be a
nop.

The code in `./cmd/sync/github*.go` is currently unused.

Confirmed that staticcheck passes when run with:

```
staticcheck -checks SA9005 ./...
```
2022-09-07 15:15:07 +02:00
Pieter Noordhuis c00db56d84
Fix lint errors for using deprecated functionality (#35)
Functionality from `io/ioutil` has moved to the `io` and `os` packages
in go1.16 ([reference](https://pkg.go.dev/io/ioutil)).

Confirmed that staticcheck passes when run with:

```
staticcheck -checks SA1019 ./...
```
2022-09-07 14:30:10 +02:00
Pieter Noordhuis 67b2e4206f
Use t.Setenv instead of custom implementation (#34)
Follow up for #18. This function was introduced in go1.17. As of #19 we
require go1.18, so we can use it.
2022-09-07 13:24:11 +02:00
shreyas-goenka 96efd0e2e4
Replace terraform dependency with go sdk (#19)
Issue: https://github.com/databricks/bricks/issues/17

`./bricks fs ls ...` command works
`./bricks launch ...` command works

Did not test other changes as the readme claims other commands don't
work anyways :) cc: @nfx

TODO left for this PR:
2. Replace terraform scim.Me once its there in go SDK
(https://github.com/databricks/databricks-sdk-go/issues/56)
2022-09-07 11:55:59 +02:00
Kartik Gupta f070c24399
Write default header only if `DEFAULT` section exists (#31) 2022-09-06 18:04:05 +02:00
Kartik Gupta 30a7de621a
Add more flags to `configure` command (#29) 2022-09-06 16:37:58 +02:00
Kartik Gupta 457f3ad3c2
Add `bricks configure` command to bricks CLI (#18)
* bricks configure

* remove t.setenv

* Read token and host from stdin

* Update .vscode/testing.code-snippets

Co-authored-by: Serge Smertin <259697+nfx@users.noreply.github.com>

Co-authored-by: Serge Smertin <259697+nfx@users.noreply.github.com>
2022-09-05 20:25:54 +02:00
Shreyas Goenka 9951068c62
Revert "Using go sdk for ./bricks fs ls DIR_NAME command"
This reverts commit 6217d20e57.
2022-09-01 13:42:34 +02:00
Shreyas Goenka 6217d20e57
Using go sdk for ./bricks fs ls DIR_NAME command 2022-08-31 19:31:58 +02:00
Serge Smertin 32ae59c1bc Experimental sync command 2022-07-07 20:56:59 +02:00
Serge Smertin ae2dc104f9 add some comments to commands package 2022-05-20 20:43:29 +02:00
Serge Smertin 1b38687e2d more TODO's 2022-05-16 12:50:50 +02:00
Serge Smertin 154fb8a967 added basic init command for `databricks.yml` 2022-05-14 19:55:55 +02:00
Serge Smertin 4e8955085e moved commands to own packages 2022-05-14 19:54:35 +02:00
Serge Smertin 2dab552829 Added `launch` command and release pipeline 2022-05-13 17:43:54 +02:00
Serge Smertin 02e62a7176 added `fs ls` command prototype 2022-05-13 16:21:47 +02:00
Serge Smertin 15fd93a012 Initial commit 2022-05-13 15:30:22 +02:00