Skip to content

Commit 1b51dbd

Browse files
authored
Release databricks-sdk-py v0.123 (#1507)
Release databricks-sdk-py v0.123.0 ## Summary <!-- One or two sentences describing what this PR changes and what it enables. Focus on the effect, not the implementation details. Example: Extracts the credentials chain iteration logic into a reusable `NewCredentialsChain` constructor so that internal tools can compose their own authentication chains from individual credential strategies. --> ## Why <!-- Explain the problem that motivated this change. A reviewer who reads only this section should understand why the PR exists and what problem it solves. - Start with the status quo: how things work today and what limitation exists. - Explain who is affected and what they cannot do (or must work around). - If alternatives were considered and rejected, briefly mention why. - End with how this PR addresses the gap. The "why" is the most important part of a PR description — it usually cannot be inferred from the code itself. --> ## What changed ### Interface changes <!-- New or modified public API surface: types, functions, configuration options. Use backticks for code references. Write "None." if there are no changes. Example: - **`NewCredentialsChain(...CredentialsStrategy) CredentialsStrategy`** — Takes an ordered list of credential strategies and returns a strategy that tries them in sequence. --> ### Behavioral changes <!-- User-visible behavior changes: different defaults, changed error messages, new side effects, performance characteristics. Write "None." if this is a pure refactor — this explicitly reassures reviewers. --> ### Internal changes <!-- Refactoring, file moves, implementation details, test infrastructure. Things that don't affect the public API or user-visible behavior. --> ## How is this tested? <!-- Describe any tests you have done, especially tests that are not part of the unit tests (e.g. local tests, integration tests, manual verification). ALWAYS ANSWER THIS QUESTION: answer with "N/A" if tests are not applicable to your PR (e.g. if the PR only modifies comments). Do not be afraid of answering "Not tested" if the PR has not been tested. Being clear about what has been done and not done provides important context to the reviewers. -->
1 parent 780d960 commit 1b51dbd

325 files changed

Lines changed: 32331 additions & 7491 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codegen.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"mode": "py_v0",
3+
"api_changelog": false,
4+
"version": {
5+
"databricks/sdk/version.py": "__version__ = \"$VERSION\""
6+
},
7+
"sync": {
8+
"skip_from_genkit": [
9+
".github/workflows/next-changelog.yml",
10+
"tagging.py",
11+
"tagging.py.lock"
12+
],
13+
"skip_from_source": [
14+
"BUILD.bazel",
15+
"CLAUDE.md",
16+
"OWNERS",
17+
"README.md",
18+
"changelog.json",
19+
"releases.jsonl",
20+
".cursor",
21+
".cursorrules",
22+
".nextchanges",
23+
"changelog_validate",
24+
"next-changelog.yml",
25+
"tagging.py"
26+
],
27+
"rename_on_sync": {
28+
"README.public.md": "README.md"
29+
}
30+
},
31+
"toolchain": {
32+
"required": ["python3.12", "uv"],
33+
"pre_setup": [
34+
"python3.12 -m venv .databricks"
35+
],
36+
"prepend_path": ".databricks/bin",
37+
"setup": [
38+
"pip install '.[dev]'"
39+
],
40+
"post_generate": [
41+
"make fmt",
42+
"pip install .",
43+
"python3.12 docs/gen-client-docs.py"
44+
]
45+
}
46+
}

.codegen/_last_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9ce12048f2c4a4fefb93fc3f55cba9c9798f9cb6
1+
6a5609075cc2c497a0a78f7d6ebd599d903b415d

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9ce12048f2c4a4fefb93fc3f55cba9c9798f9cb6
1+
bb6433a6fab9f514ae007ef4cb93fb839a83108d

.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
databricks/sdk/__init__.py linguist-generated=true
22
databricks/sdk/errors/overrides.py linguist-generated=true
33
databricks/sdk/errors/platform.py linguist-generated=true
4-
databricks/sdk/service/__init__.py linguist-generated=true
5-
databricks/sdk/service/_internal.py linguist-generated=true
64
databricks/sdk/service/agentbricks.py linguist-generated=true
75
databricks/sdk/service/aisearch.py linguist-generated=true
86
databricks/sdk/service/apps.py linguist-generated=true
97
databricks/sdk/service/billing.py linguist-generated=true
10-
databricks/sdk/service/bundle.py linguist-generated=true
118
databricks/sdk/service/bundledeployments.py linguist-generated=true
129
databricks/sdk/service/catalog.py linguist-generated=true
1310
databricks/sdk/service/cleanrooms.py linguist-generated=true

