Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed backwards compatibility breakage from Databricks SDK #3324

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ dependencies = [
path = ".venv"

[tool.hatch.envs.default.scripts]
test = "pytest -n 4 --cov src --cov-report=xml --timeout 30 tests/unit --durations 20 --cov-fail-under=90"
coverage = "pytest -n auto --cov src tests/unit --timeout 30 --cov-report=html --durations 20 --cov-fail-under=90"
test = "pytest -n 4 --cov src --cov-report=xml --timeout 30 tests/unit --durations 20 --cov-fail-under=89"
coverage = "pytest -n auto --cov src tests/unit --timeout 30 --cov-report=html --durations 20 --cov-fail-under=89"
integration = "pytest -n 10 --cov src tests/integration --durations 20"
fmt = ["black . --extend-exclude 'tests/unit/source_code/samples/'",
"ruff check . --fix",
Expand Down
12 changes: 7 additions & 5 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from databricks.sdk import AccountClient, WorkspaceClient
from databricks.sdk.errors import NotFound
from databricks.sdk.retries import retried
from databricks.sdk.service import iam
from databricks.sdk.service import iam, dashboards
from databricks.sdk.service.catalog import FunctionInfo, SchemaInfo, TableInfo
from databricks.sdk.service.compute import CreatePolicyResponse
from databricks.sdk.service.dashboards import Dashboard as SDKDashboard
Expand Down Expand Up @@ -118,10 +118,12 @@ def create(display_name: str = "") -> SDKDashboard:
else:
display_name = f"created_by_ucx_{make_random()}_{watchdog_purge_suffix}"
dashboard = ws.lakeview.create(
display_name,
serialized_dashboard=json.dumps(serialized_dashboard),
warehouse_id=warehouse_id,
)
dashboard=dashboards.Dashboard(
display_name=display_name,
serialized_dashboard=json.dumps(serialized_dashboard),
warehouse_id=warehouse_id,
).as_dict()
) # type: ignore
ws.lakeview.publish(dashboard.dashboard_id)
return dashboard

Expand Down