Skip to content

Commit 1ce5ca3

Browse files
Merge branch 'main' into patch-1
2 parents 6632851 + a1bfd69 commit 1ce5ca3

Some content is hidden

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

65 files changed

+2691
-1005
lines changed

.codegen/__init__.py.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ from databricks.sdk.credentials_provider import CredentialsStrategy
55
from databricks.sdk.mixins.files import DbfsExt
66
from databricks.sdk.mixins.compute import ClustersExt
77
from databricks.sdk.mixins.workspace import WorkspaceExt
8+
from databricks.sdk.mixins.open_ai_client import ServingEndpointsExt
89
{{- range .Services}}
910
from databricks.sdk.service.{{.Package.Name}} import {{.PascalName}}API{{end}}
1011
from databricks.sdk.service.provisioning import Workspace
@@ -17,7 +18,7 @@ from typing import Optional
1718
"google_credentials" "google_service_account" }}
1819

1920
{{- define "api" -}}
20-
{{- $mixins := dict "ClustersAPI" "ClustersExt" "DbfsAPI" "DbfsExt" "WorkspaceAPI" "WorkspaceExt" -}}
21+
{{- $mixins := dict "ClustersAPI" "ClustersExt" "DbfsAPI" "DbfsExt" "WorkspaceAPI" "WorkspaceExt" "ServingEndpointsAPI" "ServingEndpointsExt" -}}
2122
{{- $genApi := concat .PascalName "API" -}}
2223
{{- getOrDefault $mixins $genApi $genApi -}}
2324
{{- end -}}

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
248f4ad9668661da9d0bf4a7b0119a2d44fd1e75
1+
cf9c61453990df0f9453670f2fe68e1b128647a2

.codegen/service.py.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ class {{.PascalName}}API:{{if .Description}}
350350
{{- else if .Response.MapValue -}}
351351
return res
352352
{{- else -}}
353-
return {{.Response.PascalName}}.from_dict(res)
353+
return {{template "type" .Response}}.from_dict(res)
354354
{{- end}}
355355
{{- end}}
356356
{{- end}}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Integration Tests
2+
3+
on:
4+
5+
pull_request:
6+
types: [opened, synchronize]
7+
8+
merge_group:
9+
10+
11+
jobs:
12+
trigger-tests:
13+
if: github.event_name == 'pull_request'
14+
name: Trigger Tests
15+
runs-on: ubuntu-latest
16+
environment: "test-trigger-is"
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Generate GitHub App Token
22+
id: generate-token
23+
uses: actions/create-github-app-token@v1
24+
with:
25+
app-id: ${{ secrets.DECO_WORKFLOW_TRIGGER_APP_ID }}
26+
private-key: ${{ secrets.DECO_WORKFLOW_TRIGGER_PRIVATE_KEY }}
27+
owner: ${{ secrets.ORG_NAME }}
28+
repositories: ${{secrets.REPO_NAME}}
29+
30+
- name: Trigger Workflow in Another Repo
31+
env:
32+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
33+
run: |
34+
gh workflow run sdk-py-isolated-pr.yml -R ${{ secrets.ORG_NAME }}/${{secrets.REPO_NAME}} \
35+
--ref main \
36+
-f pull_request_number=${{ github.event.pull_request.number }} \
37+
-f commit_sha=${{ github.event.pull_request.head.sha }}
38+
39+
# Statuses and checks apply to specific commits (by hash).
40+
# Enforcement of required checks is done both at the PR level and the merge queue level.
41+
# In case of multiple commits in a single PR, the hash of the squashed commit
42+
# will not match the one for the latest (approved) commit in the PR.
43+
# We auto approve the check for the merge queue for two reasons:
44+
# * Queue times out due to duration of tests.
45+
# * Avoid running integration tests twice, since it was already run at the tip of the branch before squashing.
46+
auto-approve:
47+
if: github.event_name == 'merge_group'
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Mark Check
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
shell: bash
54+
run: |
55+
gh api -X POST -H "Accept: application/vnd.github+json" \
56+
-H "X-GitHub-Api-Version: 2022-11-28" \
57+
/repos/${{ github.repository }}/statuses/${{ github.sha }} \
58+
-f 'state=success' \
59+
-f 'context=Integration Tests Check'

CHANGELOG.md

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