.github/workflows/tagging.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ jobs:
3535
github.repository == 'databricks/databricks-sdk-go' ||
3636
github.repository == 'databricks/databricks-sdk-py' ||
3737
github.repository == 'databricks/databricks-sdk-java'
38-
env:
39-
# Ref the release is cut from. Releasing from a branch is currently
40-
# supported in the terraform repository only: for
41-
# terraform-provider-databricks this follows the dispatched branch
42-
# (``github.ref_name``), so a release can be cut from a branch other
43-
# than main; every other synced repo (SDK go/py/java, …) stays pinned
44-
# to main, preserving the pre-existing hardcoded-main behaviour and
45-
# blocking branch releases even via a manual non-main dispatch.
46-
RELEASE_REF: ${{ github.repository == 'databricks/terraform-provider-databricks' && github.ref_name || 'main' }}
4738
environment: "release-is"
4839
runs-on:
4940
group: databricks-protected-runner-group
@@ -59,19 +50,12 @@ jobs:
5950
- name: Checkout repository
6051
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6152
with:
62-
# Check out the release ref. ``RELEASE_REF`` is the dispatched
63-
# branch for terraform-provider-databricks and ``main`` for every
64-
# other repo (see the job-level ``env``). For scheduled runs and
65-
# manual dispatches left at defaults this is the default branch
66-
# (main); dispatching terraform with ``--ref <branch>`` cuts the
67-
# release from that branch instead.
68-
#
69-
# Naming the ref explicitly (rather than omitting ``ref:``)
70-
# forces re-resolution of the branch head at step time. Without
71-
# it, checkout pins to ``github.sha`` — the SHA frozen at
72-
# workflow_dispatch time — so re-running a stale dispatch would
73-
# check out an older commit even when newer ones exist.
74-
ref: ${{ env.RELEASE_REF }}
53+
# Force re-resolution of ``main`` at step time. Without
54+
# ``ref:``, checkout pins to ``github.sha`` — the SHA frozen
55+
# at workflow_dispatch time — which means re-running a stale
56+
# dispatch checks out an older main even when newer commits
57+
# exist.
58+
ref: main
7559
fetch-depth: 0
7660
token: ${{ steps.generate-token.outputs.token }}
7761

@@ -89,12 +73,6 @@ jobs:
8973
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
9074
GITHUB_REPOSITORY: ${{ github.repository }}
9175
PACKAGES: ${{ inputs.packages }}
92-
# Branch the release is cut from. tagging.py commits the
93-
# changelog bump and creates the tag on this branch, and its
94-
# concurrent-advance guard checks this branch. Matches the ref
95-
# checked out above (``RELEASE_REF``): the dispatched branch for
96-
# terraform, main everywhere else.
97-
DECO_TAGGING_REF: ${{ env.RELEASE_REF }}
9876
run: |
9977
if [ -n "$PACKAGES" ]; then
10078
uv run --locked tagging.py --package "$PACKAGES"

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Version changelog
22

