Bumps [golang.org/x/term](https://github.com/golang/term) from 0.29.0 to
0.30.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="04218fdaf7"><code>04218fd</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="208db03875"><code>208db03</code></a>
all: upgrade go directive to at least 1.23.0 [generated]</li>
<li>See full diff in <a
href="https://github.com/golang/term/compare/v0.29.0...v0.30.0">compare
view</a></li>
</ul>
</details>
<br />
[](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>
## Changes
Set Go patch version in go.mod
## Why
Our dependabot PRs failing with the following diff
```
Run # Exit with status code 1 if there are differences (i.e. unformatted files)
diff --git a/go.mod b/go.mod
index 5c1cb1d..493152a 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,[7](https://github.com/databricks/cli/actions/runs/13768953030/job/38502532441?pr=2459#step:5:8) @@
module github.com/databricks/cli
-go 1.23
+go 1.23.0
+
```
While I'm not sure why it started to happen, setting the patch version
at least should fix these PR.
This might be related to this change in Go
https://github.com/golang/go/issues/69095
## Changes
Add new CI jobs for testing Python code.
These jobs are separate from Golang code because they are executed
against a matrix of Python versions, and OS versions are not relevant.
We will get coverage with OS versions using acceptance tests. In
addition, we don't need to run these tests unless any of the Python code
is modified.
We use uv as a package manager to provision all CI tools:
- pyright to typecheck
- ruff to lint and format
experimental/python contains a Makefile with target similar to
repository root:
- make fmt
- make lint
- make build
## Tests
Using CI
<!-- How have you tested the changes? -->
---
NO_CHANGELOG=true
## Changes
<!-- Brief summary of your changes that is easy to understand -->
When a file is imported, FakeWorkspace now automatically identifies and
records all parent directories in the directories map, ensuring the
directory structure is properly maintained without requiring explicit
directory creation.
## Why
<!-- Why are these changes needed? Provide the context that the reviewer
might be missing.
For example, were there any decisions behind the change that are not
reflected in the code itself? -->
During an acceptance test, production code might want to check a root
folder for existence, this change makes sure that root folder is marked
as existing when at least one file is imported into the workspace
## Tests
<!-- How have you tested the changes? -->
Tests for another change using this improvement are green:
https://github.com/databricks/cli/pull/2463
<!-- If your PR needs to be included in the release notes for next
release,
add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
## Why
The command execution ID is a UUID that should be initialized once, and
then have a consistent read value for the duration of the command.
As we start emitting telemetry events, we also want to emit the command
execution ID in the telemetry payload. This library helps consolidate
all reads to the `cmd-exec-id` value, and ensures there's only one write
for the UUID.
relevant comment:
https://github.com/databricks/cli/pull/2432#discussion_r1982884235
## Tests
Unit tests.
## Changes
<!-- Summary of your changes that are easy to understand -->
This PR makes changes to the labs code base to allow for offline
installation of labs projects (like UCX). By passing a flag
--offline=true, the code will skip checking for project versions and
download code from GitHub and instead will look from the local
installation folder. This cmd is useful in systems where there is
internet restriction, the user should follow a set-up as follows:
- install a labs project on a machine which has internet
- zip and copy the file to the intended machine and
- run databricks labs install <project name>--offline=true
it will look for the code in the same install directory and if present
load from there.
Closes#1646
related to https://github.com/databrickslabs/ucx/issues/3418
## Tests
<!-- How is this tested? -->
Added unit test case and tested.
NO_CHANGELOG=true
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pieter Noordhuis <pieter.noordhuis@databricks.com>
Co-authored-by: Lennart Kats (databricks) <lennart.kats@databricks.com>
Co-authored-by: Denis Bilenko <denis.bilenko@databricks.com>
Co-authored-by: Julia Crawford (Databricks) <julia.crawford@databricks.com>
Co-authored-by: Ilya Kuznetsov <ilya.kuznetsov@databricks.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Nester <andrew.nester@databricks.com>
Co-authored-by: Anton Nekipelov <226657+anton-107@users.noreply.github.com>
Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
## Changes
Removed Changelog check Github Action
## Why
Check for the Changelog and the necessity to add `NO_CHANGELOG=true`
appears to be quite noisy, so removing this
NO_CHANGELOG=true
## Changes
Fixes#1888
## Why
`databricks queries list` is using override to define a template to
display a list in a nice table form. This Go template was referencing to
non existing anymore fields and hence failing.
## Tests
Added acceptance test
## Changes
Update `docsgen` output to align with new documentation framework
1. New header style, previously we had brackets for `<name>`, now it's
in italic `_name_`
2. Updated broken markdown in OpenAPI descriptions
3. Table markdown has different structure in new framework
## Tests
Updated existing tests
NO_CHANGELOG=true
## Changes
Move the WorkspaceClient reader and setter from the root package to
`libs/command`.
## Why
This allows us to read the workspace client set in the context in all
CLI packages. This was not possible before because using
`root.WorkspaceClient` would often result in an import cycle.
This would also allow us to standardise reads of the workspace client to
be from the context in bundle commands. Today those are read from the
bundle object tree instead.
This is a natural followup to
https://github.com/databricks/cli/pull/2440.
## Tests
Existing tests and one new unit test.
NO_CHANGELOG=true
## Changes
<!-- Brief summary of your changes that is easy to understand -->
1. Created a new acceptance test for binding an existing schema to a
bundle
2. Added a feature flag support for acceptance test runner
## Why
<!-- Why are these changes needed? Provide the context that the reviewer
might be missing.
For example, were there any decisions behind the change that are not
reflected in the code itself? -->
1. The test is more simple than an existing integration test for bind
2. The test only can run in environments where Unity Catalog is enabled
## Tests
<!-- How have you tested the changes? -->
New test is passing in CI/CD
## Changelog
NO_CHANGELOG=true
## Changes
I forgot to add a unit test in the original PR, so adding it here:
https://github.com/databricks/cli/pull/2440
## Why
Unit testing code is a good practice. I believe we all should unit test
code.
## Tests
N/A
NO_CHANGELOG=true
## Changes
Make NO_CHANGELOG=true a default in PR template
## Why
Quite large amount of our changes are internal and don't need call outs
in CHANGELOG hence this is a good default for majority of our PRs.
Without NO_CHANGELOG=true CI check expects to have an entry in
NEXT_CHANGELOG file as part of same PR.
NO_CHANGELOG=true
## Changes
This PR moves `ConfigUsed` from the root package to `libs/command`.
## Why
Having the ConfigUsed function in the root package is a problem because
that means we cannot use that function from outside the `root` package
since doing so often leads to an import cycle (because `root` imports
everything implicitly).
Moving it to a separate package that consolidates the read interaction
and solves the import cycle issue. Example where this would have
simplified code:
https://github.com/databricks/cli/pull/2432#discussion_r1983368092
I'd like to send PRs to do the same for the workspace client and account
client as well. I'll wait however until this one is merged incase people
have concerns about the approach here.
## Tests
Existing tests.
## Changes
Enable Automated tagging workflow. The workflow uses the `tagging.py`
script to:
* Flush the NEXT_CHANGELOG.md` file into the `CHANGELOG.md`.
* Create a Release commit and push it to `main` (without a PR)
* Create a tag for the release.
Usage and Changelog management details can be found in
[go/deco/release](go/deco/release).
This PR does:
* Added `cli_legacy` mode. Each SDK has it's own "mode" used to
determine which templates are to be used.
* `api_changelog: true` enables API changelog to be appended to
NEXT_CHANGELOG when generating the SDK.
* Removed `.codegen/changelog.md.tmpl`. Changelog templates are now part
of universe.
* Workflow and `tagging.py` files are synced from universe as part of
SDK generation. This allows us to test them and keep them in sync with
other SDKs.
## Tests
Workflow enabled in databricks/terraform-provider-databricks
---------
Co-authored-by: Andrew Nester <andrew.nester@databricks.com>
## Changes
This PR also starts storing the DBR versions in the context.
Go patch file used:
```
@@
var x expression
@@
-dbr.MockRuntime(x, true)
+dbr.MockRuntime(x, dbr.Environment{IsDbr: true, Version: "15.4"})
@@
var x expression
@@
-dbr.MockRuntime(x, false)
+dbr.MockRuntime(x, dbr.Environment{})
```
ref: https://github.com/uber-go/gopatch
## Why
This localised all DBR version accesses to `libs/dbr`. Relevant comment:
https://github.com/databricks/cli/pull/2432#discussion_r1982878616
## Tests
Exiting tests are modified.
## Changes
- New library to patch existing whl with dynamic version. The version is
based on mtime of original wheel.
- New hidden command "selftest patchwhl" (for acceptance test).
## Why
Part of the project to deprecate dynamic version in setup.py template
(#1034). This would enable switching default-python to pyproject.toml
without dependency on setuptools-specific sections.
The dynamic version is needed to ensure that wheels are picked up by the
users code when doing development.
## Tests
- New unit tests that use uv to create envs on various versions and
install (and re-install) patched wheels there.
- New acceptance test that patches prebuilt whl and records the result
fully unzipped.
- New acceptance test helper setmtime.py to set mtime with nanosecond
precision cross-platform.
## Changes
The `schema` field implies the lifecycle of tables is no longer tied to
the lifecycle of the pipeline, as was the case with the `target` field.
More information about using the "catalog" and "schema" properties can
be found here:
https://docs.databricks.com/en/delta-live-tables/target-schema.html
## Tests
n/a
---------
Co-authored-by: Lennart Kats (databricks) <lennart.kats@databricks.com>
## Changes
- Do not modify or edit .gitignore in bundle root.
- Instead create .databricks/.gitignore with content set to "*"
## Why
Merging our changes into existing .gitignore is complicated and adding
.gitignore where it's not expected adds to the noise. Other tools also
use the approach in this PR (e.g. ruff creates .ruff_cache/.gitignore).
## Tests
- Modified templates/default-sql to capture this new file.
## Changes
- Added `service-principal-secrets` command
- Added `budget-policy-id` for apps
- `experiments.log-inputs` now requires `ID` parameter as an input
- Added `genie.get-space` command
- Added `providers.list-provider-share-assets` command
For the whole list of SDK changes see:
https://github.com/databricks/databricks-sdk-go/releases/tag/v0.59.0
## Why
VSCode for me resolves `script` as YAML files showing incorrect syntax
coloring. This setting forces VSCode to treat all files named `script`
as shell scripts leading to better syntax highlighting.
These files are common place in our acceptance tests.
## Tests
Manually.
There is no perf difference, it's fast in both cases:
```
~/work/cli % hyperfine 'ruff format -qn'
Benchmark 1: ruff format -qn
Time (mean ± σ): 22.5 ms ± 4.1 ms [User: 23.6 ms, System: 106.7 ms]
Range (min … max): 17.3 ms … 50.2 ms 52 runs
```
but it no longer produces .ruff_cache which can confuse acceptance test
runner
```
~/work/cli % find . -type d | grep ruff
./.ruff_cache
./.ruff_cache/0.8.3
./libs/notebook/testdata/.ruff_cache
./libs/notebook/testdata/.ruff_cache/0.8.3
./libs/sync/testdata/.ruff_cache
./libs/sync/testdata/.ruff_cache/0.8.3
./acceptance/bundle/templates/default-sql/.ruff_cache
./acceptance/bundle/templates/default-sql/.ruff_cache/0.8.3
```