Commit Graph

1741 Commits

Author SHA1 Message Date
Shreyas Goenka 972741dcb4
add test for timeout 2025-03-05 16:09:19 +01:00
Shreyas Goenka a652b449cb
- 2025-03-05 16:00:28 +01:00
Shreyas Goenka a2825ca89a
add acceptance tests 2025-03-05 15:57:41 +01:00
Shreyas Goenka b3a479ce73
add sync logger 2025-03-05 15:21:12 +01:00
Shreyas Goenka f6592d9bbd
Add synchronous logger for telemetry 2025-03-05 14:54:30 +01:00
Russell Clarey 3a3076d9ea
Output deprecated annotations in the JSON schema (#2422)
## Changes
Start outputting `deprecated` and `deprecationMessage` annotations in
the JSON schema

## Why
So that deprecated fields are shown as deprecated in VSCode (and other
editors)

## Tests
- manually tested

||||
|---|---|---|
|<img width="682" alt="Screenshot 2025-03-03 at 16 04 21"
src="https://github.com/user-attachments/assets/9712aa2f-0f41-48a9-8bd0-ec92b8b75c3f"
/>|<img width="682" alt="Screenshot 2025-03-03 at 16 04 29"
src="https://github.com/user-attachments/assets/a14f3523-ad85-4fed-96d7-2a8cf3a458e5"
/>|<img width="682" alt="Screenshot 2025-03-03 at 16 06 03"
src="https://github.com/user-attachments/assets/b9ab1050-048e-4c14-b183-96d615a4fbc1"
/>|
2025-03-05 11:17:03 +00:00
Denis Bilenko a26461c5a3
Do not modify/create .gitignore in bundle root (#2429)
## Changes
- Do not modify or edit .gitignore in bundle root.
- Instead create .databricks/.gitignore with content set to "*"

## Why
Merging our changes into existing .gitignore is complicated and adding
.gitignore where it's not expected adds to the noise. Other tools also
use the approach in this PR (e.g. ruff creates .ruff_cache/.gitignore).

## Tests
- Modified templates/default-sql to capture this new file.
2025-03-05 10:57:05 +00: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 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
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
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
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
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
Denis Bilenko 5c146ca57a
Synchronize logging in cmdio (#2418)
## Changes
Add mutex synchronization in cmdio logger Log() method.

## Why

Since we issue multiple calls to underlying writer, we should lock the
whole method, otherwise we can get broken messages. One that can be
easily reproduced today is

```
 hyperfine -m 100 --show-output 'go test ./acceptance -run ^TestAccept$/^bundle$/^artifacts$/^whl_multiple$ -count=1'
...
            -Uploading my_test_code-0.0.1-py3-none-any.whl...
            -Uploading my_test_code_2-0.0.1-py3-none-any.whl...
            +Uploading my_test_code-0.0.1-py3-none-any.whl...Uploading my_test_code_2-0.0.1-py3-none-any.whl...

Error: Command terminated with non-zero exit code 1 in benchmark iteration 54. Use the '-i'/'--ignore-failure' option if you want to ignore this. Alternatively, use the '--show-output' option to debug what went wrong.
```

An alternative could be to prepare a message fully in a local buffer and
write it in one call (I’m assuming underlying writer is still
synchronized). However, that’s more complicated and unclear if it’s
worth it, perf-wise.

## Tests
With this change I’m running the same hyperfine command with 1000
iterations with no failures.
2025-03-03 13:42:43 +00:00
Denis Bilenko e4cd782852
Remove bundle.{Parallel,ReadOnlyBundle} (#2414)
## Changes
- Remove bundle.Parallel & bundle.ReadOnlyBundle.
- Add bundle.ApplyParallel, as a helper to migrate from bundle.Parallel.
- Keep ReadOnlyMutator as a separate type but it's now a subtype of
Mutator so it works on regular *Bundle. Having it as a separate type
prevents non-readonly mutators being passed to ApplyParallel
- validate.Validate becomes a function (was Mutator).

## Why
This a follow up to #2390 where we removed most of the tools to
construct chains of mutators. Same motivation applies here.

When it comes to read-only bundles, it's a leaky abstraction -- since
it's a shallow copy, it does not actually guarantee or enforce readonly
access to bundle. A better approach would be to run parallel operations
on independent narrowly-focused deep-copied structs, with just enough
information to carry out the task (this is not implemented here, but the
eventual goal). Now that we can just write regular code in phases and
not limited to mutator interface, we can switch to that approach.

## Tests
Existing tests.

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
2025-03-03 13:35:36 +00:00
Denis Bilenko 2c5b61538d
acc: Prevent regex in test.toml from consuming too much (#2417)
The original regex can consume both lines and sometimes it does.
2025-03-03 12:55:52 +00:00
shreyas-goenka 25a7e0a72b
Do not use `.MustString()` in auth interpolation warning (#2412)
## Why
Addresses post merge feedback from
https://github.com/databricks/cli/pull/2399#discussion_r1975091730

## Tests
N/A
2025-03-03 12:03:46 +00:00
Denis Bilenko 8f8f24c3a9
Convert python wheel tests to acceptance (#2396)
## Changes

Rewrite bundle/tests/python_wheel_test.go into acceptance tests. The
same configs are used, but the test now runs 'bundle deploy' and in
addition to checking the files on the file system, also checks that the
files were uploaded and records jobs/create request.

There is a new test helper bin/find.py which filters out paths based on
regex, asserts on number of expected results. I've added it because
'find' on Windows behaves differently, so this helps avoid
cross-platform differences.
2025-03-03 11:09:25 +00:00
shreyas-goenka 03e4bb2575
Update warning for includes outside root to only mention databricks.yml (#2411)
## Why
Addresses feedback from this thread:
https://github.com/databricks/cli/pull/2389#discussion_r1975760462.
2025-03-03 09:21:39 +00:00
dependabot[bot] b95662c18e
build(deps): bump docker/setup-qemu-action from 3.3.0 to 3.6.0 (#2410)
Bumps
[docker/setup-qemu-action](https://github.com/docker/setup-qemu-action)
from 3.3.0 to 3.6.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/setup-qemu-action/releases">docker/setup-qemu-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.6.0</h2>
<ul>
<li>Display binfmt version by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/setup-qemu-action/pull/202">docker/setup-qemu-action#202</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-qemu-action/compare/v3.5.0...v3.6.0">https://github.com/docker/setup-qemu-action/compare/v3.5.0...v3.6.0</a></p>
<h2>v3.5.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.54.0 to 0.56.0 in
<a
href="https://redirect.github.com/docker/setup-qemu-action/pull/205">docker/setup-qemu-action#205</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-qemu-action/compare/v3.4.0...v3.5.0">https://github.com/docker/setup-qemu-action/compare/v3.4.0...v3.5.0</a></p>
<h2>v3.4.0</h2>
<ul>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.49.0 to 0.54.0 in
<a
href="https://redirect.github.com/docker/setup-qemu-action/pull/193">docker/setup-qemu-action#193</a>
<a
href="https://redirect.github.com/docker/setup-qemu-action/pull/197">docker/setup-qemu-action#197</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-qemu-action/compare/v3.3.0...v3.4.0">https://github.com/docker/setup-qemu-action/compare/v3.3.0...v3.4.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="29109295f8"><code>2910929</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-qemu-action/issues/202">#202</a>
from crazy-max/binfmt-version</li>
<li><a
href="7ffe24aa9a"><code>7ffe24a</code></a>
chore: update generated content</li>
<li><a
href="17bc18bb05"><code>17bc18b</code></a>
display binfmt version</li>
<li><a
href="5964de0df5"><code>5964de0</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-qemu-action/issues/205">#205</a>
from docker/dependabot/npm_and_yarn/docker/actions-to...</li>
<li><a
href="862b6633f8"><code>862b663</code></a>
chore: update generated content</li>
<li><a
href="138de3b646"><code>138de3b</code></a>
build(deps): bump <code>@​docker/actions-toolkit</code> from 0.54.0 to
0.56.0</li>
<li><a
href="4574d27a47"><code>4574d27</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-qemu-action/issues/195">#195</a>
from radarhere/patch-1</li>
<li><a
href="7a38281c35"><code>7a38281</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-qemu-action/issues/197">#197</a>
from docker/dependabot/npm_and_yarn/docker/actions-to...</li>
<li><a
href="7a1c63f9e5"><code>7a1c63f</code></a>
build(deps): bump <code>@​docker/actions-toolkit</code> from 0.53.0 to
0.54.0</li>
<li><a
href="2825a1268f"><code>2825a12</code></a>
Fixed typo</li>
<li>Additional commits viewable in <a
href="53851d1459...29109295f8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/setup-qemu-action&package-manager=github_actions&previous-version=3.3.0&new-version=3.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 08:53:36 +00:00
dependabot[bot] 44eb875fca
build(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 (#2408)
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 4.6.0 to 4.6.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v4.6.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use artifact 2.2.2 package by <a
href="https://github.com/yacaovsnc"><code>@​yacaovsnc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/673">actions/upload-artifact#673</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v4.6.1">https://github.com/actions/upload-artifact/compare/v4...v4.6.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4cec3d8aa0"><code>4cec3d8</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/673">#673</a>
from actions/yacaovsnc/artifact_2.2.2</li>
<li><a
href="e9fad966cc"><code>e9fad96</code></a>
license cache update for artifact</li>
<li><a
href="b26fd06e9d"><code>b26fd06</code></a>
Update to use artifact 2.2.2 package</li>
<li>See full diff in <a
href="65c4c4a1dd...4cec3d8aa0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=4.6.0&new-version=4.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 08:52:47 +00:00
dependabot[bot] ab5c21176b
build(deps): bump golangci/golangci-lint-action from 6.2.0 to 6.5.0 (#2409)
Bumps
[golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action)
from 6.2.0 to 6.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/golangci/golangci-lint-action/releases">golangci/golangci-lint-action's
releases</a>.</em></p>
<blockquote>
<h2>v6.5.0</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Changes</h3>
<ul>
<li>feat: verify with the JSONSchema by default by <a
href="https://github.com/ldez"><code>@​ldez</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1171">golangci/golangci-lint-action#1171</a></li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>build(deps): bump <code>@​octokit/request-error</code> from 5.1.0 to
5.1.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1169">golangci/golangci-lint-action#1169</a></li>
<li>build(deps): bump <code>@​octokit/endpoint</code> from 9.0.5 to
9.0.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1170">golangci/golangci-lint-action#1170</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/golangci/golangci-lint-action/compare/v6.4.1...v6.5.0">https://github.com/golangci/golangci-lint-action/compare/v6.4.1...v6.5.0</a></p>
<h2>v6.4.1</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Changes</h3>
<ul>
<li>fix: use config arg for verify by <a
href="https://github.com/ldez"><code>@​ldez</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1168">golangci/golangci-lint-action#1168</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/golangci/golangci-lint-action/compare/v6.4.0...v6.4.1">https://github.com/golangci/golangci-lint-action/compare/v6.4.0...v6.4.1</a></p>
<h2>v6.4.0</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Changes</h3>
<ul>
<li>chore: extract patch related code by <a
href="https://github.com/ldez"><code>@​ldez</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1166">golangci/golangci-lint-action#1166</a></li>
<li>feat: add an option to verify with the JSONSchema by <a
href="https://github.com/ldez"><code>@​ldez</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1167">golangci/golangci-lint-action#1167</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/golangci/golangci-lint-action/compare/v6.3.3...v6.4.0">https://github.com/golangci/golangci-lint-action/compare/v6.3.3...v6.4.0</a></p>
<h2>v6.3.3</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Changes</h3>
<ul>
<li>fix: go.mod parsing by <a
href="https://github.com/ldez"><code>@​ldez</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1165">golangci/golangci-lint-action#1165</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/golangci/golangci-lint-action/compare/v6.3.2...v6.3.3">https://github.com/golangci/golangci-lint-action/compare/v6.3.2...v6.3.3</a></p>
<h2>v6.3.2</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Changes</h3>
<ul>
<li>fix: path patch by <a
href="https://github.com/ldez"><code>@​ldez</code></a> in <a
href="https://redirect.github.com/golangci/golangci-lint-action/pull/1162">golangci/golangci-lint-action#1162</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2226d7cb06"><code>2226d7c</code></a>
6.5.0</li>
<li><a
href="8d744d5b7f"><code>8d744d5</code></a>
feat: verify with the JSONSchema by default (<a
href="https://redirect.github.com/golangci/golangci-lint-action/issues/1171">#1171</a>)</li>
<li><a
href="0e58f8e7ab"><code>0e58f8e</code></a>
build(deps): bump <code>@​octokit/endpoint</code> from 9.0.5 to 9.0.6
(<a
href="https://redirect.github.com/golangci/golangci-lint-action/issues/1170">#1170</a>)</li>
<li><a
href="6a3fb764d5"><code>6a3fb76</code></a>
build(deps): bump <code>@​octokit/request-error</code> from 5.1.0 to
5.1.1 (<a
href="https://redirect.github.com/golangci/golangci-lint-action/issues/1169">#1169</a>)</li>
<li><a
href="696fa5c0e7"><code>696fa5c</code></a>
chore: clean workflows</li>
<li><a
href="80284ede25"><code>80284ed</code></a>
chore: use ubuntu-22.04-arm</li>
<li><a
href="818ec4d51a"><code>818ec4d</code></a>
6.4.1</li>
<li><a
href="1c50240be2"><code>1c50240</code></a>
fix: use config arg for verify (<a
href="https://redirect.github.com/golangci/golangci-lint-action/issues/1168">#1168</a>)</li>
<li><a
href="0adbc47a59"><code>0adbc47</code></a>
6.4.0</li>
<li><a
href="f7463c56f6"><code>f7463c5</code></a>
feat: add an option to verify with the JSONSchema (<a
href="https://redirect.github.com/golangci/golangci-lint-action/issues/1167">#1167</a>)</li>
<li>Additional commits viewable in <a
href="ec5d18412c...2226d7cb06">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golangci/golangci-lint-action&package-manager=github_actions&previous-version=6.2.0&new-version=6.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 08:50:37 +00:00
dependabot[bot] 3fc74ddf06
build(deps): bump actions/setup-python from 5.3.0 to 5.4.0 (#2407)
Bumps [actions/setup-python](https://github.com/actions/setup-python)
from 5.3.0 to 5.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-python/releases">actions/setup-python's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.0</h2>
<h2>What's Changed</h2>
<h3>Enhancements:</h3>
<ul>
<li>Update cache error message by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/968">actions/setup-python#968</a></li>
<li>Enhance Workflows: Add Ubuntu-24, Remove Python 3.8 by <a
href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/985">actions/setup-python#985</a></li>
<li>Configure Dependabot settings by <a
href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1008">actions/setup-python#1008</a></li>
</ul>
<h3>Documentation changes:</h3>
<ul>
<li>Readme update - recommended permissions by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1009">actions/setup-python#1009</a></li>
<li>Improve Advanced Usage examples by <a
href="https://github.com/lrq3000"><code>@​lrq3000</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/645">actions/setup-python#645</a></li>
</ul>
<h3>Dependency updates:</h3>
<ul>
<li>Upgrade <code>undici</code> from 5.28.4 to 5.28.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1012">actions/setup-python#1012</a></li>
<li>Upgrade <code>urllib3</code> from 1.25.9 to 1.26.19 in
/<strong>tests</strong>/data by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/895">actions/setup-python#895</a></li>
<li>Upgrade <code>actions/publish-immutable-action</code> from 0.0.3 to
0.0.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1014">actions/setup-python#1014</a></li>
<li>Upgrade <code>@actions/http-client</code> from 2.2.1 to 2.2.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1020">actions/setup-python#1020</a></li>
<li>Upgrade <code>requests</code> from 2.24.0 to 2.32.2 in
/<strong>tests</strong>/data by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1019">actions/setup-python#1019</a></li>
<li>Upgrade <code>@actions/cache</code> to <code>^4.0.0</code> by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1007">actions/setup-python#1007</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/benwells"><code>@​benwells</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1009">actions/setup-python#1009</a></li>
<li><a
href="https://github.com/HarithaVattikuti"><code>@​HarithaVattikuti</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1008">actions/setup-python#1008</a></li>
<li><a href="https://github.com/lrq3000"><code>@​lrq3000</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/645">actions/setup-python#645</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v5...v5.4.0">https://github.com/actions/setup-python/compare/v5...v5.4.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="42375524e2"><code>4237552</code></a>
Improve Advanced Usage examples (<a
href="https://redirect.github.com/actions/setup-python/issues/645">#645</a>)</li>
<li><a
href="709bfa58ba"><code>709bfa5</code></a>
Bump requests from 2.24.0 to 2.32.2 in /<strong>tests</strong>/data (<a
href="https://redirect.github.com/actions/setup-python/issues/1019">#1019</a>)</li>
<li><a
href="ceb20b242d"><code>ceb20b2</code></a>
Bump <code>@​actions/http-client</code> from 2.2.1 to 2.2.3 (<a
href="https://redirect.github.com/actions/setup-python/issues/1020">#1020</a>)</li>
<li><a
href="0dc2d2cf0c"><code>0dc2d2c</code></a>
Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 (<a
href="https://redirect.github.com/actions/setup-python/issues/1014">#1014</a>)</li>
<li><a
href="feb9c6e7c6"><code>feb9c6e</code></a>
Bump urllib3 from 1.25.9 to 1.26.19 in /<strong>tests</strong>/data (<a
href="https://redirect.github.com/actions/setup-python/issues/895">#895</a>)</li>
<li><a
href="d0b4fc497a"><code>d0b4fc4</code></a>
Bump undici from 5.28.4 to 5.28.5 (<a
href="https://redirect.github.com/actions/setup-python/issues/1012">#1012</a>)</li>
<li><a
href="e3dfaac0fd"><code>e3dfaac</code></a>
Configure Dependabot settings (<a
href="https://redirect.github.com/actions/setup-python/issues/1008">#1008</a>)</li>
<li><a
href="b8cf3eb1eb"><code>b8cf3eb</code></a>
Use the new cache service: upgrade <code>@actions/cache</code> to
<code>^4.0.0</code> (<a
href="https://redirect.github.com/actions/setup-python/issues/1007">#1007</a>)</li>
<li><a
href="1928ae624d"><code>1928ae6</code></a>
Update README.md (<a
href="https://redirect.github.com/actions/setup-python/issues/1009">#1009</a>)</li>
<li><a
href="3fddbee787"><code>3fddbee</code></a>
Enhance Workflows: Add Ubuntu-24, Remove Python 3.8 (<a
href="https://redirect.github.com/actions/setup-python/issues/985">#985</a>)</li>
<li>Additional commits viewable in <a
href="0b93645e9f...42375524e2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=5.3.0&new-version=5.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 08:47:47 +00:00
Anton Nekipelov 9056fb58b7
Improve the PR template, add a "why" section (#2402)
## Changes
1. Add a Why section to the pull request template
2. Slightly improve language in the existing sections

## Why
Providing the right context for the reviewer in the PR description is
important as it usually cannot be inferred from the code itself. The new
section directly prompts the requester to provide such context

## Tests
Checked that the markdown is still rendered correctly in the local
viewer
2025-02-28 14:33:32 +00:00
Anton Nekipelov a2400f3025
Enable TestAuthDescribeSuccess integration test (#2392)
## Changes
1. remove t.Skip directive from TestAuthDescribeSuccess integration test
2. change the test code to account for environments where host value can
be prefixed with the https protocol part

## Why
This enables integration test that exercises `databricks auth describe`
command, which was previously throwing errors in the CI/CD pipeline

## Tests
Integration test is passing
2025-02-28 14:33:10 +00:00
Denis Bilenko 211ec62a70
acc: add Ignore setting to config (#2405)
Ignore output files using gitignore syntax.

## Changes
New Ignore setting in test.toml that will ignore specified files (syntax
is gitignore).

## Why

I'm using it in #2396 to ignore virtual env. It includes a lot of files.
The regular 'rm -fr .venv' approach only works if script get to that
point, but due to errors it might abort early. In that cases test runner
prints all unexpected files, polluting output. Ignoring those files at
test runner level ensure you never see them.

## Tests
Updated selftest/basic.
2025-02-28 14:23:50 +00:00
Anton Nekipelov 3aef065c5c
Refactor TestSparkJarTask* tests to support test environments without Java 8 (#2385)
## Changes
1. Refactored `TestSparkJarTaskDeployAndRunOnVolumes` and
`TestSparkJarTaskDeployAndRunOnWorkspace` to use a table-driven approach
for better organization of similar tests
2. Implemented `testutil.HasJDK()` to replace `testutil.RequireJDK` to
be able to skip tests
3. Ensured the test suite properly fails if no compatible Java version
is found

## Why
It can be tricky to have Java 8 installed on modern dev environments
(e.g. Mac on Apple M3 chip). The absence of which previously caused the
Spark Jar task tests to fail when run locally. This refactoring allows
such environments to be able to run "SparkJar" tests using a newer
Databricks Runtime.

## Tests
1. Ran `TestSparkJarTaskDeployAndRunOnVolumes` and
`TestSparkJarTaskDeployAndRunOnWorkspace` locally on Mac with Java11
installed.
2. Checked that tests against older runtimes are still being run and
passing in CI/CD environments
2025-02-28 08:39:21 +00:00
Andrew Nester 6a07e05e9b
Raise an error when there are multiple local libraries with the same basename used (#2382)
## Changes
It could happen that there are multiple artifacts defined in the bundle
which build and therefore deploy wheel packages with the same name. This
leads to conflict between these packages, they will overwrite each other
and therefore they should have different names instead

Fixes https://github.com/databricks/cli/issues/1674

Previous attempt (https://github.com/databricks/cli/pull/2297 +
https://github.com/databricks/cli/pull/2341) led to the breakage, this
PR fixes both issues.

## Tests
Added acceptance test
2025-02-27 16:32:50 +00:00
shreyas-goenka bc299cafb8
Add warning when variable interpolation is used for auth fields (#2399)
## Changes
This PR adds a warning which gives users clear guidance when they try to
use variable interpolation for an auth field.

## Tests
Modify existing acceptance test.
2025-02-27 15:58:48 +00:00
shreyas-goenka eb57dbd844
Add warning when include is used in config files other than databricks.yml (#2389)
## Changes
Defining an include section in config files other than the main
`databricks.yml` file fails silently. With this PR users will get a
warning when they try this.

## Tests
Acceptance test.
2025-02-27 14:59:00 +00:00
shreyas-goenka bf2aded8e9
Recover from panic gracefully (#2353)
## Changes
This PR adds a recovery function for panics. This indicates to all users
running into a panic that it's a bug and they should report it to
Databricks.

## Tests
Manually and acceptance test.

Before:
```
.venv➜  cli git:(panic-r) ✗ ./cli selftest panic                                                
panic: the databricks selftest panic command always panics

goroutine 1 [running]:
github.com/databricks/cli/cmd/selftest.New.newPanic.func1(0x1400016f208?, {0x1016ca925?, 0x4?, 0x1016ca929?})
        /Users/shreyas.goenka/cli2/cli/cmd/selftest/panic.go:9 +0x2c
github.com/spf13/cobra.(*Command).execute(0x1400016f208, {0x10279bc40, 0x0, 0x0})
        /Users/shreyas.goenka/cli2/cli/vendor/github.com/spf13/cobra/command.go:989 +0x81c
github.com/spf13/cobra.(*Command).ExecuteC(0x14000428908)
        /Users/shreyas.goenka/cli2/cli/vendor/github.com/spf13/cobra/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
        /Users/shreyas.goenka/cli2/cli/vendor/github.com/spf13/cobra/command.go:1050
github.com/databricks/cli/cmd/root.Execute({0x101d60440?, 0x10279bc40?}, 0x10266dd78?)
        /Users/shreyas.goenka/cli2/cli/cmd/root/root.go:101 +0x58
main.main()
        /Users/shreyas.goenka/cli2/cli/main.go:13 +0x44
```

After:
```
.venv➜  cli git:(panic-r) ./cli selftest panic
The Databricks CLI unexpectedly had a fatal error.
Please report this issue to Databricks in the form of a GitHub issue at:
https://github.com/databricks/cli

CLI Version: 0.0.0-dev+aae7ced52d36

Panic Payload: the databricks selftest panic command always panics

Stack Trace:
goroutine 1 [running]:
runtime/debug.Stack()
        /Users/shreyas.goenka/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.darwin-arm64/src/runtime/debug/stack.go:26 +0x64
github.com/databricks/cli/cmd/root.Execute.func1()
        /Users/shreyas.goenka/cli2/cli/cmd/root/root.go:110 +0xa4
panic({0x10368b5e0?, 0x1039d6d70?})
        /Users/shreyas.goenka/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.4.darwin-arm64/src/runtime/panic.go:785 +0x124
github.com/databricks/cli/cmd/selftest.New.newPanic.func1(0x14000145208?, {0x103356be5?, 0x4?, 0x103356be9?})
        /Users/shreyas.goenka/cli2/cli/cmd/selftest/panic.go:9 +0x2c
github.com/spf13/cobra.(*Command).execute(0x14000145208, {0x104427c40, 0x0, 0x0})
        /Users/shreyas.goenka/cli2/cli/vendor/github.com/spf13/cobra/command.go:989 +0x81c
github.com/spf13/cobra.(*Command).ExecuteC(0x14000400c08)
        /Users/shreyas.goenka/cli2/cli/vendor/github.com/spf13/cobra/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
        /Users/shreyas.goenka/cli2/cli/vendor/github.com/spf13/cobra/command.go:1050
github.com/databricks/cli/cmd/root.Execute({0x1039ec440?, 0x104427c40?}, 0x14000400c08)
        /Users/shreyas.goenka/cli2/cli/cmd/root/root.go:128 +0x94
main.main()
        /Users/shreyas.goenka/cli2/cli/main.go:13 +0x44
```
2025-02-27 13:27:36 +00:00
Denis Bilenko c1f835f951
acc: Print full URL and request body for missing handlers (#2394)
## Tests
Manually, I have a test that fails.

Before:

```
=== NAME  TestAccept
    server.go:195:

        ----------------------------------------
        No stub found for pattern: GET /api/2.1/clusters/get

        To stub a response for this request, you can add
        the following to test.toml:
        [[Server]]
        Pattern = "GET /api/2.1/clusters/get"
        Response.Body = '''
        <response body here>
        '''
        Response.StatusCode = <response status-code here>
        ----------------------------------------
```

After:
```
    server.go:203: No handler for URL: /api/2.1/clusters/get?cluster_id=0717-132531-5opeqon1
        Body: [0 bytes]

        For acceptance tests, add this to test.toml:
        [[Server]]
        Pattern = "GET /api/2.1/clusters/get"
        Response.Body = '<response body here>'
        # Response.StatusCode = <response code if not 200>
```
2025-02-27 13:07:48 +00:00
Denis Bilenko e2db0cd0e2
Remove bundle.{Seq,If,Defer,newPhase,logString}, switch to regular functions (#2390)
## Changes
- Instead of constructing chains of mutators and then executing them,
execute them directly.
- Remove functionality related to chain-building: Seq, If, Defer,
newPhase, logString.
- Phases become functions that apply the changes directly rather than
construct mutator chains that will be called later.
- Add a helper ApplySeq to call multiple mutators, use it where
Apply+Seq were used before.

This is intended to be a refactoring without functional changes, but
there are a few behaviour changes:
- Since defer() is used to call unlock instead of bundle.Defer()
unlocking will now happen even in case of panics.
- In --debug, the phase names are are still logged once before start of
the phase but each entry no longer has 'seq' or phase name in it.
- The message "Deployment complete!" was printed even if
terraform.Apply() mutator had an error. It no longer does that.

## Motivation

The use of the chains was necessary when mutators were returning a list
of other mutators instead of calling them directly. But that has since
been removed, so now the chain machinery have no purpose anymore.

Use of direct functions simplifies the logic and makes bugs more
apparent and easy to fix.

Other improvements that this unlocks:
- Simpler stacktraces/debugging (breakpoints).
- Use of functions with narrowly scoped API: instead of mutators that
receive full bundle config, we can use focused functions that only deal
with sections they care about prepareGitSettings(currentGitSection) ->
updatedGitSection. This makes the data flow more apparent.
- Parallel computations across mutators (within phase): launch
goroutines fetching data from APIs at the beggining, process them once
they are ready.

## Tests
Existing tests.
2025-02-27 11:41:58 +00:00
Andrew Nester 767c0a9ddb
[Release] Release v0.242.0 (#2393)
Notable changes:
Starting this version CLI does not load bundle auth information when CLI
command is executed inside the bundle directory with explicitly provided
via `-p` flag profile. For more details see the related GitHub issue
https://github.com/databricks/cli/issues/1358

CLI:
* Do not load host from bundle for CLI commands when profile flag is
used ([#2335](https://github.com/databricks/cli/pull/2335)).
* Fixed accessing required path parameters in CLI generation when --json
flag ([#2373](https://github.com/databricks/cli/pull/2373)).

Bundles:
* Provide instructions for testing in the default-python template
([#2355](https://github.com/databricks/cli/pull/2355)).
* Remove `run_as` from the built-in templates
([#2044](https://github.com/databricks/cli/pull/2044)).
* Change warning about incomplete permissions section into a
recommendation ([#2043](https://github.com/databricks/cli/pull/2043)).
* Refine `mode: production` diagnostic output
([#2236](https://github.com/databricks/cli/pull/2236)).
* Support serverless mode in default-python template (explicit prompt)
([#2377](https://github.com/databricks/cli/pull/2377)).
* Set default data_security_mode to "SINGLE_USER" in bundle templates
([#2372](https://github.com/databricks/cli/pull/2372)).
* Fixed spark version check for clusters defined in the same bundle
([#2374](https://github.com/databricks/cli/pull/2374)).

API Changes:
* Added `databricks genie get-message-query-result-by-attachment`
command.

OpenAPI commit 99f644e72261ef5ecf8d74db20f4b7a1e09723cc (2025-02-11)
2025-02-27 10:54:37 +00:00
Denis Bilenko 13ac52391d
acc: Include full output for default-python/classic (#2391)
## Tests
Include full output of default-python/classic so it can be used as a
base for diffs in cloud tests #2383
2025-02-27 10:16:06 +00:00
Denis Bilenko 81606cfcbc
acc: replace LocalOnly option with Local & Cloud (#2387)
## Changes
Instead of LocalOnly with non-composable semantics there are two
composable options:
- Local - enable test locally
- Cloud - enable test on the cloud

By default Cloud is switched off except in bundle (but not in
bundle/variables and bundle/help).

## Tests
Using this in #2383 to have test that runs on cloud but not locally.
2025-02-26 16:01:49 +00:00
Denis Bilenko b6bf035e7f
Skip serverless prompt in default-python (default is no) (#2388)
## Tests
Manually running 'bundle init default-python' - no question about
serverless.
2025-02-26 15:58:53 +00:00
Denis Bilenko ab3d82e32e
default-python: Swap order of yes/no in serverless template (#2386)
## Changes
Since at this moment we set default to 'no', interactively it should
also default to 'no'. However, it just uses the first option.

## Tests
Manually running `cli bundle init default-python`
2025-02-26 14:45:32 +00:00
Denis Bilenko 6d27c7e69d
acc: Support multiline patterns in diff.py (#2384)
## Changes
Fix diff.py to apply replacements that have newlines in them.

## Tests
Existing tests.
2025-02-26 14:25:39 +01:00
Denis Bilenko 03f2ff5a39
Support serverless mode in default-python template (explicit prompt) (#2377)
## Changes

- Add 'serverless' prompt to default-python template (default is
currently set to "no").
- This is a simplified version of
https://github.com/databricks/cli/pull/2348 with 'auto' functionality
removed.

## Tests
- Split default-python into default-python/classic,
default-python/serverless, default-python/serverless-customcatalog.
- Manually check that "bundle init default-python" with serverless=yes
can be deployed and run on dogfood and test env.
2025-02-26 14:07:30 +01:00
Andrew Nester df001dcdfe
Do not load host from bundle for CLI commands when profile flag is used (#2335)
## Changes
Now when `profile` flag is used we won't pick up host from bundle
anymore and use the one provided by -p flag

Previous behaviour in the context of bundle
```
databricks current-user me -p profile_name
Error: cannot resolve bundle auth configuration: config host mismatch: profile uses host https://non-existing-subdomain.databricks.com, but CLI configured to use https://foo.com
```

New behaviour (make an api call)
```
databricks current-user me -p profile_name
{
  email: "foo@bar.com"
  ...
}
```

We still load bundle configuration when `-t` flag provide because we
want to load host information from the target.

Fixes #1358 

## Tests
Added acceptance test
2025-02-26 12:30:38 +00:00
Anton Nekipelov 428e730c9e
Set default data_security_mode to "SINGLE_USER" in bundle templates (#2372)
## Changes
1. Change the **default-python** bundle template to set
`data_security_mode` of a cluster to SINGLE_USER
2. Change the **experimental-jobs-as-code** bundle template to set
`data_security_mode` of a cluster to SINGLE_USER

## Why
Explicitly adding this field saves experienced users from confusion onto
what security mode is applied to the cluster

## Tests
Changed existing unit and integration tests to pass with this change
2025-02-26 13:19:38 +01:00
shreyas-goenka 9659f91c9f
Do not pass parent pid to child daemon process (#2376)
## Changes
This PR:
1. No longer sets the `DATABRICKS_CLI_PARENT_PID` environment variable
since it was never required in the first place and was mistakenly merged
in the inital PR.
2. Performs minor cleanup based on post merge feedback in
https://github.com/databricks/cli/pull/2354.

## Tests
N/A
2025-02-26 17:39:45 +05:30
Andrew Nester fa79d04980
acc: Added tests for deploying PyPi and Maven libraries (#2359)
## Changes
Added PyPi and Maven libraries tests

Needed for this PR since we don't currently have any coverage for PyPi
or Maven libraries
https://github.com/databricks/cli/pull/2382
2025-02-26 13:05:38 +01:00