Skip to content

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

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

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

Conversation

@simonfaltum
Copy link
Copy Markdown
Member

@simonfaltum simonfaltum commented Apr 16, 2026

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.

simonfaltum and others added 7 commits April 16, 2026 11:07
Co-authored-by: Isaac
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 thread internal/genkit/tagging.py
Comment thread python/codegen/uv.lock Outdated
Comment thread .gitattributes
Comment thread .github/workflows/tagging.yml Outdated
Comment thread bundle/direct/dresources/catalog.go Outdated
Comment thread bundle/direct/dresources/catalog.go Outdated
Comment thread bundle/direct/dresources/external_location.go Outdated
Comment thread cmd/account/access-control/access-control.go
Comment thread .gitattributes
Comment thread python/uv.lock Outdated
Comment thread NEXT_CHANGELOG.md
Comment thread libs/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
@simonfaltum simonfaltum requested a review from pietern April 16, 2026 10:03
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 simonfaltum force-pushed the simonfaltum/bump-sdk-0.127.0 branch from fb725cd to c1f296b Compare April 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
Member Author

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 thread cmd/root/auth.go Outdated
Comment thread cmd/root/auth.go Outdated
Comment thread NEXT_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
@simonfaltum simonfaltum requested a review from pietern April 16, 2026 13:02
@simonfaltum simonfaltum enabled auto-merge April 16, 2026 13:19
Comment thread tools/post-generate.sh
@pietern pietern disabled auto-merge April 16, 2026 13:30
@simonfaltum simonfaltum added this pull request to the merge queue Apr 16, 2026
Merged via the queue into main with commit 4909238 Apr 16, 2026
38 checks passed
@simonfaltum simonfaltum deleted the simonfaltum/bump-sdk-0.127.0 branch April 16, 2026 14:17
Sign up for free to 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