3+
## [Release] Release v0.36.0
4+
5+
### Breaking Changes
6+
* `external_browser` now uses the `databricks-cli` app instead of the third-party "6128a518-99a9-425b-8333-4cc94f04cacd" application when performing the U2M login flow for Azure workspaces when a client ID is not otherwise specified. This matches the AWS behavior.
7+
* The signatures of several OAuth-related constructors have changed to support U2M OAuth with Azure Entra ID application registrations. See https://github.com/databricks/databricks-sdk-py/blob/main/examples/flask_app_with_oauth.py for examples of how to use these classes.
8+
* `OAuthClient()`: renamed to `OAuthClient.from_host()`
9+
* `SessionCredentials()` and `SessionCredentials.from_dict()`: now accepts `token_endpoint`, `client_id`, `client_secret`, and `refresh_url` as parameters, rather than accepting the `OAuthClient`.
10+
* `TokenCache()`: now accepts `host`, `token_endpoint`, `client_id`, `client_secret`, and `refresh_url` as parameters, rather than accepting the `OAuthClient`.
11+
12+
### Bug Fixes
13+
14+
* Decouple OAuth functionality from `Config` ([#784](https://github.com/databricks/databricks-sdk-py/pull/784)).
15+
16+
17+
### Release
18+
19+
* Release v0.35.0 ([#793](https://github.com/databricks/databricks-sdk-py/pull/793)).
20+
21+
22+
23+
## [Release] Release v0.35.0
24+
25+
### New Features and Improvements
26+
27+
* Open AI Client Mixin ([#779](https://github.com/databricks/databricks-sdk-py/pull/779)).
28+
29+
30+
### Bug Fixes
31+
32+
* Update Serving Endpoint mixing template and docs generation logic ([#792](https://github.com/databricks/databricks-sdk-py/pull/792)).
33+
34+
35+
### API Changes:
36+
37+
* Added `databricks.sdk.service.pipelines.ReportSpec` dataclass.
38+
* Added `unity_catalog_provisioning_state` field for `databricks.sdk.service.catalog.OnlineTable`.
39+
* Added `is_truncated` field for `databricks.sdk.service.dashboards.Result`.
40+
* Added `effective_budget_policy_id` field for `databricks.sdk.service.jobs.BaseJob`.
41+
* Added `budget_policy_id` field for `databricks.sdk.service.jobs.CreateJob`.
42+
* Added `effective_budget_policy_id` field for `databricks.sdk.service.jobs.Job`.
43+
* Added `budget_policy_id` field for `databricks.sdk.service.jobs.JobSettings`.
44+
* Added `budget_policy_id` field for `databricks.sdk.service.jobs.SubmitRun`.
45+
* Added `report` field for `databricks.sdk.service.pipelines.IngestionConfig`.
46+
* Added `sequence_by` field for `databricks.sdk.service.pipelines.TableSpecificConfig`.
47+
* Added `notify_on_ok` field for `databricks.sdk.service.sql.Alert`.
48+
* Added `notify_on_ok` field for `databricks.sdk.service.sql.CreateAlertRequestAlert`.
49+
* Added `notify_on_ok` field for `databricks.sdk.service.sql.ListAlertsResponseAlert`.
50+
* Added `notify_on_ok` field for `databricks.sdk.service.sql.UpdateAlertRequestAlert`.
51+
52+
OpenAPI SHA: cf9c61453990df0f9453670f2fe68e1b128647a2, Date: 2024-10-14
53+
54+
## [Release] Release v0.34.0
55+
56+
### Bug Fixes
57+
58+
* Fix Model Serving Test ([#781](https://github.com/databricks/databricks-sdk-py/pull/781)).
59+
* Include package name for external types when deserializing responses ([#786](https://github.com/databricks/databricks-sdk-py/pull/786)).
60+
61+
62+
### Internal Changes
63+
64+
* Refactor ApiClient into `_BaseClient` and `ApiClient` ([#785](https://github.com/databricks/databricks-sdk-py/pull/785)).
65+
* Update to latest OpenAPI spec ([#787](https://github.com/databricks/databricks-sdk-py/pull/787)).
66+
* revert Support Models in `dbutils.fs` operations ([#750](https://github.com/databricks/databricks-sdk-py/pull/750)) ([#778](https://github.com/databricks/databricks-sdk-py/pull/778)).
67+
68+
69+
### API Changes:
70+
71+
* Added [w.disable_legacy_dbfs](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/settings/disable_legacy_dbfs.html) workspace-level service.
72+
* Added `default_source_code_path` and `resources` fields for `databricks.sdk.service.apps.App`.
73+
* Added `resources` field for `databricks.sdk.service.apps.CreateAppRequest`.
74+
* Added `resources` field for `databricks.sdk.service.apps.UpdateAppRequest`.
75+
76+
OpenAPI SHA: bc17b474818138f19b78a7bea0675707dead2b87, Date: 2024-10-07
77+
378
## [Release] Release v0.33.0
479

580
### Internal Changes

NOTICE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,22 @@ googleapis/google-auth-library-python - https://github.com/googleapis/google-aut
1212
Copyright google-auth-library-python authors
1313
License - https://github.com/googleapis/google-auth-library-python/blob/main/LICENSE
1414

15+
openai/openai-python - https://github.com/openai/openai-python
16+
Copyright 2024 OpenAI
17+
License - https://github.com/openai/openai-python/blob/main/LICENSE
18+
1519
This software contains code from the following open source projects, licensed under the BSD (3-clause) license.
1620

1721
x/oauth2 - https://cs.opensource.google/go/x/oauth2/+/master:oauth2.go
1822
Copyright 2014 The Go Authors. All rights reserved.
1923
License - https://cs.opensource.google/go/x/oauth2/+/master:LICENSE
24+
25+
encode/httpx - https://github.com/encode/httpx
26+
Copyright 2019, Encode OSS Ltd
27+
License - https://github.com/encode/httpx/blob/master/LICENSE.md
28+
29+
This software contains code from the following open source projects, licensed under the MIT license:
30+
31+
langchain-ai/langchain - https://github.com/langchain-ai/langchain/blob/master/libs/partners/openai
32+
Copyright 2023 LangChain, Inc.
33+
License - https://github.com/langchain-ai/langchain/blob/master/libs/partners/openai/LICENSE

databricks/sdk/__init__.py

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

0 commit comments

Comments
 (0)