Skip to content

Bump databricks-sdk-go to v0.127.0 - #4984

Merged
simonfaltum merged 16 commits into
mainfrom
simonfaltum/bump-sdk-0.127.0
Apr 16, 2026
Merged

Bump databricks-sdk-go to v0.127.0#4984
simonfaltum merged 16 commits into
mainfrom
simonfaltum/bump-sdk-0.127.0

Conversation

@simonfaltum

@simonfaltumsimonfaltum commented Apr 16, 2026

Copy link
Copy Markdown
Member

Why

New SDK release v0.127.0 is available. Notable changes include fixing a data race in concurrent credentials initialization, retry logic for token acquisition, and updated OpenAPI spec.

Changes

Standard SDK bump: go get, make generate, acceptance test golden file updates, whitespace fixes.

Diff breakdown (the diff looks large, but almost everything is generated):

┌─────────────────┬───────┬────────┬──────────────────────────────────┐
│ Area │ Files │ +Lines │ What │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ cmd/workspace │ 133 │ +3,938 │ Generated command stubs (genkit) │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ python │ 25 │ +1,115 │ Generated Python dataclasses │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ bundle/schema │ 2 │ +840 │ Generated JSON schema │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ cmd/account │ 40 │ +553 │ Generated account command stubs │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ bundle/internal │ 5 │ +371 │ Generated annotations/validation │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ acceptance │ 1 │ +145 │ Refschema golden output │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ Manual fixes │ ~30 │ ~110 │ Our actual code changes │
└─────────────────┴───────┴────────┴──────────────────────────────────┘

Follow-up fixes for compatibility:

  • errNotWorkspaceClient: The SDK removed databricks.ErrNotWorkspaceClient in v0.127.0. Defined it locally in cmd/root/auth.go since the CLI uses it as an internal sentinel between workspaceClientOrPrompt and MustAnyClient. The SDK stopped returning this error in v0.125.0, the CLI was already synthesizing it.
  • cmdio.WithLimit: New genkit feature. Generated list commands now support a --limit flag for client-side result capping. Implemented WithLimit context function and wired it into iterator rendering.
  • Jobs --limit collision: The Jobs API names its page size field Limit, which collided with the new genkit --limit flag. Renamed the API page size to --page-size (hidden) for both list and list-runs.
  • exhaustruct fixes: Added new SDK fields (ManagedEncryptionSettings, EffectiveFileEventQueue, DefaultBranch) to direct resource struct literals.
  • config.Root field count: Raised the TestTypeRoot guard threshold from (4600, 5000) to (5000, 5500) to accommodate new API fields.
  • Deprecated Workspace API (SA1019): SDK v0.127.0 added deprecation annotations to Workspace methods (GetStatusByPath, MkdirsByPath, Delete, ListAll) in favor of WorkspaceHierarchyService. Added //nolint:staticcheck to all 42 call sites. Migration to the new API will be a separate follow-up PR.

Test plan

  • go build ./... compiles clean
  • go test ./internal/build ./bundle/internal/schema ./bundle/direct/dresources ./bundle/config/resources all pass
  • go test ./acceptance -run refschema passes (golden output updated)
  • go test ./acceptance -run account-help passes (golden output updated)
  • go test ./acceptance -run pipelines/databricks-cli-help passes (golden output updated)
  • go test ./libs/structs/structwalk/ -run TestTypeRoot passes (threshold raised)
  • go tool -modfile=tools/go.mod golangci-lint run --timeout=15m passes (0 issues)
  • make checks passes clean

This pull request was AI-assisted by Isaac.

