Commit Graph

970 Commits

Author SHA1 Message Date
Andrew Nester 7067782cf1
Fixed path matching for Windows in generate job test (#1132)
## Changes
Fixed path matching for Windows in generate job test
2024-01-19 08:05:59 +00:00
Andrew Nester 57abf157cc
Release v0.212.1 (#1130)
CLI:
* Fix windows style file paths in fs cp command
([#1118](https://github.com/databricks/cli/pull/1118)).
* Do not require positional arguments if they should be provided in JSON
([#1125](https://github.com/databricks/cli/pull/1125)).
* Always require path parameters as positional arguments
([#1129](https://github.com/databricks/cli/pull/1129)).

Bundles:
* Add debug log line for when bundle init is run from non-TTY interface
([#1117](https://github.com/databricks/cli/pull/1117)).
* Added `databricks bundle generate job` command
([#1043](https://github.com/databricks/cli/pull/1043)).
* Support passing job parameters to bundle run
([#1115](https://github.com/databricks/cli/pull/1115)).

Dependency updates:
* Bump golang.org/x/oauth2 from 0.15.0 to 0.16.0
([#1124](https://github.com/databricks/cli/pull/1124)).
2024-01-17 14:44:42 +00:00
Andrew Nester 70fe0e36ef
Added `databricks bundle generate job` command (#1043)
## Changes
Now it's possible to generate bundle configuration for existing job.
For now it only supports jobs with notebook tasks.

It will download notebooks referenced in the job tasks and generate
bundle YAML config for this job which can be included in larger bundle.

## Tests
Running command manually

Example of generated config
```
resources:
  jobs:
    job_128737545467921:
      name: Notebook job
      format: MULTI_TASK
      tasks:
        - task_key: as_notebook
          existing_cluster_id: 0704-xxxxxx-yyyyyyy
          notebook_task:
            base_parameters:
              bundle_root: /Users/andrew.nester@databricks.com/.bundle/job_with_module_imports/development/files
            notebook_path: ./entry_notebook.py
            source: WORKSPACE
          run_if: ALL_SUCCESS
      max_concurrent_runs: 1
 ```

## Tests
Manual (on our last 100 jobs) + added end-to-end test

```
--- PASS: TestAccGenerateFromExistingJobAndDeploy (50.91s)
PASS
coverage: 61.5% of statements in ./...
ok github.com/databricks/cli/internal/bundle 51.209s coverage: 61.5% of
statements in ./...
```
2024-01-17 14:26:33 +00:00
Andrew Nester 98477699a0
Always require path parameters as positional arguments (#1129)
## Changes
Always require path parameters as positional arguments
Note: uses a generator with this SDK change:
https://github.com/databricks/databricks-sdk-go/pull/773

Fixes https://github.com/databricks/cli/issues/1121
2024-01-17 14:14:20 +00:00
Andrew Nester ef67b1755e
Do not require positional arguments if they should be provided in JSON (#1125)
## Changes
Do not require positional arguments if they should be provided in JSON

Fixes #1122
2024-01-17 10:53:50 +00:00
dependabot[bot] 3d359319df
Bump golang.org/x/oauth2 from 0.15.0 to 0.16.0 (#1124)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from
0.15.0 to 0.16.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="39adbb7807"><code>39adbb7</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="4ce7bbb2ff"><code>4ce7bbb</code></a>
google: add Credentials.GetUniverseDomain with GCE MDS support</li>
<li><a
href="1e6999b1be"><code>1e6999b</code></a>
google: add UniverseDomain to CredentialsParams</li>
<li>See full diff in <a
href="https://github.com/golang/oauth2/compare/v0.15.0...v0.16.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/oauth2&package-manager=go_modules&previous-version=0.15.0&new-version=0.16.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>
2024-01-15 12:59:23 +00:00
Pieter Noordhuis 06b50670e1
Support passing job parameters to bundle run (#1115)
## Changes

This change adds support for job parameters. If job parameters are
specified for a job that doesn't define job parameters it returns an
error. Conversely, if task parameters are specified for a job that
defines job parameters, it also returns an error.

This change moves the options structs and their functions to separate
files and backfills test coverage for them.

Job parameters can now be specified with `--params foo=bar,bar=qux`.

## Tests

Unit tests and manual integration testing.
2024-01-15 07:42:36 +00:00
shreyas-goenka 2c0d06715c
Fix windows style file paths in fs cp command (#1118)
## Changes
Copying a local file in windows to remote directory in DBFS would fail
if the path was specified as a windows style path (compared to a UNIX
style path). This PR fixes that.

Note, UNIX style paths will continue to work because `filepath.Base`
respects both `/` and `\` as file separators. See: `IsPathSeparator` in
https://go.dev/src/os/path_windows.go.

Fixes issue: https://github.com/databricks/cli/issues/1109.

## Tests
Integration test and manually
```
C:\Users\shreyas.goenka>Desktop\cli.exe fs cp .\Desktop\foo.txt dbfs:/Users/shreyas.goenka@databricks.com
.\Desktop\foo.txt -> dbfs:/Users/shreyas.goenka@databricks.com/foo.txt

C:\Users\shreyas.goenka>Desktop\cli.exe fs cat  dbfs:/Users/shreyas.goenka@databricks.com/foo.txt
hello, world
````
2024-01-11 18:49:42 +00:00
shreyas-goenka 7dcdadde79
Add debug log line for when bundle init is run from non-TTY interface (#1117) 2024-01-11 15:41:13 +00:00
Pieter Noordhuis 51c64ef82a
Release v0.212.0 (#1116)
CLI:
* Tweak command groups in CLI help
([#1092](https://github.com/databricks/cli/pull/1092)).
* Fixed storage-credentials list command in text output
([#1094](https://github.com/databricks/cli/pull/1094)).
* Allow account client auth with environment variables when no
`.databrickscfg` file present
([#1097](https://github.com/databricks/cli/pull/1097)).
* Always log with text format by default
([#1096](https://github.com/databricks/cli/pull/1096)).

Bundles:
* Added exec.NewCommandExecutor to execute commands with correct
interpreter ([#1075](https://github.com/databricks/cli/pull/1075)).
* Use resource key as name in permissions code
([#1087](https://github.com/databricks/cli/pull/1087)).
* Add support for reprompts if user input does not match template schema
([#946](https://github.com/databricks/cli/pull/946)).
* Improve experience for multiple builtin templates
([#1052](https://github.com/databricks/cli/pull/1052)).
* Improve error when bundle root is not writable
([#1093](https://github.com/databricks/cli/pull/1093)).
* Change recommended production deployment path from `/Shared` to
`/Users` ([#1091](https://github.com/databricks/cli/pull/1091)).
* Allow referencing bundle resources by name
([#872](https://github.com/databricks/cli/pull/872)).
* Make libs/exec fallback to `sh` if `bash` cannot be found
([#1114](https://github.com/databricks/cli/pull/1114)).

Internal:
* Functionality to walk a `config.Value` tree
([#1081](https://github.com/databricks/cli/pull/1081)).
* Rename libs/config -> libs/dyn
([#1086](https://github.com/databricks/cli/pull/1086)).
* Added codecov integration on code push
([#1095](https://github.com/databricks/cli/pull/1095)).
* Consolidate functions to convert `dyn.Value` to native types
([#1100](https://github.com/databricks/cli/pull/1100)).
* Define constant for the invalid `dyn.Value`
([#1101](https://github.com/databricks/cli/pull/1101)).

API Changes:
* Changed `databricks serving-endpoints update-config` command with new
required argument order.
* Changed `databricks account ip-access-lists create` command with new
required argument order.
* Changed `databricks account ip-access-lists replace` command with new
required argument order.
* Changed `databricks account ip-access-lists update` command with new
required argument order.
* Changed `databricks ip-access-lists create` command with new required
argument order.
* Changed `databricks ip-access-lists replace` command with new required
argument order.
* Changed `databricks ip-access-lists update` command with new required
argument order.

OpenAPI commit a7a9dc025bb80303e676bf3708942c6aa06689f1 (2024-01-04)

Dependency updates:
* Bump github.com/hashicorp/terraform-exec from 0.19.0 to 0.20.0
([#1088](https://github.com/databricks/cli/pull/1088)).
* Bump go.uber.org/mock from 0.3.0 to 0.4.0
([#1089](https://github.com/databricks/cli/pull/1089)).
* Bump github.com/hashicorp/terraform-json from 0.18.0 to 0.20.0
([#1090](https://github.com/databricks/cli/pull/1090)).
* Bump golang.org/x/term from 0.15.0 to 0.16.0
([#1103](https://github.com/databricks/cli/pull/1103)).
* Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7
([#1105](https://github.com/databricks/cli/pull/1105)).
* Bump golang.org/x/sync from 0.5.0 to 0.6.0
([#1104](https://github.com/databricks/cli/pull/1104)).
* Upgrade golang.org/x/crypto to v0.17.0 in internal module
([#1110](https://github.com/databricks/cli/pull/1110)).
* Upgrade Go SDK to v0.29.0
([#1111](https://github.com/databricks/cli/pull/1111)).
2024-01-11 15:09:11 +00:00
Pieter Noordhuis 94112eaedb
Make libs/exec fallback to `sh` if `bash` cannot be found (#1114)
## Changes

Falling back to `sh` is also what GitHub Actions do if `bash` is not
found in the path. It is possible `bash` is not available when running
from minimal Docker containers and we must not error out in this case.

See:
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell.

This change renames `interpreter` -> `shell`.

## Tests

Unit tests pass.
2024-01-11 12:26:31 +00:00
Pieter Noordhuis 3c76a11d00
Upgrade Go SDK to v0.29.0 (#1111)
## Changes

See:
* https://github.com/databricks/databricks-sdk-go/releases/tag/v0.29.0
* https://github.com/databricks/databricks-sdk-go/releases/tag/v0.28.0

## Tests

Unit and integration tests pass.
2024-01-11 08:16:25 +00:00
Pieter Noordhuis f5c46478f4
Upgrade golang.org/x/crypto to v0.17.0 in internal module (#1110)
## Changes

This addresses https://github.com/databricks/cli/security/dependabot/12.
2024-01-10 13:53:01 +00:00
dependabot[bot] 1604ada0e6
Bump golang.org/x/sync from 0.5.0 to 0.6.0 (#1104)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.5.0 to
0.6.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="59c1ca1e46"><code>59c1ca1</code></a>
errgroup: add reference to sync.WaitGroup</li>
<li>See full diff in <a
href="https://github.com/golang/sync/compare/v0.5.0...v0.6.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/sync&package-manager=go_modules&previous-version=0.5.0&new-version=0.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>
2024-01-10 13:38:26 +00:00
dependabot[bot] 58e4bb9de3
Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#1105)
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl)
from 1.3.3 to 1.3.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cloudflare/circl/releases">github.com/cloudflare/circl's
releases</a>.</em></p>
<blockquote>
<h2>CIRCL v1.3.7</h2>
<h3>What's Changed</h3>
<ul>
<li>build(deps): bump golang.org/x/crypto from
0.3.1-0.20221117191849-2c476679df9a to 0.17.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/467">cloudflare/circl#467</a></li>
<li>kyber: remove division by q in ciphertext compression by <a
href="https://github.com/bwesterb"><code>@​bwesterb</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/468">cloudflare/circl#468</a></li>
<li>Releasing CIRCL v1.3.7 by <a
href="https://github.com/armfazh"><code>@​armfazh</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/469">cloudflare/circl#469</a></li>
</ul>
<h3>New Contributors</h3>
<ul>
<li><a
href="https://github.com/dependabot"><code>@​dependabot</code></a> made
their first contribution in <a
href="https://redirect.github.com/cloudflare/circl/pull/467">cloudflare/circl#467</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cloudflare/circl/compare/v1.3.6...v1.3.7">https://github.com/cloudflare/circl/compare/v1.3.6...v1.3.7</a></p>
<h2>CIRCL v1.3.6</h2>
<h3>What's Changed</h3>
<ul>
<li>internal: add TurboShake{128,256} by <a
href="https://github.com/bwesterb"><code>@​bwesterb</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/430">cloudflare/circl#430</a></li>
<li>Kangaroo12 draft -10 by <a
href="https://github.com/bwesterb"><code>@​bwesterb</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/431">cloudflare/circl#431</a></li>
<li>Add K12 as XOF by <a
href="https://github.com/bwesterb"><code>@​bwesterb</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/437">cloudflare/circl#437</a></li>
<li>xof/k12: Fix a typo in the package documentation by <a
href="https://github.com/cjpatton"><code>@​cjpatton</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/438">cloudflare/circl#438</a></li>
<li>Set CIRCL version for generated assembler code. by <a
href="https://github.com/armfazh"><code>@​armfazh</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/440">cloudflare/circl#440</a></li>
<li>Add tkn20 benchmarks by <a
href="https://github.com/tanyav2"><code>@​tanyav2</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/442">cloudflare/circl#442</a></li>
<li>Add partially blind RSA implementation by <a
href="https://github.com/chris-wood"><code>@​chris-wood</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/445">cloudflare/circl#445</a></li>
<li>Update doc.go by <a
href="https://github.com/nadimkobeissi"><code>@​nadimkobeissi</code></a>
in <a
href="https://redirect.github.com/cloudflare/circl/pull/447">cloudflare/circl#447</a></li>
<li>tss/rsa: key generation for threshold RSA (safe primes) by <a
href="https://github.com/armfazh"><code>@​armfazh</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/450">cloudflare/circl#450</a></li>
<li>Bumping Go version for CI jobs. by <a
href="https://github.com/armfazh"><code>@​armfazh</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/457">cloudflare/circl#457</a></li>
<li>Spelling by <a
href="https://github.com/jsoref"><code>@​jsoref</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/456">cloudflare/circl#456</a></li>
<li>blindrsa: updating blindrsa to be compliant with RFC9474 by <a
href="https://github.com/armfazh"><code>@​armfazh</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/464">cloudflare/circl#464</a></li>
<li>Releasing CIRCL v1.3.6 by <a
href="https://github.com/armfazh"><code>@​armfazh</code></a> in <a
href="https://redirect.github.com/cloudflare/circl/pull/465">cloudflare/circl#465</a></li>
</ul>
<h3>New Contributors</h3>
<ul>
<li><a
href="https://github.com/nadimkobeissi"><code>@​nadimkobeissi</code></a>
made their first contribution in <a
href="https://redirect.github.com/cloudflare/circl/pull/447">cloudflare/circl#447</a></li>
<li><a href="https://github.com/jsoref"><code>@​jsoref</code></a> made
their first contribution in <a
href="https://redirect.github.com/cloudflare/circl/pull/456">cloudflare/circl#456</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.6">https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.6</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c48866b306"><code>c48866b</code></a>
Releasing CIRCL v1.3.7</li>
<li><a
href="75ef91e8a2"><code>75ef91e</code></a>
kyber: remove division by q in ciphertext compression</li>
<li><a
href="899732a432"><code>899732a</code></a>
build(deps): bump golang.org/x/crypto</li>
<li><a
href="99f0f715ca"><code>99f0f71</code></a>
Releasing CIRCL v1.3.6</li>
<li><a
href="e728d0d84e"><code>e728d0d</code></a>
Apply thibmeu code review suggestions</li>
<li><a
href="ceb2d90c49"><code>ceb2d90</code></a>
Updating blindrsa to be compliant with RFC9474.</li>
<li><a
href="44133f7032"><code>44133f7</code></a>
spelling: tripped</li>
<li><a
href="c2076d67b2"><code>c2076d6</code></a>
spelling: transposes</li>
<li><a
href="dad216659e"><code>dad2166</code></a>
spelling: title</li>
<li><a
href="171c41832e"><code>171c418</code></a>
spelling: threshold</li>
<li>Additional commits viewable in <a
href="https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cloudflare/circl&package-manager=go_modules&previous-version=1.3.3&new-version=1.3.7)](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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/databricks/cli/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 13:38:16 +00:00
dependabot[bot] c8cdebd433
Bump golang.org/x/term from 0.15.0 to 0.16.0 (#1103)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.15.0 to
0.16.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ae941452f5"><code>ae94145</code></a>
go.mod: update golang.org/x dependencies</li>
<li>See full diff in <a
href="https://github.com/golang/term/compare/v0.15.0...v0.16.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/term&package-manager=go_modules&previous-version=0.15.0&new-version=0.16.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>
2024-01-10 13:25:48 +00:00
Pieter Noordhuis d8a64e6617
Define constant for the invalid `dyn.Value` (#1101)
## Changes

The nil value is a real valid value that we need to represent. To
accommodate this we introduced `dyn.KindInvalid` as the zero-value for
`dyn.Kind` (see #904), but did not yet update the comments on
`dyn.NilValue` or add tests for `kind.go`.

This also moves `KindNil` to be last in the definition order (least
likely to care about it).

## Tests

Tests pass.
2024-01-05 13:02:04 +00:00
Pieter Noordhuis bae220d1bc
Consolidate functions to convert `dyn.Value` to native types (#1100)
## Changes

The file `value.go` had a couple `AsZZZ` and `MustZZZ` functions.
This change backfills missing versions and moves all of them to a
separate file.

## Tests

Tests pass; full coverage.
2024-01-05 12:06:12 +00:00
Andrew Nester 4b01fff03d
Fixed instance pool resolving by name (#1102)
## Changes
Fixed instance pool resolving by name

## Tests
Added regression test
2024-01-05 10:50:53 +00:00
Andrew Nester 5fb40f9d07
Allow referencing bundle resources by name (#872)
## Changes
Now we can define variables with values which reference different
Databricks resources by name.
When references like this, DABs automatically looks up the resource by
this name and replaces the reference with ID of the resource referenced.
Thus when the variable is used in the configuration it will contain the
correct resolved ID of resource.

The resolvers are code generated and thus DABs support referencing all
resources which has `GetByName`-like methods in Go SDK.

### Example

```
variables:
  my_cluster_id:
    description: An existing cluster.
    lookup: 
      cluster: "12.2 shared"

resources:
  jobs:
    my_job:
      name: "My Job"
      tasks:
        - task_key: TestTask
          existing_cluster_id: ${var.my_cluster_id}

targets:
  dev:
    variables:
      my_cluster_id:
        lookup: 
           cluster: "dev-cluster"
```

## Tests
Added unit test + manual testing

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
2024-01-04 21:04:42 +00:00
Miles Yucht 8a1be76910
Always log with text format by default (#1096)
## Changes
The JSON logger is excellent as a machine-readable logger with lots of
metadata, but the resulting logs are difficult to read:

<img width="1601" alt="Image_from_Databricks"
src="https://github.com/databricks/cli/assets/1850319/76aa852f-756f-4e0a-bc00-3a6e3224296a">

Currently, we only use the friendly log printer when run from a TTY.
This PR removes that restriction, so logs will be pretty-printed by
default, regardless of TTY or not. If a user needs machine-readable
logs, they can still use `--log-format JSON`.

## Tests
Manual test: `databricks current-user me --debug | cat` uses the
pretty-printing logger.


![Screenshot_02_01_2024__13_12](https://github.com/databricks/cli/assets/1850319/45fd5587-52f6-4864-b7d2-3708ed2ff87f)
2024-01-03 09:39:33 +00:00
Lennart Kats (databricks) 167deec8c3
Change recommended production deployment path from /Shared to /Users (#1091)
## Changes

This PR changes the default and `mode: production` recommendation to
target `/Users` for deployment. Previously, we used `/Shared`, but
because of a lack of POSIX-like permissions in WorkspaceFS this meant
that files inside would be readable and writable by other users in the
workspace.

Detailed change:
* `default-python` no longer uses a path that starts with `/Shared`
* `mode: production` no longer requires a path that starts with
`/Shared`
 
## Related PRs

Docs: https://github.com/databricks/docs/pull/14585
Examples: https://github.com/databricks/bundle-examples/pull/17

## Tests

* Manual tests
* Template unit tests (with an extra check to avoid /Shared)
2024-01-02 19:58:24 +00:00
Andrew Nester e80882b5af
Allow account client auth with environment variables when no .databrickscfg file present (#1097)
## Changes
Allow account client auth with environment variables when no
.databrickscfg file present

Makes the behaviour to be in line with WorkspaceClient auth.
## Tests
Added regression test
2024-01-02 15:34:43 +00:00
Andrew Nester 9cb098506a
Added codecov integration on code push (#1095)
Added codecov integration on code push
2024-01-02 09:32:17 +00:00
Andrew Nester 3e6e04831f
Fixed storage-credentials list command in text output (#1094)
## Changes
Fixes #1029 
Closes #910 

## Tests
Added regression test
2024-01-02 07:24:51 +00:00
Lennart Kats (databricks) 9a1f078bd9
Improve error when bundle root is not writable (#1093)
## Changes

This improves the error when deploying to a bundle root that the current
user doesn't have write access to. This can come up slightly more often
since the change of https://github.com/databricks/cli/pull/1091.

Before this change:

```
$ databricks bundle deploy --target prod
Building my_project...
Error: no such directory: /Users/lennart.kats@databricks.com/.bundle/my_project/prod/state
```

After this change:

```
$ databricks bundle deploy --target prod
Building my_project...
Error: cannot write to deployment root (this can indicate a previous deploy was done with a different identity): /Users/lennart.kats@databricks.com/.bundle/my_project/prod
```

Note that this change uses the "no such directory" error returned from
the filer.
2023-12-28 13:15:21 +00:00
Lennart Kats (databricks) 206b1bf198
Tweak command groups in CLI help (#1092)
## Changes

This tweaks the help output shown when using `databricks help`:
* make`jobs` appears under `Workflows` (as done in baseline OpenAPI). 
* move `bundle` and `sync` under a new group called `Developer Tools`
(similar to what we have in docs)
* minor wording changes
2023-12-28 13:14:55 +00:00
dependabot[bot] 3b6681c301
Bump github.com/hashicorp/terraform-json from 0.18.0 to 0.20.0 (#1090)
Bumps
[github.com/hashicorp/terraform-json](https://github.com/hashicorp/terraform-json)
from 0.18.0 to 0.20.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/terraform-json/releases">github.com/hashicorp/terraform-json's
releases</a>.</em></p>
<blockquote>
<h2>v0.20.0</h2>
<p>ENHANCEMENTS:</p>
<ul>
<li>Add <code>ReplacePaths</code> to <code>Change</code> struct by <a
href="https://github.com/sebasslash"><code>@​sebasslash</code></a> in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/117">hashicorp/terraform-json#117</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/hashicorp/terraform-json/compare/v0.19.0...v0.20.0">https://github.com/hashicorp/terraform-json/compare/v0.19.0...v0.20.0</a></p>
<h2>v0.19.0</h2>
<p>ENHANCEMENTS:</p>
<ul>
<li>Add <code>UseJSONNumber</code> field and
<code>UseJSONNumber()</code> method to <code>Plan</code> to allow use of
<code>json.Number</code> for numerical values by <a
href="https://github.com/bendbennett"><code>@​bendbennett</code></a> in
<a
href="https://redirect.github.com/hashicorp/terraform-json/pull/113">hashicorp/terraform-json#113</a></li>
</ul>
<p>INTERNAL:</p>
<ul>
<li>github: Disable dependabot for GHA by <a
href="https://github.com/radeksimko"><code>@​radeksimko</code></a> in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/114">hashicorp/terraform-json#114</a></li>
<li>build(deps): Bump workflows to latest trusted versions by <a
href="https://github.com/hashicorp-tsccr"><code>@​hashicorp-tsccr</code></a>
in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/115">hashicorp/terraform-json#115</a></li>
<li>build(deps): Bump workflows to latest trusted versions by <a
href="https://github.com/hashicorp-tsccr"><code>@​hashicorp-tsccr</code></a>
in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/116">hashicorp/terraform-json#116</a></li>
</ul>
<p>New Contributors</p>
<ul>
<li><a
href="https://github.com/bendbennett"><code>@​bendbennett</code></a>
made their first contribution in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/113">hashicorp/terraform-json#113</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/hashicorp/terraform-json/compare/v0.18.0...v0.19.0">https://github.com/hashicorp/terraform-json/compare/v0.18.0...v0.19.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="884568c6cb"><code>884568c</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/terraform-json/issues/117">#117</a>
from sebasslash/add-replace-paths-field</li>
<li><a
href="e1129018f4"><code>e112901</code></a>
Add ReplacePaths to Change struct</li>
<li><a
href="41fa8df394"><code>41fa8df</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/terraform-json/issues/113">#113</a>
from hashicorp/bendbennett/issues-111</li>
<li><a
href="c00e873a17"><code>c00e873</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/terraform-json/issues/116">#116</a>
from hashicorp/tsccr-auto-pinning/trusted/2023-12-18</li>
<li><a
href="15b3438c10"><code>15b3438</code></a>
Result of tsccr-helper -log-level=info gha update -latest .</li>
<li><a
href="9afe2fc84e"><code>9afe2fc</code></a>
Result of tsccr-helper -log-level=info gha update -latest . (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/115">#115</a>)</li>
<li><a
href="daf8e04ddc"><code>daf8e04</code></a>
github: Disable dependabot for GHA (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/114">#114</a>)</li>
<li><a
href="da9b6fa771"><code>da9b6fa</code></a>
Unformat plan.json (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/111">#111</a>)</li>
<li><a
href="a2ced5d5f5"><code>a2ced5d</code></a>
Add test coverage for handling of numeric values by Plan.UnmarshalJSON
(<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/111">#111</a>)</li>
<li><a
href="970acde614"><code>970acde</code></a>
Add useJSONNumber field to Plan (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/111">#111</a>)</li>
<li>See full diff in <a
href="https://github.com/hashicorp/terraform-json/compare/v0.18.0...v0.20.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/hashicorp/terraform-json&package-manager=go_modules&previous-version=0.18.0&new-version=0.20.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>
2023-12-27 16:26:54 +00:00
dependabot[bot] 0c850ddab5
Bump go.uber.org/mock from 0.3.0 to 0.4.0 (#1089)
Bumps [go.uber.org/mock](https://github.com/uber/mock) from 0.3.0 to
0.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/uber/mock/releases">go.uber.org/mock's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.0</h2>
<h2>0.4.0 (20 Dec 2023)</h2>
<h3>Added</h3>
<ul>
<li><a href="https://redirect.github.com/uber/mock/issues/63">#63</a>[]:
<code>AnyOf</code> matcher for values that satisfy at least one
matcher.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/114">#114</a>[]:
<code>Regex</code> matcher.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li><a href="https://redirect.github.com/uber/mock/issues/93">#93</a>[]:
Ignore interfaces that contain type constraints.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/101">#101</a>[]: Fix
race condition on Controller.Satisfied.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/121">#121</a>[]: Fix
paths for windows.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/127">#127</a>[]:
Propogate -mock_names to Recorder and ReturnCall types.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/132">#132</a>[]:
Sanitize &quot;any&quot; package names.</li>
</ul>
<p><a href="https://redirect.github.com/uber/mock/issues/63">#63</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/63">uber-go/mock#63</a>
<a href="https://redirect.github.com/uber/mock/issues/93">#93</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/93">uber-go/mock#93</a>
<a href="https://redirect.github.com/uber/mock/issues/101">#101</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/101">uber-go/mock#101</a>
<a href="https://redirect.github.com/uber/mock/issues/114">#114</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/114">uber-go/mock#114</a>
<a href="https://redirect.github.com/uber/mock/issues/121">#121</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/121">uber-go/mock#121</a>
<a href="https://redirect.github.com/uber/mock/issues/127">#127</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/127">uber-go/mock#127</a>
<a href="https://redirect.github.com/uber/mock/issues/132">#132</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/132">uber-go/mock#132</a></p>
<p>Thanks to <a
href="https://github.com/favonia"><code>@​favonia</code></a> <a
href="https://github.com/hoonmin"><code>@​hoonmin</code></a> <a
href="https://github.com/pshopper"><code>@​pshopper</code></a> <a
href="https://github.com/davidharrigan"><code>@​davidharrigan</code></a>
<a href="https://github.com/dlsniper"><code>@​dlsniper</code></a> <a
href="https://github.com/merrett010"><code>@​merrett010</code></a>
<a href="https://github.com/craig65535"><code>@​craig65535</code></a> <a
href="https://github.com/chemidy"><code>@​chemidy</code></a> <a
href="https://github.com/tulzke"><code>@​tulzke</code></a> <a
href="https://github.com/UnAfraid"><code>@​UnAfraid</code></a> <a
href="https://github.com/JacobOaks"><code>@​JacobOaks</code></a> <a
href="https://github.com/sywhang"><code>@​sywhang</code></a> for their
contributions this release.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/uber-go/mock/blob/main/CHANGELOG.md">go.uber.org/mock's
changelog</a>.</em></p>
<blockquote>
<h2>0.4.0 (20 Dec 2023)</h2>
<h3>Added</h3>
<ul>
<li><a href="https://redirect.github.com/uber/mock/issues/63">#63</a>[]:
<code>AnyOf</code> matcher for values that satisfy at least one
matcher.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/114">#114</a>[]:
<code>Regex</code> matcher.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li><a href="https://redirect.github.com/uber/mock/issues/93">#93</a>[]:
Ignore interfaces that contain type constraints.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/101">#101</a>[]: Fix
race condition on Controller.Satisfied.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/121">#121</a>[]: Fix
paths for windows.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/127">#127</a>[]:
Propogate -mock_names to Recorder and ReturnCall types.</li>
<li><a
href="https://redirect.github.com/uber/mock/issues/132">#132</a>[]:
Sanitize &quot;any&quot; package names.</li>
</ul>
<p><a href="https://redirect.github.com/uber/mock/issues/63">#63</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/63">uber-go/mock#63</a>
<a href="https://redirect.github.com/uber/mock/issues/93">#93</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/93">uber-go/mock#93</a>
<a href="https://redirect.github.com/uber/mock/issues/101">#101</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/101">uber-go/mock#101</a>
<a href="https://redirect.github.com/uber/mock/issues/114">#114</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/114">uber-go/mock#114</a>
<a href="https://redirect.github.com/uber/mock/issues/121">#121</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/121">uber-go/mock#121</a>
<a href="https://redirect.github.com/uber/mock/issues/127">#127</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/127">uber-go/mock#127</a>
<a href="https://redirect.github.com/uber/mock/issues/132">#132</a>: <a
href="https://redirect.github.com/uber-go/mock/pull/132">uber-go/mock#132</a></p>
<p>Thanks to <a
href="https://github.com/favonia"><code>@​favonia</code></a> <a
href="https://github.com/hoonmin"><code>@​hoonmin</code></a> <a
href="https://github.com/pshopper"><code>@​pshopper</code></a> <a
href="https://github.com/davidharrigan"><code>@​davidharrigan</code></a>
<a href="https://github.com/dlsniper"><code>@​dlsniper</code></a> <a
href="https://github.com/merrett010"><code>@​merrett010</code></a>
<a href="https://github.com/craig65535"><code>@​craig65535</code></a> <a
href="https://github.com/chemidy"><code>@​chemidy</code></a> <a
href="https://github.com/tulzke"><code>@​tulzke</code></a> <a
href="https://github.com/UnAfraid"><code>@​UnAfraid</code></a> <a
href="https://github.com/JacobOaks"><code>@​JacobOaks</code></a> <a
href="https://github.com/sywhang"><code>@​sywhang</code></a> for their
contributions this release.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="74a29c6e6c"><code>74a29c6</code></a>
Release v0.4.0 (<a
href="https://redirect.github.com/uber/mock/issues/131">#131</a>)</li>
<li><a
href="37f6db3f59"><code>37f6db3</code></a>
mockgen: Sanitize the &quot;any&quot; package name (<a
href="https://redirect.github.com/uber/mock/issues/132">#132</a>)</li>
<li><a
href="6dd8fe543e"><code>6dd8fe5</code></a>
Fixed -mockNames not propagating to Recorder and ReturnCall types (<a
href="https://redirect.github.com/uber/mock/issues/127">#127</a>)</li>
<li><a
href="7bf3d91b89"><code>7bf3d91</code></a>
added a description of the exclude_interfaces flag to the README (<a
href="https://redirect.github.com/uber/mock/issues/123">#123</a>)</li>
<li><a
href="5b48f95960"><code>5b48f95</code></a>
MockGen header comment: trim .exe suffix on Windows (<a
href="https://redirect.github.com/uber/mock/issues/119">#119</a>)</li>
<li><a
href="857e269dd5"><code>857e269</code></a>
Update model.go (<a
href="https://redirect.github.com/uber/mock/issues/115">#115</a>)</li>
<li><a
href="7fb6390728"><code>7fb6390</code></a>
Use path.Join for expected package paths (<a
href="https://redirect.github.com/uber/mock/issues/121">#121</a>)</li>
<li><a
href="94a7ac3403"><code>94a7ac3</code></a>
feat: add Regex() matcher (<a
href="https://redirect.github.com/uber/mock/issues/114">#114</a>)</li>
<li><a
href="b23394047e"><code>b233940</code></a>
Fix 111: Package comments are now split correctly from the rest of the
commen...</li>
<li><a
href="892b665398"><code>892b665</code></a>
fix: race condition on Controller.Satisfied (<a
href="https://redirect.github.com/uber/mock/issues/101">#101</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/uber/mock/compare/v0.3.0...v0.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=go.uber.org/mock&package-manager=go_modules&previous-version=0.3.0&new-version=0.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>
2023-12-27 15:46:36 +00:00
dependabot[bot] c6a2ce6ea8
Bump github.com/hashicorp/terraform-exec from 0.19.0 to 0.20.0 (#1088)
Bumps
[github.com/hashicorp/terraform-exec](https://github.com/hashicorp/terraform-exec)
from 0.19.0 to 0.20.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/terraform-exec/releases">github.com/hashicorp/terraform-exec's
releases</a>.</em></p>
<blockquote>
<h2>v0.20.0</h2>
<p>ENHANCEMENTS:</p>
<ul>
<li>Add JSONNumber option to Show to enable json.Number representation
of numerical values in returned tfjson.Plan and tfjson.State values (<a
href="https://redirect.github.com/hashicorp/terraform-exec/pull/427">hashicorp/terraform-exec#427</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/terraform-exec/blob/main/CHANGELOG.md">github.com/hashicorp/terraform-exec's
changelog</a>.</em></p>
<blockquote>
<h1>0.20.0 (December 20, 2023)</h1>
<p>ENHANCEMENTS:</p>
<ul>
<li>Add <code>JSONNumber</code> option to <code>Show</code> to enable
<code>json.Number</code> representation of numerical values in returned
<code>tfjson.Plan</code> and <code>tfjson.State</code> values (<a
href="https://redirect.github.com/hashicorp/terraform-exec/pull/427">#427</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e37dda6634"><code>e37dda6</code></a>
v0.20.0 [skip ci]</li>
<li><a
href="324f556d5d"><code>324f556</code></a>
Update CHANGELOG.md</li>
<li><a
href="ff2b3b948a"><code>ff2b3b9</code></a>
Update CHANGELOG.md</li>
<li><a
href="7975ca654c"><code>7975ca6</code></a>
Add ShowOption for configuring JSON decoding (<a
href="https://redirect.github.com/hashicorp/terraform-exec/issues/427">#427</a>)</li>
<li><a
href="ba030d6777"><code>ba030d6</code></a>
build(deps): bump golang.org/x/crypto from 0.15.0 to 0.17.0 (<a
href="https://redirect.github.com/hashicorp/terraform-exec/issues/430">#430</a>)</li>
<li><a
href="922f64458c"><code>922f644</code></a>
Result of tsccr-helper -log-level=info gha update -latest . (<a
href="https://redirect.github.com/hashicorp/terraform-exec/issues/428">#428</a>)</li>
<li><a
href="1469cf8780"><code>1469cf8</code></a>
build(deps): bump github.com/hashicorp/hc-install from 0.6.1 to 0.6.2
(<a
href="https://redirect.github.com/hashicorp/terraform-exec/issues/425">#425</a>)</li>
<li><a
href="a2bb72fb87"><code>a2bb72f</code></a>
graph: update format for v1.7 (<a
href="https://redirect.github.com/hashicorp/terraform-exec/issues/424">#424</a>)</li>
<li><a
href="ccb7b50150"><code>ccb7b50</code></a>
Result of tsccr-helper -log-level=info -pin-all-workflows . (<a
href="https://redirect.github.com/hashicorp/terraform-exec/issues/422">#422</a>)</li>
<li><a
href="961bd50ed9"><code>961bd50</code></a>
build(deps): bump github.com/hashicorp/terraform-json (<a
href="https://redirect.github.com/hashicorp/terraform-exec/issues/421">#421</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/hashicorp/terraform-exec/compare/v0.19.0...v0.20.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/hashicorp/terraform-exec&package-manager=go_modules&previous-version=0.19.0&new-version=0.20.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>
2023-12-27 15:46:24 +00:00
Lennart Kats (databricks) 10a8ce4562
Improve experience for multiple builtin templates (#1052)
## Changes
This enhances the template selection experience a bit as we add more and
more built-in templates (like
https://github.com/databricks/cli/pull/1051 and
https://github.com/databricks/cli/pull/1059):

### New experience:
<img width="661" alt="image"
src="https://github.com/databricks/cli/assets/58432911/afe3b84d-8a77-47f3-b9c2-f827f7893cd7">

### Current experience:
<img width="265" alt="image"
src="https://github.com/databricks/cli/assets/58432911/36f8d568-819f-4920-83b1-fb76109ea3d1">

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
2023-12-27 12:03:08 +00:00
shreyas-goenka f2408eda62
Add support for reprompts if user input does not match template schema (#946)
## Changes
This PR adds retry logic to user input prompts, prompting users again if
the value does not match the requirements specified in the bundle
template schema.

## Tests
Manually. Here's an example UX. The first prompt expects an integer and
the second one a string made only from the letters "defg"

```
shreyas.goenka@THW32HFW6T cli % cli bundle init ~/mlops-stack

Please enter an integer [123]: abc
Validation failed: "abc" is not a integer

Please enter an integer [123]: 123

Please enter a string [dddd]: apple
Validation failed: invalid value for input_root_dir: "apple". Only characters the 'd', 'e', 'f', 'g' are allowed
```
2023-12-22 15:43:08 +00:00
Pieter Noordhuis fa3c8b1017
Use resource key as name in permissions code (#1087)
## Changes

The code relied on the `Name` property being accessible for every
resource. This is generally true, but because these property structs are
embedded as pointer, they can be nil. This is also why the tests had to
initialize the embedded struct to pass. This changes the approach to use
the keys from the resource map instead, so that we no longer rely on the
non-nil embedded struct.

Note: we should evaluate whether we should turn these into values
instead of pointers. I don't recall if we get value from them being
pointers.

## Tests

Unit tests pass.
2023-12-22 14:45:53 +00:00
Pieter Noordhuis 938eb1600c
Rename libs/config -> libs/dyn (#1086)
## Changes

The name "dynamic value", or "dyn" for short, is more descriptive than
the opaque "config". Also, it conveniently does not alias with other
packages in the repository, or (popular ones) elsewhere.

(discussed with @andrewnester)

## Tests

n/a
2023-12-22 13:20:45 +00:00
Pieter Noordhuis a1297d71fd
Functionality to walk a `config.Value` tree (#1081)
## Changes

This change adds:
* A `config.Walk` function to walk a configuration tree
* A `config.Path` type to represent a value's path inside a tree
* Functions to create a `config.Path` from a string, or convert one to a
string

## Tests

Additional unit tests with full coverage.
2023-12-22 10:38:09 +00:00
Andrew Nester ac37a592f1
Added exec.NewCommandExecutor to execute commands with correct interpreter (#1075)
## Changes
Instead of handling command chaining ourselves, we execute passed
commands as-is by storing them, in temp file and passing to correct
interpreter (bash or cmd) based on OS.

Fixes #1065 

## Tests
Added unit tests
2023-12-21 15:45:23 +00:00
shreyas-goenka 55732bc6ac
Release v0.211.0 (#1083)
CLI:
* Upgrade Go SDK to 0.27.0
([#1064](https://github.com/databricks/cli/pull/1064)).
* Skip profile resolution if `DATABRICKS_AUTH_TYPE` is set
([#1068](https://github.com/databricks/cli/pull/1068)).
* Do not allow input prompts in Git Bash terminal
([#1069](https://github.com/databricks/cli/pull/1069)).
* Added output template for list-secrets command
([#1074](https://github.com/databricks/cli/pull/1074)).

Bundles:
* Set metadata fields required to enable break-glass UI for jobs
([#880](https://github.com/databricks/cli/pull/880)).
* Do not prompt for template values in Git Bash
([#1082](https://github.com/databricks/cli/pull/1082)).
* Tune output of bundle deploy command
([#1047](https://github.com/databricks/cli/pull/1047)).

API Changes:
* Changed `databricks connections update` command with new required
argument order.
* Changed `databricks serving-endpoints update-config` command with new
required argument order.
 * Added `databricks serving-endpoints put` command.
 * Removed `databricks account network-policy` command group.

OpenAPI commit 63caa3cb0c05045e81d3dcf2451fa990d8670f36 (2023-12-12)

Dependency updates:
* Bump github.com/google/uuid from 1.4.0 to 1.5.0
([#1073](https://github.com/databricks/cli/pull/1073)).
* Bump golang.org/x/crypto from 0.16.0 to 0.17.0
([#1076](https://github.com/databricks/cli/pull/1076)).
2023-12-21 09:53:08 +00:00
Lennart Kats (databricks) 875c9d2db1
Tune output of bundle deploy command (#1047)
## Changes

Update the output of the `deploy` command to be more concise and
consistent:
```
$ databricks bundle deploy
Building my_project...
Uploading my_project-0.0.1+20231207.205106-py3-none-any.whl...
Uploading bundle files to /Users/lennart.kats@databricks.com/.bundle/my_project/dev/files...
Deploying resources...
Updating deployment state...
Deployment complete!
```

This does away with the intermediate success messages, makes consistent
use of `...`, and only prints the success message at the very end after
everything is completed.

Below is the original output for comparison:

```
$ databricks bundle deploy
Detecting Python wheel project...
Found Python wheel project at /tmp/output/my_project
Building my_project...
Build succeeded
Uploading my_project-0.0.1+20231207.205134-py3-none-any.whl...
Upload succeeded
Starting upload of bundle files
Uploaded bundle files at /Users/lennart.kats@databricks.com/.bundle/my_project/dev/files!

Starting resource deployment
Resource deployment completed!
```
2023-12-21 08:00:37 +00:00
Andrew Nester 42f21d82fe
Do not prompt for template values in Git Bash (#1082)
## Changes
Follow up on #1077
2023-12-20 12:01:53 +00:00
Andrew Nester f18094d943
Revert using IsPromptSupported from promptOrAssignDefaultValues (#1077)
## Changes

Fixes nightly test `TestAccBundleInitErrorOnUnknownFields`. 

`TestAccBundleInitErrorOnUnknownFields` has an interactive shell by
default so the test fails on waiting for prompt.

This was introduced in #1069.

## Tests

Nightly test succeed.
2023-12-19 09:58:46 +00:00
dependabot[bot] 5991e33ca7
Bump golang.org/x/crypto from 0.16.0 to 0.17.0 (#1076)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from
0.16.0 to 0.17.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9d2ee975ef"><code>9d2ee97</code></a>
ssh: implement strict KEX protocol changes</li>
<li><a
href="4e5a26183e"><code>4e5a261</code></a>
ssh: close net.Conn on all NewServerConn errors</li>
<li><a
href="152cdb1503"><code>152cdb1</code></a>
x509roots/fallback: update bundle</li>
<li><a
href="fdfe1f8531"><code>fdfe1f8</code></a>
ssh: defer channel window adjustment</li>
<li><a
href="b8ffc16e10"><code>b8ffc16</code></a>
blake2b: drop Go 1.6, Go 1.8 compatibility</li>
<li><a
href="7e6fbd82c8"><code>7e6fbd8</code></a>
ssh: wrap errors from client handshake</li>
<li><a
href="bda2f3f5cf"><code>bda2f3f</code></a>
argon2: avoid clobbering BP</li>
<li>See full diff in <a
href="https://github.com/golang/crypto/compare/v0.16.0...v0.17.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/crypto&package-manager=go_modules&previous-version=0.16.0&new-version=0.17.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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/databricks/cli/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 09:18:05 +00:00
shreyas-goenka 2d93f62f21
Set metadata fields required to enable break-glass UI for jobs (#880)
## Changes

This PR sets the following fields for all jobs that are deployed from a
DAB
1. `deployment`: This provides the platform with the path to a file to
read the metadata from.
2. `edit_mode`: This tells the platform to display the break-glass UI
for jobs deployed from a DAB. Setting this is required to re-lock the UI
after a user clicks "disconnect from source".
3. `format = MULTI_TASK`. This makes the Terraform provider always use
jobs API 2.1 for creating/updating the job. Required because
`deployment` and `edit_mode` are only available in API 2.1.

## Tests

Unit test and manually. Manually verified that deployments trigger the
break glass UI. Manually verified there is no Terraform drift when all
three fields are set.

---------

Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
2023-12-19 07:38:52 +00:00
Andrew Nester 5526cd3fb2
Added output template for list-secrets command (#1074)
## Changes

Fixes #1067

## Tests

```
andrew.nester@HFW9Y94129 cli % databricks secrets list-secrets "my-test-scope"  --output text         
Key             Last Updated Timestamp
my-secret       1692805686489
my-test-secret  1692767910771
```
2023-12-18 16:09:11 +00:00
Andrew Nester 6dd6899b52
Do not allow input prompts in Git Bash terminal (#1069)
## Changes

Likely due to fact that Git Bash does not correctly support ANSI escape
sequences, we cannot use `promptui` package there. See known issues:

- https://github.com/manifoldco/promptui/issues/208
- https://github.com/chzyer/readline/issues/191
2023-12-18 15:01:59 +00:00
dependabot[bot] 4765493f18
Bump github.com/google/uuid from 1.4.0 to 1.5.0 (#1073)
Bumps [github.com/google/uuid](https://github.com/google/uuid) from
1.4.0 to 1.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/uuid/releases">github.com/google/uuid's
releases</a>.</em></p>
<blockquote>
<h2>v1.5.0</h2>
<h2><a
href="https://github.com/google/uuid/compare/v1.4.0...v1.5.0">1.5.0</a>
(2023-12-12)</h2>
<h3>Features</h3>
<ul>
<li>Validate UUID without creating new UUID (<a
href="https://redirect.github.com/google/uuid/issues/141">#141</a>) (<a
href="9ee7366e66">9ee7366</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/google/uuid/blob/master/CHANGELOG.md">github.com/google/uuid's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/google/uuid/compare/v1.4.0...v1.5.0">1.5.0</a>
(2023-12-12)</h2>
<h3>Features</h3>
<ul>
<li>Validate UUID without creating new UUID (<a
href="https://redirect.github.com/google/uuid/issues/141">#141</a>) (<a
href="9ee7366e66">9ee7366</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4d47f8eb06"><code>4d47f8e</code></a>
chore(master): release 1.5.0 (<a
href="https://redirect.github.com/google/uuid/issues/145">#145</a>)</li>
<li><a
href="9ee7366e66"><code>9ee7366</code></a>
feat: Validate UUID without creating new UUID (<a
href="https://redirect.github.com/google/uuid/issues/141">#141</a>)</li>
<li><a
href="b35aa6a595"><code>b35aa6a</code></a>
add uuid version 6 and 7 (<a
href="https://redirect.github.com/google/uuid/issues/139">#139</a>)</li>
<li>See full diff in <a
href="https://github.com/google/uuid/compare/v1.4.0...v1.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/google/uuid&package-manager=go_modules&previous-version=1.4.0&new-version=1.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>
2023-12-18 11:54:28 +00:00
Pieter Noordhuis cee70a53c8
Test existing behavior when loading non-string spark conf values (#1071)
## Changes

This test is expected to fail when we enable the custom YAML loader.
2023-12-18 11:22:22 +00:00
Pieter Noordhuis b17e845d44
Skip profile resolution if `DATABRICKS_AUTH_TYPE` is set (#1068)
## Changes

If a user configures a workspace host in a bundle and wants to use the
"azure-cli" authentication type, we would still run profile resolution.
If the databrickscfg has a matching profile, we still load it, even
though it should be a fallback.

## Tests

* Unit test.
* Manually confirmed that setting `DATABRICKS_AUTH_TYPE=azure-cli` now
works as expected.
2023-12-18 09:57:07 +00:00
Andrew Nester a6ec9ac08b
Upgrade Go SDK to 0.27.0 (#1064)
## Changes
Upgrade Go SDK to 0.27.0
2023-12-14 08:15:00 +00:00
Andrew Nester dc12b3f1cf
Release v0.210.3 (#1062)
Bundles:
* Improve default template
([#1046](https://github.com/databricks/cli/pull/1046)).
* Fix passthrough of pipeline notifications
([#1058](https://github.com/databricks/cli/pull/1058)).

Internal:
* Stub out Python virtual environment installation for `labs` commands
([#1057](https://github.com/databricks/cli/pull/1057)).
* Upgrade Terraform schema version to v1.31.1
([#1055](https://github.com/databricks/cli/pull/1055)).


Dependency updates:
* Bump github.com/hashicorp/hc-install from 0.6.1 to 0.6.2
([#1054](https://github.com/databricks/cli/pull/1054)).
* Bump github.com/databricks/databricks-sdk-go from 0.26.1 to 0.26.2
([#1053](https://github.com/databricks/cli/pull/1053)).
2023-12-13 15:43:03 +00:00
dependabot[bot] 8ac47d0b1d
Bump github.com/databricks/databricks-sdk-go from 0.26.1 to 0.26.2 (#1053)
Bumps
[github.com/databricks/databricks-sdk-go](https://github.com/databricks/databricks-sdk-go)
from 0.26.1 to 0.26.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/databricks/databricks-sdk-go/releases">github.com/databricks/databricks-sdk-go's
releases</a>.</em></p>
<blockquote>
<h2>v0.26.2</h2>
<p>This is a bugfix release, including a fix correcting issues with
OAuth flows, due to a bug with the propagation of the response status in
<code>httpclient</code>'s <code>RoundTrip()</code> implementation. This
fixes the <code>failed during request visitor: token: oauth2: cannot
fetch token: Response: {...}</code> error.</p>
<p>All fixes:</p>
<ul>
<li>Migrate Azure MSI &amp; Metadata Service token sources to
<code>httpclient</code> and add 100% test coverage (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/709">#709</a>).</li>
<li>Added <code>config.NewAzureCliTokenSource</code> and
<code>config.NewAzureMsiTokenSource</code> constructors (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/727">#727</a>).</li>
<li>Use per-config refresh context for OAuth tokens (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/728">#728</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/databricks/databricks-sdk-go/blob/main/CHANGELOG.md">github.com/databricks/databricks-sdk-go's
changelog</a>.</em></p>
<blockquote>
<h2>0.26.2</h2>
<p>This is a bugfix release, including a fix correcting issues with
OAuth flows, due to a bug with the propagation of the response status in
<code>httpclient</code>'s <code>RoundTrip()</code> implementation. This
fixes the <code>failed during request visitor: token: oauth2: cannot
fetch token: Response: {...}</code> error.</p>
<p>All fixes:</p>
<ul>
<li>Migrate Azure MSI &amp; Metadata Service token sources to
<code>httpclient</code> and add 100% test coverage (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/709">#709</a>).</li>
<li>Added <code>config.NewAzureCliTokenSource</code> and
<code>config.NewAzureMsiTokenSource</code> constructors (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/727">#727</a>).</li>
<li>Use per-config refresh context for OAuth tokens (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/pull/728">#728</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ebb3ea48bc"><code>ebb3ea4</code></a>
Release v0.26.2 (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/732">#732</a>)</li>
<li><a
href="2dbf06aac2"><code>2dbf06a</code></a>
Use per-config refresh context for OAuth tokens (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/728">#728</a>)</li>
<li><a
href="964cdc10f7"><code>964cdc1</code></a>
Added <code>config.NewAzureCliTokenSource</code> and
<code>config.NewAzureMsiTokenSource</code> con...</li>
<li><a
href="82d089a391"><code>82d089a</code></a>
Migrate Azure MSI &amp; Metadata Service token sources to
<code>httpclient</code> and add 10...</li>
<li><a
href="8b28282a41"><code>8b28282</code></a>
Add account level MSI credentials test (<a
href="https://redirect.github.com/databricks/databricks-sdk-go/issues/726">#726</a>)</li>
<li>See full diff in <a
href="https://github.com/databricks/databricks-sdk-go/compare/v0.26.1...v0.26.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/databricks/databricks-sdk-go&package-manager=go_modules&previous-version=0.26.1&new-version=0.26.2)](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>
Co-authored-by: Andrew Nester <andrew.nester@databricks.com>
2023-12-13 10:13:02 +00:00