3+
## Release v0.123.0 (2026-07-30)
4+
5+
### API Changes
6+
* Add [w.ai_gateway](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/catalog/ai_gateway.html) workspace-level service.
7+
* Add `update_operation()` method for [w.bundle_deployments](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/bundledeployments/bundle_deployments.html) workspace-level service.
8+
* Add `patch_telemetry_config()` method for [w.serving_endpoints](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/serving/serving_endpoints.html) workspace-level service.
9+
* Add `last_successful_version_id` and `updated_by` fields for `databricks.sdk.service.bundledeployments.Deployment`.
10+
* Add `dashboard_metadata`, `sequence_id` and `update_time` fields for `databricks.sdk.service.bundledeployments.Operation`.
11+
* Add `dashboard_metadata` field for `databricks.sdk.service.bundledeployments.Resource`.
12+
* Add `previous_version_id` field for `databricks.sdk.service.bundledeployments.Version`.
13+
* Add `dependency_mode` field for `databricks.sdk.service.compute.ClusterAttributes`.
14+
* Add `dependency_mode` field for `databricks.sdk.service.compute.ClusterDetails`.
15+
* Add `dependency_mode` field for `databricks.sdk.service.compute.ClusterSpec`.
16+
* Add `dependency_mode` field for `databricks.sdk.service.compute.CreateCluster`.
17+
* Add `dependency_mode` field for `databricks.sdk.service.compute.EditCluster`.
18+
* Add `dependency_mode` field for `databricks.sdk.service.compute.EnforcePolicyComplianceForClusterResponseClusterSettings`.
19+
* Add `dependency_mode` field for `databricks.sdk.service.compute.UpdateClusterResource`.
20+
* Add `effective_entitlements` field for `databricks.sdk.service.iamv2.WorkspaceAssignmentDetail`.
21+
* Add `code_source_path` field for `databricks.sdk.service.jobs.AiRuntimeTask`.
22+
* Add `serverless_compute_id` field for `databricks.sdk.service.jobs.JobCluster`.
23+
* Add `pause_status` field for `databricks.sdk.service.jobs.TriggerStateProto`.
24+
* Add `schema_registry_config` field for `databricks.sdk.service.ml.StreamSchemaConfig`.
25+
* Add `fanout_options` field for `databricks.sdk.service.pipelines.SchemaSpec`.
26+
* Add `extra_columns` field for `databricks.sdk.service.postgres.SyncedTableSyncedTableSpec`.
27+
* Add `parameters` field for `databricks.sdk.service.sql.AlertV2`.
28+
* Add `directory_info` field for `databricks.sdk.service.workspace.ObjectInfo`.
29+
* Add `special_destination_schema_owner`, `special_destination_table_owner`, `special_destination_volume_owner`, `special_destination_function_owner` and `special_destination_registered_model_owner` enum values for `databricks.sdk.service.catalog.SpecialDestination`.
30+
* [Breaking] Change `create_deployment()` method for [w.bundle_deployments](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/bundledeployments/bundle_deployments.html) workspace-level service with new required argument order.
31+
* [Breaking] Remove `deployment_id` field for `databricks.sdk.service.bundledeployments.CreateDeploymentRequest`.
32+
* [Breaking] Remove `lifetime` field for `databricks.sdk.service.ml.TimeWindow`.
33+
334
## Release v0.122.0 (2026-07-21)
435

536
### API Changes

databricks/sdk/__init__.py

100644100755
Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

databricks/sdk/_base_client.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import io
2+
import json
23
import logging
34
import urllib.parse
45
from abc import ABC, abstractmethod
5-
from datetime import timedelta
6+
from datetime import date, datetime, timedelta
7+
from enum import Enum
68
from types import TracebackType
79
from typing import Any, BinaryIO, Callable, Dict, Iterable, Iterator, List, Optional, Type, Union
810

@@ -19,6 +21,27 @@
1921
logger = logging.getLogger("databricks.sdk")
2022

2123

24+
def _json_default(o: Any) -> Any:
25+
"""``json.dumps`` ``default`` hook coercing SDK values into their wire form.
26+
27+
Lets an open ``Any`` body field accept an SDK response passed straight into
28+
the next call (function chaining), which is otherwise not JSON serializable.
29+
"""
30+
as_dict = getattr(o, "as_dict", None)
31+
if callable(as_dict):
32+
return as_dict()
33+
to_json_string = getattr(o, "ToJsonString", None) # protobuf Timestamp/Duration, FieldMask
34+
if callable(to_json_string):
35+
return to_json_string()
36+
if isinstance(o, (datetime, date)):
37+
return o.isoformat()
38+
if isinstance(o, timedelta):
39+
return f"{o.total_seconds()}s"
40+
if isinstance(o, Enum):
41+
return o.value
42+
raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable")
43+
44+
2245
def _fix_host_if_needed(host: Optional[str]) -> Optional[str]:
2346
if not host:
2447
return host
@@ -281,14 +304,18 @@ def _perform(
281304
data=None,
282305
auth: Callable[[requests.PreparedRequest], requests.PreparedRequest] = None,
283306
):
307+
json_data = None
308+
if body is not None and data is None and files is None:
309+
json_data = json.dumps(body, allow_nan=False, default=_json_default)
310+
headers = {"Content-Type": "application/json", **(headers or {})}
284311
response = self._session.request(
285312
method,
286313
url,
287314
params=self._fix_query_string(query),
288-
json=body,
315+
json=None if json_data is not None else body,
289316
headers=headers,
290317
files=files,
291-
data=data,
318+
data=json_data if json_data is not None else data,
292319
auth=auth,
293320
stream=raw,
294321
timeout=self._http_timeout_seconds,

databricks/sdk/errors/overrides.py

100644100755
File mode changed.

databricks/sdk/errors/platform.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)