Commit Graph

1358 Commits

Author SHA1 Message Date
Ilya Kuznetsov e8825d559f
fix: Reuse existing `root` variable 2024-11-18 16:19:26 +01:00
Ilya Kuznetsov 00bb683be9
fix: Remove unnecessary fields in apply presets test 2024-11-18 16:13:14 +01:00
Ilya Kuznetsov 53e1f6df6a
fix: Skip permissions set and check for in-place 2024-11-18 16:05:21 +01:00
Ilya Kuznetsov e65b50cf3c
fix: Wrong condition 2024-11-18 12:22:14 +01:00
Ilya Kuznetsov 49f6bc9354
fix: Skipping in-place tests on Windows 2024-11-18 12:08:10 +01:00
Ilya Kuznetsov e7165ec17a
feat: Add Databricks Workspace conditions to dev mode setting. Add warning if conditions not met when preset is enabled by user 2024-11-18 11:58:56 +01:00
Ilya Kuznetsov 80ea3a05e3
fix: Move SyncRoot field to the top og the struct 2024-11-18 11:24:33 +01:00
Ilya Kuznetsov a3c6d571c8
fix: Use SyncRootPath 2024-11-18 11:11:44 +01:00
Ilya Kuznetsov e9b72895dc
test: Process target mode 2024-11-15 12:32:44 +01:00
Ilya Kuznetsov 8cd95eb0ea
test: Apply presets unit test 2024-11-15 12:09:53 +01:00
Ilya Kuznetsov 4cf692924c
fix: Missing root variable 2024-11-14 18:46:10 +01:00
Ilya Kuznetsov 51c8ef592c
fix: Applies autoformat 2024-11-14 18:38:31 +01:00
Ilya Kuznetsov 26f24538ee feat: Use dbr package for runtime check 2024-11-14 18:18:17 +01:00
Ilya Kuznetsov 0004ed27a7 Merge branch 'main' of github.com:databricks/cli into tmp/in-place-prototype 2024-11-14 18:12:34 +01:00
Pieter Noordhuis 1508d65c4c
Extract functionality to detect if the CLI is running on DBR (#1889)
## Changes

Whether or not the CLI is running on DBR can be detected once and stored
in the command's context.

By storing it in the context, it can easily be mocked for testing.

This builds on the simpler approach and conversation in #1744. It
unblocks testing of the DBR-specific paths while not compromising on the
checks we can perform to test if the CLI is running on DBR.

## Tests

* Unit tests for the new `dbr` package
* New unit test for the `ConfigureWSFS` mutator
2024-11-14 16:10:45 +00:00
Andrew Nester 2edfb6cfea
[Release] Release v0.234.0 (#1902)
Bundles:
* Do not execute build on bundle destroy
([#1882](https://github.com/databricks/cli/pull/1882)).
* Add support for non-Python ipynb notebooks to DABs
([#1827](https://github.com/databricks/cli/pull/1827)).

API Changes:
 * Added `databricks credentials` command group.
* Changed `databricks lakeview create` command with new required
argument order.

OpenAPI commit d25296d2f4aa7bd6195c816fdf82e0f960f775da (2024-11-07)
Dependency updates:
* Upgrade TF provider to 1.58.0
([#1900](https://github.com/databricks/cli/pull/1900)).
* Bump golang.org/x/sync from 0.8.0 to 0.9.0
([#1892](https://github.com/databricks/cli/pull/1892)).
* Bump golang.org/x/text from 0.19.0 to 0.20.0
([#1893](https://github.com/databricks/cli/pull/1893)).
* Bump golang.org/x/mod from 0.21.0 to 0.22.0
([#1895](https://github.com/databricks/cli/pull/1895)).
* Bump golang.org/x/oauth2 from 0.23.0 to 0.24.0
([#1894](https://github.com/databricks/cli/pull/1894)).
* Bump github.com/databricks/databricks-sdk-go from 0.49.0 to 0.51.0
([#1878](https://github.com/databricks/cli/pull/1878)).
2024-11-14 14:38:52 +00:00
Pieter Noordhuis 21d27885dc
Upgrade TF provider to 1.58.0 (#1900)
## Changes

Notable changes:
* Adds support for `restart_window` for pipelines.
* Fix drift for pipelines where `catalog` contains uppercase characters.
* Better error message if single-node job clusters are incorrectly configured.

See:
* https://github.com/databricks/terraform-provider-databricks/releases/tag/v1.58.0
* https://github.com/databricks/terraform-provider-databricks/releases/tag/v1.57.0
* https://github.com/databricks/terraform-provider-databricks/releases/tag/v1.56.0
* https://github.com/databricks/terraform-provider-databricks/releases/tag/v1.55.0

## Tests

Integration tests pass.
2024-11-14 14:00:15 +01:00
shreyas-goenka e1978fa429
Add support for non-Python ipynb notebooks to DABs (#1827)
## Changes

### Background

The workspace import APIs recently added support for importing Jupyter
notebooks written in R, Scala, or SQL, that is non-Python notebooks.
This now works for the `/import-file` API which we leverage in the CLI.

Note: We do not need any changes in `databricks sync`. It works out of
the box because any state mapping of local names to remote names that we
store is only scoped to the notebook extension (i.e., `.ipynb` in this
case) and is agnostic of the notebook's specific language.

### Problem this PR addresses

The extension-aware filer previously did not function because it checks
that a `.ipynb` notebook is written in Python. This PR relaxes that
constraint and adds integration tests for both the normal workspace
filer and extensions aware filer writing and reading non-Python `.ipynb`
notebooks.

This implies that after this PR DABs in the workspace / CLI from DBR
will work for non-Python notebooks as well. non-Python notebooks for
DABs deployment from local machines already works after the platform
side changes to the API landed, this PR just adds integration tests for
that bit of functionality.

Note: Any platform side changes we needed for the import API have
already been rolled out to production.

### Before

DABs deploy would work fine for non-Python notebooks. But DABs
deployments from DBR would not.

### After

DABs deploys both from local machines and DBR will work fine.

## Testing

For creating the `.ipynb` notebook fixtures used in the integration
tests I created them directly from the VSCode UI. This ensures high
fidelity with how users will create their non-Python notebooks locally.
For Python notebooks this is supported out of the box by VSCode but for
R and Scala notebooks this requires installing the Jupyter kernel for R
and Scala on my local machine and using that from VSCode.

For SQL, I ended up directly modifying the `language_info` field in the
Jupyter metadata to create the test fixture.

### Discussion: Issues with configuring language at the cell level

The language metadata for a Jupyter notebook is standardized at the
notebook level (in the `language_info` field). Unfortunately, it's not
standardized at the cell level. Thus, for example, if a user changes the
language for their cell in VSCode (which is supported by the standard
Jupyter VSCode integration), it'll cause a runtime error when the user
actually attempts to run the notebook. This is because the cell-level
metadata is encoded in a format specific to VSCode:
```
cells: []{
    "vscode": {
     "languageId": "sql"
    }
}
```

Supporting cell level languages is thus out of scope for this PR and can
be revisited along with the workspace files team if there's strong
customer interest.
2024-11-13 21:39:51 +00:00
dependabot[bot] 25838ee0af
Bump github.com/databricks/databricks-sdk-go from 0.49.0 to 0.51.0 (#1878)
Known issues:

- [ ] _(non-blocking with a command override)_ `apps.Update` requires 2
`name` params (one from path, one from request body)
- [ ] _(non-blocking)_ `lakeview.Create` does not require positional
argument `display_name` anymore because it's not marked as required in
request body

Bumps
[github.com/databricks/databricks-sdk-go](https://github.com/databricks/databricks-sdk-go)
from 0.49.0 to 0.51.0.

---------

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>
2024-11-13 13:40:53 +00:00
Ilya Kuznetsov b2164c0725
fix: Use SyncRootPath to allow using parent directories 2024-11-12 15:16:47 +01:00
Ilya Kuznetsov 6c1230889a
Merge branch 'main' of github.com:databricks/cli into tmp/in-place-prototype 2024-11-12 13:23:15 +01:00
Ilya Kuznetsov 5a22151580 feat: Move FilePath update to apply preset step 2024-11-12 09:58:36 +01:00
Ilya Kuznetsov a43f7ddad0 feat: Use global FilePath instead of locally overriden paths 2024-11-11 19:36:31 +01:00
dependabot[bot] f80ebe15f8
Bump golang.org/x/oauth2 from 0.23.0 to 0.24.0 (#1894)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from
0.23.0 to 0.24.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="22134a4103"><code>22134a4</code></a>
README: don't recommend go get</li>
<li>See full diff in <a
href="https://github.com/golang/oauth2/compare/v0.23.0...v0.24.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.23.0&new-version=0.24.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-11-11 11:58:19 +00:00
dependabot[bot] 1e1aaddfa4
Bump golang.org/x/mod from 0.21.0 to 0.22.0 (#1895)
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.21.0 to
0.22.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="dec0365065"><code>dec0365</code></a>
sumdb: make data tiles by Server compatible with sum.golang.org</li>
<li><a
href="c8a7319721"><code>c8a7319</code></a>
x/mod: fix handling of vendored packages with '/vendor' in non-top-level
paths</li>
<li><a
href="9cd0e4c9f6"><code>9cd0e4c</code></a>
x/mod: remove vendor/modules.txt from module download</li>
<li>See full diff in <a
href="https://github.com/golang/mod/compare/v0.21.0...v0.22.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/mod&package-manager=go_modules&previous-version=0.21.0&new-version=0.22.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-11-11 11:42:54 +00:00
dependabot[bot] bc96872b18
Bump golang.org/x/text from 0.19.0 to 0.20.0 (#1893)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.19.0 to
0.20.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="efd25daf28"><code>efd25da</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="8a0e65e7b4"><code>8a0e65e</code></a>
README: don't recommend go get</li>
<li><a
href="fefda1abda"><code>fefda1a</code></a>
internal/texttest: remove Run and Bench helpers</li>
<li><a
href="a457f47ba2"><code>a457f47</code></a>
all: normalize subtest names to NFC</li>
<li>See full diff in <a
href="https://github.com/golang/text/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=golang.org/x/text&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>
2024-11-11 11:42:07 +00:00
dependabot[bot] 6a28ae0bea
Bump golang.org/x/sync from 0.8.0 to 0.9.0 (#1892)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.8.0 to
0.9.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="151027eb56"><code>151027e</code></a>
README: don't recommend go get</li>
<li>See full diff in <a
href="https://github.com/golang/sync/compare/v0.8.0...v0.9.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.8.0&new-version=0.9.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-11-11 11:41:43 +00:00
Ilya Kuznetsov 086dfbc79d Merge branch 'main' of github.com:databricks/cli into tmp/in-place-prototype 2024-11-11 11:20:10 +01:00
Andrew Nester 162aa212bc
Do not execute build on bundle destroy (#1882)
## Changes
There's no value in building artifacts on destroy because they are just
removed from workspace as part of destroy.
2024-11-07 09:31:49 +00:00
Andrew Nester b6a376bf8a
[Release] Release v0.233.0 (#1886)
CLI:
* Clean host URL in the `auth login` command
([#1879](https://github.com/databricks/cli/pull/1879)).

Bundles:
* Fix bundle run when run interactively
([#1880](https://github.com/databricks/cli/pull/1880)).
* Fix relative path resolution for dashboards on Windows
([#1881](https://github.com/databricks/cli/pull/1881)).

Internal:
* Address goreleaser deprecation warning
([#1872](https://github.com/databricks/cli/pull/1872)).
* Update actions/github-script to v7
([#1873](https://github.com/databricks/cli/pull/1873)).
 * Use Go 1.23 ([#1871](https://github.com/databricks/cli/pull/1871)).
* [Internal] Always write message for manual integration test trigger
([#1874](https://github.com/databricks/cli/pull/1874)).
* Add `cmd-exec-id` to user agent
([#1808](https://github.com/databricks/cli/pull/1808)).
* Added E2E test to run Python wheels on interactive cluster created in
bundle ([#1864](https://github.com/databricks/cli/pull/1864)).


Dependency updates:
* Bump github.com/hashicorp/terraform-json from 0.22.1 to 0.23.0
([#1877](https://github.com/databricks/cli/pull/1877)).
2024-11-06 14:03:54 +00:00
Ilya Kuznetsov fbb9be9bdc
fix: Add SyncRoot mock to tests 2024-11-05 19:03:27 +01:00
Ilya Kuznetsov ae26beabfe Merge branch 'main' of github.com:databricks/cli into tmp/in-place-prototype 2024-11-05 18:13:27 +01:00
Ilya Kuznetsov 6b22fdebba Prototype for in-place deployments in DEV mode 2024-11-05 18:12:45 +01:00
shreyas-goenka b81008e2f6
Clean host URL in the `auth login` command (#1879)
## Changes
The host URL for databricks workspaces includes the workspaceId by
default as a positional arg. Eg:
https://e2-dogfood.staging.cloud.databricks.com/?o=1234

Thus a user can't simply copy paste the URL today to the auth login
command. They'll see a runtime error:
```
➜  cli git:(main) ✗ databricks auth login --host https://e2-dogfood.staging.cloud.databricks.com/\?o\=xxx --profile new-dg
Error: oidc: fetch .well-known: failed to unmarshal response body: invalid character '<' looking for beginning of value. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:
GET /login.html
...
```

## Tests
Unit tests and manually. Now auth login works even when the workspace_id
is included in the URL.
2024-11-05 15:29:27 +00:00
Pieter Noordhuis 26afab2ccb
Fix relative path resolution for dashboards on Windows (#1881)
## Changes

The file presence check for dashboard files was missing a
`filepath.ToSlash`.

This means it didn't work on Windows unless the dashboard was located at
a path without slashes (i.e. the bundle root).

Closes #1875.

## Tests

* Added a unit test to cover this case (failed before the fix).
* Manually ran a dashboard deployment on Windows.
2024-11-05 09:53:53 +00:00
Pieter Noordhuis edff68c763
Fix bundle run when run interactively (#1880)
## Changes

The commit where resource lookup was factored out into a separate
package (#1858) didn't take into account the use of `args` further down
in the code.

This change fixes that oversight by returning the tail arguments when
determining which resource to run. The later call no longer has to index
the `args` slice.

## Tests

Manually confirmed that the command works when being prompted for the
resource to run.
2024-11-05 09:30:11 +00:00
dependabot[bot] dd506e2372
Bump github.com/hashicorp/terraform-json from 0.22.1 to 0.23.0 (#1877)
Bumps
[github.com/hashicorp/terraform-json](https://github.com/hashicorp/terraform-json)
from 0.22.1 to 0.23.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.23.0</h2>
<p>ENHANCEMENTS:</p>
<ul>
<li>Add support for ephemeral resources by <a
href="https://github.com/radeksimko"><code>@​radeksimko</code></a> in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/138">hashicorp/terraform-json#138</a></li>
<li>Add action forget by <a
href="https://github.com/ilya-hontarau"><code>@​ilya-hontarau</code></a>
in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/126">hashicorp/terraform-json#126</a></li>
</ul>
<p>INTERNAL:</p>
<ul>
<li>Add a catalog-info.yaml file for Backstage by <a
href="https://github.com/imakewebthings"><code>@​imakewebthings</code></a>
in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/137">hashicorp/terraform-json#137</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/132">hashicorp/terraform-json#132</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/134">hashicorp/terraform-json#134</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/136">hashicorp/terraform-json#136</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/139">hashicorp/terraform-json#139</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/140">hashicorp/terraform-json#140</a></li>
<li>Bump github.com/hashicorp/go-version from 1.6.0 to 1.7.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/133">hashicorp/terraform-json#133</a></li>
<li>Bump github.com/zclconf/go-cty from 1.14.4 to 1.15.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/hashicorp/terraform-json/pull/135">hashicorp/terraform-json#135</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/hashicorp/terraform-json/compare/v0.22.1...v0.23.0">https://github.com/hashicorp/terraform-json/compare/v0.22.1...v0.23.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="888d47a5bb"><code>888d47a</code></a>
build(deps): Bump workflows to latest trusted versions (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/140">#140</a>)</li>
<li><a
href="76bdbbf215"><code>76bdbbf</code></a>
build(deps): Bump workflows to latest trusted versions (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/139">#139</a>)</li>
<li><a
href="51492df124"><code>51492df</code></a>
Add support for ephemeral resources (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/138">#138</a>)</li>
<li><a
href="3b3d508949"><code>3b3d508</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/terraform-json/issues/137">#137</a>
from imakewebthings/ct/backstage-catalog-info</li>
<li><a
href="c285c1aaa8"><code>c285c1a</code></a>
Add a catalog-info.yaml file for Backstage</li>
<li><a
href="db693d5bd1"><code>db693d5</code></a>
build(deps): Bump workflows to latest trusted versions (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/136">#136</a>)</li>
<li><a
href="0104004301"><code>0104004</code></a>
Bump github.com/zclconf/go-cty from 1.14.4 to 1.15.0 (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/135">#135</a>)</li>
<li><a
href="bb8c49e8ee"><code>bb8c49e</code></a>
Add action forget (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/126">#126</a>)</li>
<li><a
href="7d39b02e10"><code>7d39b02</code></a>
build(deps): Bump workflows to latest trusted versions (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/134">#134</a>)</li>
<li><a
href="9e856e84aa"><code>9e856e8</code></a>
Bump github.com/hashicorp/go-version from 1.6.0 to 1.7.0 (<a
href="https://redirect.github.com/hashicorp/terraform-json/issues/133">#133</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/hashicorp/terraform-json/compare/v0.22.1...v0.23.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.22.1&new-version=0.23.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-11-04 14:37:29 +00:00
Andrew Nester 71cf426755
Added E2E test to run Python wheels on interactive cluster created in bundle (#1864)
## Changes
Added E2E test to run python wheels on interactive cluster created in
bundle.

We had a gap in testing wheel on all purpose clusters, so this PR
addresses the gap
2024-11-01 14:22:47 +00:00
shreyas-goenka f3bf33da27
Add `cmd-exec-id` to user agent (#1808)
## Changes

This PR adds the `cmd-exec-id` field to the user agent. This allows us
to correlate multiple HTTP requests made from the CLI.

### Why Not Use HTTP traceparent?
We considered using the traceparent header in HTTP as an alternative,
but it's not a good fit for our use case. Here's why:
1. Purpose of traceparent: It's designed to trace a single HTTP request
across a distributed system as it moves through subsystems and proxies.
2. Our requirement: We need to trace multiple HTTP requests made during
a single command execution in the CLI.

For more details about how traceparent itself works and how it's used in
the Go SDK, see
https://github.com/databricks/databricks-sdk-go/pull/914.

## Tests
Unit test
2024-11-01 14:08:09 +00:00
hectorcast-db 2bbdd04217
[Internal] Always write message for manual integration test trigger (#1874)
## Changes
Old script could not be run from master due to security restrictions and
there is no reliable way to detect if a user as secrets.


## Tests
Opened a PR in SDK Java from fork
https://github.com/databricks/databricks-sdk-java/pull/375
2024-10-31 14:29:08 +00:00
Pieter Noordhuis 4a2d866f9a
Use Go 1.23 (#1871)
## Changes

This was released 2+ months ago so it has baked enough.

Blog post: https://go.dev/blog/go1.23.

## Tests

None other than unit and integration tests.
2024-10-31 12:42:14 +00:00
Pieter Noordhuis c12a157a2d
Update actions/github-script to v7 (#1873)
## Changes

This fixes warnings on the jobs that create PRs after a release:
```
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/github-script@v6. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
```

Observed this here:
https://github.com/databricks/cli/actions/runs/11599180656

## Tests

The [release
notes](https://github.com/actions/github-script/releases/tag/v7.0.0)
indicate no major changes besides the upgrade to Node 20.
2024-10-31 12:31:17 +00:00
Pieter Noordhuis 79833f0071
Address goreleaser deprecation warning (#1872)
## Changes

Deprecation of `name_template`:
https://goreleaser.com/deprecations#snapshotnametemplate

Observed in the "Run GoReleaser" step of
https://github.com/databricks/cli/actions/runs/11599180656/job/32296748853.

## Tests

* Run `goreleaser check`
* The snapshot build on this PR works
2024-10-31 12:09:23 +00:00
Andrew Nester a56d082910
[Release] Release v0.232.1 (#1869)
This patch release fixes the following error observed when deploying to
/Shared root folder
"Error: Path (/Shared/.bundle/.../resources) doesn't exist"

Bundles:
* Fixed adding /Workspace prefix for resource paths
([#1866](https://github.com/databricks/cli/pull/1866)).
2024-10-30 18:02:49 +00:00
Andrew Nester ac71d2e5ce
Fixed adding /Workspace prefix for resource paths (#1866)
## Changes
`/Workspace` prefix needs to be added to `resource_path` as well.

Fixes the issue mentioned here:
https://github.com/databricks/cli/pull/1822#issuecomment-2447697498

Fixes #1867 

## Tests
Added regression test
2024-10-30 17:34:11 +00:00
Andrew Nester 001a8da882
[Release] Release v0.232.0 (#1865)
**New features for Databricks Asset Bundles:**

This release adds support for managing AI/BI dashboards as part of your
bundle configuration. The `bundle generate` command is updated to
support producing dashboard bundle configuration as well as a serialized
JSON representation of the dashboard.
You can find an example configuration and walkthrough at
https://github.com/databricks/bundle-examples/tree/main/knowledge_base/dashboard_nyc_taxi

CLI:
* Add privacy notice to README
([#1841](https://github.com/databricks/cli/pull/1841)).

Bundles:
* Add support for AI/BI dashboards
([#1743](https://github.com/databricks/cli/pull/1743)).
* Added validator for folder permissions
([#1824](https://github.com/databricks/cli/pull/1824)).
* Add bundle generate variant for dashboards
([#1847](https://github.com/databricks/cli/pull/1847)).
* Use SetPermissions instead of UpdatePermissions when setting folder
permissions based on top-level ones
([#1822](https://github.com/databricks/cli/pull/1822)).

Internal:
* Attempt to reduce test flakiness on Windows
([#1845](https://github.com/databricks/cli/pull/1845)).
* Reuse resource resolution code for the run command
([#1858](https://github.com/databricks/cli/pull/1858)).
* [Internal] Automatically trigger integration tests on PR
([#1857](https://github.com/databricks/cli/pull/1857)).
* [Internal] Add test instructions for external contributors
([#1863](https://github.com/databricks/cli/pull/1863)).
* Add `libs/dyn/jsonsaver`
([#1862](https://github.com/databricks/cli/pull/1862)).


Dependency updates:
* Bump github.com/fatih/color from 1.17.0 to 1.18.0
([#1861](https://github.com/databricks/cli/pull/1861)).

---------

Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
2024-10-30 14:39:02 +00:00
Pieter Noordhuis fa25b92ba1
Add `libs/dyn/jsonsaver` (#1862)
## Changes

This package can be used to marshal a `dyn.Value` as JSON and retain the
ordering of keys in a mapping. Unlike the default behavior of
`json.Marshal,` the output does not encode HTML characters.

Otherwise, this is no different from using `JSON.Marshal` with
`v.AsAny().`

## Tests

Unit tests.
2024-10-29 15:32:33 +00:00
hectorcast-db 20fd401550
[Internal] Add test instructions for external contributors (#1863)
## Changes
Add test instructions for external contributors

## Tests
See Go Changes
https://github.com/databricks/databricks-sdk-go/pull/1073
2024-10-29 13:42:36 +00:00
Andrew Nester f018daf413
Use SetPermissions instead of UpdatePermissions when setting folder permissions based on top-level ones (#1822)
## Changes
Changed to use SetPermissions() to configure the permissions which
remove other permissions on deployment folders.

## Tests
Added unit test
2024-10-29 12:06:38 +00:00
Pieter Noordhuis 1896b09350
Add bundle generate variant for dashboards (#1847)
## Changes

This change adds the `databricks bundle generate dashboard` command.

The command requires one of three flags:
* `--existing-id` to generate configuration for an existing dashboard by
its ID.
* `--existing-path` to generate configuration for an existing dashboard
by its path in the workspace file system.
* `--resource` to generate the `.lvdash.json` dashboard file for a
dashboard that's already defined in the bundle. This option does not
impact the YAML configuration.

A typical workflow could look like this:
1. Use the command with `--existing-id` or `--existing-path` for a
starting point
2. Run `bundle deploy` to deploy a copy of the dashboard
3. Run `bundle open` to open this copy in your browser
4. Navigate to the draft mode and make modifications
5. Run `bundle generate dashboard` with `--resource` to update the local
`.lvdash.json` file with the remote modifications

## Tests

* Unit tests.
* Manual walkthrough as documented in the [Dashboard for NYC Taxi Trip
Analysis
example](https://github.com/databricks/bundle-examples/tree/main/knowledge_base/dashboard_nyc_taxi).
2024-10-29 11:51:59 +00:00