Conversation
Signed-off-by: Tanmay Rustagi <tanmay.rustagi@databricks.com>
Signed-off-by: Tanmay Rustagi <tanmay.rustagi@databricks.com>
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Python SDK — PR #1370: [Internal] Add HostType to HostMetadata
🥞 Stacked PR
changed]
changed](https://github.com/Default OIDC audience #1371/files/f48e10283426bda51b2e
f18c218ec019d51de3c9..ca751ee)]
changed](https://github.com/Hosttype resolved #1372/files/ca751eebb5ffcd689c678
475b0f60bcf8c4180da..6aabd40)]
Summary
Parses the
host_typefield from the/.well-known/databricks-configdiscovery endpoint intoHostMetadataand stores it onConfig, so the SDK knows whether a host is a workspace,account, or unified host without parsing hostnames.
Why
Today, the
host_typeproperty infers the host type by prefix-matching the hostname againstaccounts.— everything else is classified asWORKSPACE. This cannot detect unified hosts,which share the same hostname pattern as workspace hosts.
The server-side
host_typefield is being added to the/.well-known/databricks-configendpoint, returning
"workspace","account", or"unified". This PR threads that valueinto the SDK so it's available for use when the
host_typeproperty is updated to preferendpoint-resolved values over URL-based inference (PR #1372).
What changed
Interface changes
HostType.from_api_value(value)— new static method that normalizes API values(
workspace,account,unified) to enum constants. Case-insensitive. ReturnsNoneforunknown values.
HostMetadata.host_type— new field parsed from the discovery endpoint response.Behavioral changes
_resolve_host_metadata()now populatesConfig._resolved_host_typefrom the discoveryendpoint if not already set. The
host_typeproperty is not yet modified to use thisvalue — that is PR Hosttype resolved #1372 in this stack.
Internal changes
Config._resolved_host_typestores the host type resolved during_resolve_host_metadata().How is this tested?
from_api_value()normalization,HostMetadata.from_dict()parsing,_resolve_host_metadatapopulation, and does-not-overwrite semantics.NO_CHANGELOG=true