[pull] main from databricks:main#251
Merged
Merged
Conversation
This PR updates the SDK to the latest API changes. NO_CHANGELOG=true Co-authored-by: databricks-ci-ghec-2[bot] <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com>
## Release v0.116.0 ### API Changes * Add `databricks.sdk.service.aisearch` and `databricks.sdk.service.bundledeployments` packages. * Add [w.ai_search](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/aisearch/ai_search.html) workspace-level service. * Add [w.bundle_deployments](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/bundledeployments/bundle_deployments.html) workspace-level service. * Add `running_instances` field for `databricks.sdk.service.apps.ApplicationStatus`. * Add `custom_max_retention_hours` field for `databricks.sdk.service.catalog.CatalogInfo`. * Add `environment_settings` field for `databricks.sdk.service.catalog.ConnectionInfo`. * Add `custom_max_retention_hours` field for `databricks.sdk.service.catalog.CreateCatalog`. * Add `environment_settings` field for `databricks.sdk.service.catalog.CreateConnection`. * Add `custom_max_retention_hours` field for `databricks.sdk.service.catalog.CreateSchema`. * Add `custom_max_retention_hours` field for `databricks.sdk.service.catalog.SchemaInfo`. * Add `custom_max_retention_hours` field for `databricks.sdk.service.catalog.UpdateCatalog`. * Add `environment_settings` field for `databricks.sdk.service.catalog.UpdateConnection`. * Add `custom_max_retention_hours` field for `databricks.sdk.service.catalog.UpdateSchema`. * Add `stream_source` field for `databricks.sdk.service.ml.DataSource`. * Add `ingestion_config` field for `databricks.sdk.service.ml.KafkaConfig`. * Add `clustering_columns`, `enable_auto_clustering` and `table_properties` fields for `databricks.sdk.service.pipelines.TableSpecificConfig`. * Add `branch_id` field for `databricks.sdk.service.postgres.Branch`. * Add `catalog_id` field for `databricks.sdk.service.postgres.Catalog`. * Add `database_id` field for `databricks.sdk.service.postgres.Database`. * Add `endpoint_id` field for `databricks.sdk.service.postgres.Endpoint`. * Add `project_id` field for `databricks.sdk.service.postgres.Project`. * Add `role_id` field for `databricks.sdk.service.postgres.Role`. * Add `synced_table_id` field for `databricks.sdk.service.postgres.SyncedTable`. * Add `allowed_databricks_destinations` field for `databricks.sdk.service.settings.EgressNetworkPolicyNetworkAccessPolicy`. * Add `facets`, `query_columns` and `sort_columns` fields for `databricks.sdk.service.vectorsearch.QueryVectorIndexRequest`. * Add `facet_result` field for `databricks.sdk.service.vectorsearch.QueryVectorIndexResponse`. * Add `facet_column_count` and `facet_columns` fields for `databricks.sdk.service.vectorsearch.ResultManifest`. * Add `dangerously_force_discard_all` field for `databricks.sdk.service.workspace.UpdateRepoRequest`. * [Breaking] Remove `databricks.sdk.service.bundle` package. * [Breaking] Remove [w.bundle](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/bundle/bundle.html) workspace-level service. * Add `accelerated_sync` field for `databricks.sdk.service.database.SyncedTableSpec`. * Add `accelerated_sync` field for `databricks.sdk.service.postgres.SyncedTableSyncedTableSpec`.
## What `DatabricksOidcTokenSource` (Workload Identity Federation / account-wide token federation) minted a fresh `/oidc/v1/token` exchange on **every** authenticated API call. Its `token()` always called `_exchange_id_token()`, which constructed a brand-new `oauth.ClientCredentials` each time — discarding the `Refreshable` caching/locking/refresh machinery already built into it. This change makes `DatabricksOidcTokenSource` extend `oauth.Refreshable` and moves the exchange logic into `refresh()`, so the minted token is cached and reused until it is stale or expired (mirroring the existing M2M/PAT flows). Each refresh re-fetches the ID token from the `id_token_source`, so short-lived **rotating** ID tokens are handled transparently. ## Why The previous behaviour: - added an extra RTT to every request, - amplified transient federation-policy errors by the number of API calls, - and hit OIDC token-endpoint rate limits. A real-world 470 MiB Volume upload minted dozens of tokens in under 30s, with bursts of 6–7 concurrent mints. ## Tests Added unit tests in `tests/test_oidc.py`: - token is minted once and reused across calls (caching), - an expired token triggers a re-exchange that fetches a **fresh** ID token (rotation), - missing host still raises `ValueError`. All existing auth tests pass (`test_oauth`, `test_oidc`, `test_credentials_provider`, `test_oidc_token_supplier`). Added a `NEXT_CHANGELOG.md` Bug Fixes entry. Signed-off-by: Hector Castejon Diaz <hector.castejon@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )