Skip to content

Commit

Permalink
[Internal] Decouple oauth2 and serving (#855)
Browse files Browse the repository at this point in the history
## What changes are proposed in this pull request?
This PR removes serving.py's indirect dependency on oauth2.py by moving
DataPlaneInfo to serving.py. This change is also reflected in the
OpenAPI specification. It narrows down import scopes to prevent circular
dependencies.

## How is this tested?
Existing Unit tests.
  • Loading branch information
parthban-db authored Jan 10, 2025
1 parent d907c0c commit cbae014
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .codegen/_openapi_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a6a317df8327c9b1e5cb59a03a42ffa2aabeef6d
779817ed8d63031f5ea761fbd25ee84f38feec0d
2 changes: 2 additions & 0 deletions databricks/sdk/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/data_plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Callable, List

from databricks.sdk.oauth import Token
from databricks.sdk.service.oauth2 import DataPlaneInfo


@dataclass
Expand All @@ -19,6 +18,7 @@ class DataPlaneDetails:

class DataPlaneService:
"""Helper class to fetch and manage DataPlane details."""
from .service.serving import DataPlaneInfo

def __init__(self):
self._data_plane_info = {}
Expand Down
14 changes: 10 additions & 4 deletions databricks/sdk/service/apps.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions databricks/sdk/service/catalog.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 84 additions & 15 deletions databricks/sdk/service/jobs.py

Large diffs are not rendered by default.

78 changes: 33 additions & 45 deletions databricks/sdk/service/oauth2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cbae014

Please sign in to comment.