Commit Graph

1778 Commits

Author SHA1 Message Date
Shreyas Goenka de5a348b4e
Merge remote-tracking branch 'origin' into bundle-exec 2025-03-05 11:42:30 +01:00
Shreyas Goenka acff901127
fix windows 2025-03-05 11:39:09 +01:00
Andrew Nester 4dba35dff4
Upgrade TF provider to 1.68.0 (#2426)
## Changes
Upgrade TF provider to 1.68.0

- Added support for Volumes as a destination for Cluster log conf
2025-03-05 10:20:55 +00:00
Andrew Nester 294db2ecca
Upgrade Go SDK to 0.59.0 (#2425)
## Changes
- Added `service-principal-secrets` command
- Added `budget-policy-id` for apps
- `experiments.log-inputs` now requires `ID` parameter as an input
- Added `genie.get-space` command
- Added `providers.list-provider-share-assets` command

For the whole list of SDK changes see:
https://github.com/databricks/databricks-sdk-go/releases/tag/v0.59.0
2025-03-05 10:20:51 +00:00
Shreyas Goenka 09c05db3b1
- 2025-03-05 11:16:40 +01:00
Shreyas Goenka fcc2966118
- 2025-03-05 11:14:08 +01:00
Shreyas Goenka 996b58a135
fix pwd 2025-03-05 11:12:05 +01:00
Shreyas Goenka 4ef33dc2b4
Revert "split windows test"
This reverts commit 2c773683bc.
2025-03-05 11:09:26 +01:00
Shreyas Goenka 2c773683bc
split windows test 2025-03-05 11:08:09 +01:00
shreyas-goenka b21fdac209
Update VSCode settings to resolve files named `script` as shell scripts (#2419)
## Why
VSCode for me resolves `script` as YAML files showing incorrect syntax
coloring. This setting forces VSCode to treat all files named `script`
as shell scripts leading to better syntax highlighting.

These files are common place in our acceptance tests.

## Tests
Manually.
2025-03-05 10:02:40 +00:00
Shreyas Goenka 39ec48a602
remove error struct 2025-03-05 10:58:18 +01:00
Shreyas Goenka b5e21231eb
- 2025-03-05 10:49:47 +01:00
Shreyas Goenka 7fb464b496
lint 2025-03-05 10:47:58 +01:00
Shreyas Goenka 2212aa2597
proper printing 2025-03-05 10:44:43 +01:00
Shreyas Goenka 39d0b13c4f
- 2025-03-05 10:29:57 +01:00
Shreyas Goenka 150a51c11a
merge 2025-03-05 10:29:21 +01:00
Denis Bilenko 1fbb81eb87
Disable ruff cache (#2430)
There is no perf difference, it's fast in both cases:

```
~/work/cli % hyperfine 'ruff format -qn'
Benchmark 1: ruff format -qn
  Time (mean ± σ):      22.5 ms ±   4.1 ms    [User: 23.6 ms, System: 106.7 ms]
  Range (min … max):    17.3 ms …  50.2 ms    52 runs
```

but it no longer produces .ruff_cache which can confuse acceptance test
runner

```
~/work/cli % find . -type d | grep ruff
./.ruff_cache
./.ruff_cache/0.8.3
./libs/notebook/testdata/.ruff_cache
./libs/notebook/testdata/.ruff_cache/0.8.3
./libs/sync/testdata/.ruff_cache
./libs/sync/testdata/.ruff_cache/0.8.3
./acceptance/bundle/templates/default-sql/.ruff_cache
./acceptance/bundle/templates/default-sql/.ruff_cache/0.8.3
```
2025-03-05 08:45:51 +01:00
Shreyas Goenka be3be9cb2f
try streaming output 2025-03-04 18:22:12 +01:00
Andrew Nester 41961226be
Switch to use GET workspaces-files/{name} instead of workspace/export for state files (#2423)
## Changes
Switch to use GET workspaces-files/{name} instead of workspace/export
for state files.

## Why
`/api/2.0./workspaces-files/{name}` has a higher limit which allows to
export state files larger than 10 MBs (which is the current limit for
`workspace/export`). We don't use the same API for read in other places
and fully replacing existing Filer because it doesn't correct get the
file content for notebooks and returns "File Not Found" error instead.

## Tests
All existing tests pass
2025-03-04 15:03:51 +00:00
shreyas-goenka 549b226cbc
Add the `auth.ProcessEnv` function (#2404)
## Changes
This function provides all environment variables necessary to
authenticate the downstream applications to the same credentials as the
parent process.

It's used in https://github.com/databricks/cli/pull/2278 and will also
be useful for the `databricks bundle exec` command.

## Tests
Unit test.
2025-03-04 14:47:11 +00:00
Anton Nekipelov c0f5436a28
Add support for schemas in deployment bind/unbind commands (#2406)
## Changes
1. Changed `FindResourceByConfigKey` to return schema resources
2. Implemented the `Exists` method for schema resources

## Why
This PR adds support for schema resources in deployment operations,
enabling users to:
- Bind schemas using `databricks bundle deployment bind <myschema_key>
<schema_full_name>`
- Unbind schemas using `databricks bundle deployment unbind
<myschema_key>`

Where:
- `myschema_key` is a resource key defined in the bundle's .yml file
- `schema_full_name` references an existing schema in the Databricks
workspace

These capabilities allow for more flexible resource management of
schemas within bundles.

## Tests

Added a new integration test that tests bind and unbind methods together
with bundle deployment and destruction.
2025-03-04 12:46:39 +00:00
Anton Nekipelov bcce6b0ece
Enable TestAuthDescribeFailure integration test (#2420)
## Changes
1. remove t.Skip directive from TestAuthDescribeFailure integration test
2. remove checking the host in the test

## Why
1. This enables integration test that exercises `databricks auth
describe` command, which was previously throwing errors in the CI/CD
pipeline. For the nonexistent profile check to fail, we need to create a
new profile file for the CLI to check (otherwise the configuration skips
checking of the provided profile actually exists).
2. I removed the assertion for the host part because it is not relevant
for the test, and setting that up just required more code in the test
setup.

## Tests
The integration test is passing
2025-03-04 11:43:26 +00:00
Shreyas Goenka 647dab0a66
some cleanup 2025-03-03 20:16:12 +01:00
Shreyas Goenka 112a9de90a
- 2025-03-03 20:10:27 +01:00
Shreyas Goenka c0d34f7827
- 2025-03-03 20:09:20 +01:00
Shreyas Goenka 406103623d
- 2025-03-03 20:08:33 +01:00
Shreyas Goenka 769acf7fd3
- 2025-03-03 20:07:51 +01:00
Shreyas Goenka edf705188d
more cleanup 2025-03-03 20:06:24 +01:00
Shreyas Goenka 0c9fbf7b23
- 2025-03-03 19:58:14 +01:00
Shreyas Goenka 007a714750
- 2025-03-03 19:56:29 +01:00
Shreyas Goenka eb58d11f9b
- 2025-03-03 19:52:45 +01:00
Shreyas Goenka bbbbf30db3
- 2025-03-03 19:51:39 +01:00
Shreyas Goenka 93c5e3f2ae
simplify streaming 2025-03-03 19:50:56 +01:00
Shreyas Goenka fd2600cbea
return stdout / stderr errors after 2025-03-03 19:32:43 +01:00
Shreyas Goenka 88b6dc8e16
use $CLI instead of databricks 2025-03-03 19:31:41 +01:00
Shreyas Goenka 1996d3f824
do not run on cloud 2025-03-03 19:29:19 +01:00
Shreyas Goenka 898b2c1cc3
merge 2025-03-03 19:21:18 +01:00
Shreyas Goenka a2748d531b
cleanup 2025-03-03 19:19:39 +01:00
Shreyas Goenka 05cd18c0be
exit code done 2025-03-03 18:52:02 +01:00
Shreyas Goenka 993956294a
added flags are not parsed check 2025-03-03 18:35:03 +01:00
Shreyas Goenka 58d28a9c92
add more tests for profile and target 2025-03-03 18:26:17 +01:00
Shreyas Goenka 080d1bf8b9
make the profile is passed test work 2025-03-03 18:13:56 +01:00
Andrew Nester 010f88f84e
Added a warning when `config` section is used in apps (#2416)
## Changes
Added a warning when `config` section is used in apps

## Why
To avoid the confusion between using apps in DABs and outside of DABs,
we want to provide only one way of configuring apps runtime
configuration - by using `app.yml` file in the root of the app.

## Tests
Added acceptance tests
2025-03-03 16:40:28 +00:00
Shreyas Goenka f0d1dc56c8
fix replacement 2025-03-03 17:40:04 +01:00
Shreyas Goenka 152d982c9b
add cases for the target flag 2025-03-03 16:58:57 +01:00
Andrew Nester 8b7e0ba683
test: Lock setuptools version in TestDefaultPython test (#2421)
## Changes
Lock setuptools version to 75.8.2 (latest as of March 3, 2025)

## Why
As part of the tests `uv install` was installing latest version of
setuptools which led to all tests started to fail on Feb 25 when 75.8.1
setuptools version was released and which changed the naming of the
output built artifacts
https://setuptools.pypa.io/en/stable/history.html#v75-8-1

This change prevents us from breakages like this.

## Tests
Existing tests pass
2025-03-03 15:53:58 +00:00
Andrew Nester 3b07265113
Restrict same name libraries check for only whl and jar types (#2401)
## Changes
Same name libraries check only valid for local libraries. Local
libraries are only supported for Whl and Jar types. Hence we can
restrict matching pattern only to these libraries.

## Tests
Existing acceptance tests pass
2025-03-03 15:34:41 +00:00
shreyas-goenka 807a37b36a
Add the `auth.EnvVars` function (#2403)
## Changes
This PR adds the auth.EnvVars function, which is a list of all
environment variables that the SDK uses to read auth configuration.

This is useful for spawning subprocesses since you can unset all auth
environment variables to clean up the environment before configuring the
auth.

It's used in #2278 today and will also be useful for the `databricks
bundle exec` command.
 
## Tests
Unit test.
2025-03-03 14:58:43 +00:00
Shreyas Goenka c442378f45
clarify the cwd plan 2025-03-03 15:19:18 +01:00
Shreyas Goenka 1b5ff48873
execute scripts from bundle root 2025-03-03 15:12:50 +01:00