simonfaltumand others added 7 commits April 16, 2026 11:07
Artifact left behind by make generate, which moves tagging.py to
internal/genkit/ but doesn't clean up the lock file from the root.
Co-authored-by: Isaac
The SDK v0.127.0 bump added new API fields, pushing the count from
~4814 to 5213. Raise the guard bounds from (4600, 5000) to (5000, 5500).
Co-authored-by: Isaac
New apply-environment command added by SDK v0.127.0.
Co-authored-by: Isaac
SDK v0.127.0 added deprecation annotations to Workspace methods
(GetStatusByPath, MkdirsByPath, Delete, ListAll, Mkdirs) in favor of
WorkspaceHierarchyService (GetTreeNode, CreateTreeNode, DeleteTreeNode,
ListTreeNodes). Migration tracked separately.
Co-authored-by: Isaac
Comment thread.github/workflows/tagging.yml
Comment thread.github/workflows/tagging.yml Outdated
Comment threadinternal/genkit/tagging.py
Comment threadpython/codegen/uv.lock Outdated
Comment thread.gitattributes
Comment thread.github/workflows/tagging.yml Outdated
Comment threadbundle/direct/dresources/catalog.go Outdated
Comment threadbundle/direct/dresources/catalog.go Outdated
Comment threadbundle/direct/dresources/external_location.go Outdated
Comment threadcmd/account/access-control/access-control.go
Comment thread.gitattributes
Comment threadpython/uv.lock Outdated
Comment threadNEXT_CHANGELOG.md
Comment threadlibs/cmdio/render.go
- Revert file mode changes on tagging.yml and internal/genkit/tagging.py
(genkit set them to 755, should be 644)
- Fix tagging.yml path back to internal/genkit/tagging.py (genkit's
post-generate sed pattern doesn't match the uv run invocation)
- Restore .gitattributes header (NEXT_CHANGELOG merge=union, genkit
comment) stripped by genkit
- Restore python/codegen/uv.lock and python/uv.lock from main (proxy
URL leaked from local uv config)
- Restore blank line in internal/genkit/tagging.py
Co-authored-by: Isaac
- catalog.go: Map ManagedEncryptionSettings from CatalogInfo in
RemapState and forward from config in DoUpdate/DoUpdateWithID
(field exists on CatalogInfo, CreateCatalog, and UpdateCatalog)
- external_location.go: Map EffectiveFileEventQueue from
ExternalLocationInfo in RemapState, matching the existing pattern
for EffectiveEnableFileEvents
Co-authored-by: Isaac
This step was missed because post-generate.sh failed during the initial
make generate run (PyPI unreachable). Changes:
- postgres_projects remote type: ProjectSpec -> ProjectStatus
- external_locations: simplified effective_file_event_queue ignore rule
- postgres_projects: added default_branch as input_only
Co-authored-by: Isaac
The genkit template now skips regular request fields named "limit" when
pagination is active, avoiding the collision with the --limit result
capping flag. This replaces the manual --page-size workaround.
Co-authored-by: Isaac
@simonfaltum
simonfaltumforce-pushed the simonfaltum/bump-sdk-0.127.0 branch from fb725cd to c1f296bCompareApril 16, 2026 10:37
SDK v0.127.0 updated the Workspace API description from "notebooks and
folders" to "workspace objects such as notebooks, files, folders, and
dashboards."
Co-authored-by: Isaac
postgres_endpoints: postgres.EndpointSpec

postgres_projects: postgres.ProjectSpec
postgres_projects: postgres.ProjectStatus

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong. Can this be non-deterministic? I know the spec and status structs look similar.

cc @denik

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generator (generate_apitypes.py) picks types by field overlap, and ProjectStatus probably scored higher after the SDK added DefaultBranch to both types. But apitypes.yml already pins postgres_projects: postgres.ProjectSpec as a manual override, so the generated value doesn't take effect. Agreed this is a bit fragile, the generator could be more deterministic about preferring Spec over Status types.

Comment threadcmd/root/auth.go Outdated
Comment threadcmd/root/auth.go Outdated
Comment threadNEXT_CHANGELOG.md Outdated
- Fix nolint comments on HostType() calls: these are deprecated because
the SDK is moving to host-agnostic behavior, not WorkspaceHierarchyService
- Remove API changes from NEXT_CHANGELOG (not included per convention)
Co-authored-by: Isaac
- Move tagging.py.lock alongside tagging.py to internal/genkit/ so
that `uv run --locked` works in the tagging workflow
- Fix sed pattern: genkit writes `uv run --locked tagging.py` not
`python tagging.py`, so the old pattern never matched
Co-authored-by: Isaac
Comment threadtools/post-generate.sh
@pietern
pietern disabled auto-merge April 16, 2026 13:30
@simonfaltum
simonfaltum added this pull request to the merge queueApr 16, 2026
Merged via the queue into main with commit 4909238Apr 16, 2026
38 checks passed
@simonfaltum
simonfaltum deleted the simonfaltum/bump-sdk-0.127.0 branch April 16, 2026 14:17
deco-sdk-taggingBot added a commit that referenced this pull request Apr 22, 2026
## Release v0.298.0
### CLI
* Added `--limit` flag to all paginated list commands for client-side result capping ([#4984](#4984)). On `jobs list` and `jobs list-runs` the former API page-size flag was renamed to `--page-size` (hidden) to avoid collision.
* Accept `yes` in addition to `y` for confirmation prompts, and show `[y/N]` to indicate that no is the default.
* Cache `/.well-known/databricks-config` lookups under `~/.cache/databricks/<version>/host-metadata/` so repeat CLI invocations against the same host skip the ~700ms discovery round trip.
* Deprecated `auth env`. The command is hidden from help listings and prints a deprecation warning to stderr; it will be removed in a future release.
### Bundles
* Remove `experimental-jobs-as-code` template, superseded by `pydabs` ([#4999](#4999)).
* Prompt before destroying or recreating Lakebase resources (database instances, synced database tables, postgres projects and branches) ([#5052](#5052)).
* Treat deleted resources as not running in the `fail-on-active-runs` check ([#5044](#5044)).
* engine/direct: Added support for Vector Search Endpoints ([#4887](#4887)).
* engine/direct: Exclude deploy-only fields (e.g. `lifecycle`) from the Apps update mask so requests that change both `description` and `lifecycle.started` in the same deploy no longer fail with `INVALID_PARAMETER_VALUE` ([#5042](#5042), [#5051](#5051)).
* engine/direct: Fix phantom diffs from `depends_on` reordering in job tasks ([#4990](#4990)).
### Dependency updates
* Bump `github.com/databricks/databricks-sdk-go` from v0.126.0 to v0.128.0 ([#4984](#4984), [#5031](#5031)).
* Bump Go toolchain to 1.25.9 ([#5004](#5004)).
denik pushed a commit that referenced this pull request May 20, 2026
## Why
New SDK release
[v0.127.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.127.0)
is available. Notable changes include fixing a data race in concurrent
credentials initialization, retry logic for token acquisition, and
updated OpenAPI spec.
## Changes
Standard SDK bump: `go get`, `make generate`, acceptance test golden
file updates, whitespace fixes.
**Diff breakdown** (the diff looks large, but almost everything is
generated):
```
┌─────────────────┬───────┬────────┬──────────────────────────────────┐
│ Area │ Files │ +Lines │ What │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ cmd/workspace │ 133 │ +3,938 │ Generated command stubs (genkit) │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ python │ 25 │ +1,115 │ Generated Python dataclasses │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ bundle/schema │ 2 │ +840 │ Generated JSON schema │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ cmd/account │ 40 │ +553 │ Generated account command stubs │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ bundle/internal │ 5 │ +371 │ Generated annotations/validation │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ acceptance │ 1 │ +145 │ Refschema golden output │
├─────────────────┼───────┼────────┼──────────────────────────────────┤
│ Manual fixes │ ~30 │ ~110 │ Our actual code changes │
└─────────────────┴───────┴────────┴──────────────────────────────────┘
```
**Follow-up fixes for compatibility:**
- **`errNotWorkspaceClient`**: The SDK removed
`databricks.ErrNotWorkspaceClient` in v0.127.0. Defined it locally in
`cmd/root/auth.go` since the CLI uses it as an internal sentinel between
`workspaceClientOrPrompt` and `MustAnyClient`. The SDK stopped returning
this error in v0.125.0, the CLI was already synthesizing it.
- **`cmdio.WithLimit`**: New genkit feature. Generated list commands now
support a `--limit` flag for client-side result capping. Implemented
`WithLimit` context function and wired it into iterator rendering.
- **Jobs `--limit` collision**: The Jobs API names its page size field
`Limit`, which collided with the new genkit `--limit` flag. Renamed the
API page size to `--page-size` (hidden) for both `list` and `list-runs`.
- **exhaustruct fixes**: Added new SDK fields
(`ManagedEncryptionSettings`, `EffectiveFileEventQueue`,
`DefaultBranch`) to direct resource struct literals.
- **`config.Root` field count**: Raised the `TestTypeRoot` guard
threshold from (4600, 5000) to (5000, 5500) to accommodate new API
fields.
- **Deprecated Workspace API (SA1019)**: SDK v0.127.0 added deprecation
annotations to `Workspace` methods (`GetStatusByPath`, `MkdirsByPath`,
`Delete`, `ListAll`) in favor of `WorkspaceHierarchyService`. Added
`//nolint:staticcheck` to all 42 call sites. Migration to the new API
will be a separate follow-up PR.
## Test plan
- [x] `go build ./...` compiles clean
- [x] `go test ./internal/build ./bundle/internal/schema
./bundle/direct/dresources ./bundle/config/resources` all pass
- [x] `go test ./acceptance -run refschema` passes (golden output
updated)
- [x] `go test ./acceptance -run account-help` passes (golden output
updated)
- [x] `go test ./acceptance -run pipelines/databricks-cli-help` passes
(golden output updated)
- [x] `go test ./libs/structs/structwalk/ -run TestTypeRoot` passes
(threshold raised)
- [x] `go tool -modfile=tools/go.mod golangci-lint run --timeout=15m`
passes (0 issues)
- [x] `make checks` passes clean
This pull request was AI-assisted by Isaac.
denik pushed a commit that referenced this pull request May 20, 2026
## Release v0.298.0
### CLI
* Added `--limit` flag to all paginated list commands for client-side result capping ([#4984](#4984)). On `jobs list` and `jobs list-runs` the former API page-size flag was renamed to `--page-size` (hidden) to avoid collision.
* Accept `yes` in addition to `y` for confirmation prompts, and show `[y/N]` to indicate that no is the default.
* Cache `/.well-known/databricks-config` lookups under `~/.cache/databricks/<version>/host-metadata/` so repeat CLI invocations against the same host skip the ~700ms discovery round trip.
* Deprecated `auth env`. The command is hidden from help listings and prints a deprecation warning to stderr; it will be removed in a future release.
### Bundles
* Remove `experimental-jobs-as-code` template, superseded by `pydabs` ([#4999](#4999)).
* Prompt before destroying or recreating Lakebase resources (database instances, synced database tables, postgres projects and branches) ([#5052](#5052)).
* Treat deleted resources as not running in the `fail-on-active-runs` check ([#5044](#5044)).
* engine/direct: Added support for Vector Search Endpoints ([#4887](#4887)).
* engine/direct: Exclude deploy-only fields (e.g. `lifecycle`) from the Apps update mask so requests that change both `description` and `lifecycle.started` in the same deploy no longer fail with `INVALID_PARAMETER_VALUE` ([#5042](#5042), [#5051](#5051)).
* engine/direct: Fix phantom diffs from `depends_on` reordering in job tasks ([#4990](#4990)).
### Dependency updates
* Bump `github.com/databricks/databricks-sdk-go` from v0.126.0 to v0.128.0 ([#4984](#4984), [#5031](#5031)).
* Bump Go toolchain to 1.25.9 ([#5004](#5004)).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@simonfaltum@pietern@denik