Pieter Noordhuis
bee7a16cb0
Remove dependency on global state for remaining commands ( #613 )
...
## Changes
This removes the remaining dependency on global state and unblocks work
to parallelize integration tests. As is, we can already uncomment an
integration test that had to be skipped because of other tests tainting
global state. This is no longer an issue.
Also see #595 and #606 .
## Tests
* Unit and integration tests pass.
* Manually confirmed the help output is the same.
2023-07-27 10:03:08 +00:00
Pieter Noordhuis
b9406efd27
Update configure command ( #482 )
...
## Changes
This now uses:
* libs/cmdio to determine interactivity and perform prompting
* libs/databrickscfg to persist the profile
It loads a config.Config structure from the environment just like we do
for unified authentication. It is therefore possible to specify both the
host and token with environment variables.
## Tests
```
pieter.noordhuis@L4GHXDT29P /tmp % export DATABRICKS_CONFIG_FILE=.databrickscfg
pieter.noordhuis@L4GHXDT29P /tmp % databricks configure
Databricks Host: https://foo.bar
Personal Access Token: *****
pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg
[DEFAULT]
host = https://foo.bar
token = token
pieter.noordhuis@L4GHXDT29P /tmp % echo token | databricks configure
Error: host must be set in non-interactive mode
pieter.noordhuis@L4GHXDT29P /tmp % echo token | databricks configure --host foo
Error: must start with https://
pieter.noordhuis@L4GHXDT29P /tmp % echo token | databricks configure --host https://foo
pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg
[DEFAULT]
host = https://foo
token = token
pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg
pieter.noordhuis@L4GHXDT29P /tmp % databricks configure --host https://foo
Personal Access Token: ******
pieter.noordhuis@L4GHXDT29P /tmp % cat .databrickscfg
[DEFAULT]
host = https://foo
token = token2
```
2023-06-15 12:50:19 +00:00
Pieter Noordhuis
98ebb78c9b
Rename bricks -> databricks ( #389 )
...
## Changes
Rename all instances of "bricks" to "databricks".
## Tests
* Confirmed the goreleaser build works, uses the correct new binary
name, and produces the right archives.
* Help output is confirmed to be correct.
* Output of `git grep -w bricks` is minimal with a couple changes
remaining for after the repository rename.
2023-05-16 18:35:39 +02:00
shreyas-goenka
d52fc12644
Disable bricks fs and configure commands ( #320 )
...
## Changes
<!-- Summary of your changes that are easy to understand -->
## Tests
<!-- How is this tested? -->
2023-04-12 00:35:16 +02:00
shreyas-goenka
375eb1c502
Remove package project ( #321 )
...
## Changes
<!-- Summary of your changes that are easy to understand -->
This PR removes the project package and it's dependents in the bricks
repo
## Tests
<!-- How is this tested? -->
2023-04-11 16:59:27 +02:00
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
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