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

Handle widget delete on upgrade platform bug #1011

Merged
merged 1 commit into from
Mar 6, 2024
Merged
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
6 changes: 5 additions & 1 deletion src/databricks/labs/ucx/framework/dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@
assert dashboard.widgets is not None
for widget in dashboard.widgets:
assert widget.id is not None
self._ws.dashboard_widgets.delete(widget.id)
try:
self._ws.dashboard_widgets.delete(widget.id)
except TypeError:
logger.warning("Type error in SDK API response, ES-1061370")

Check warning on line 218 in src/databricks/labs/ucx/framework/dashboards.py

View check run for this annotation

Codecov / codecov/patch

src/databricks/labs/ucx/framework/dashboards.py#L215-L218

Added lines #L215 - L218 were not covered by tests
# Tracking bug in ES-1061370
return
dashboard = self._ws.dashboards.create(dashboard_name, run_as_role=RunAsRole.VIEWER, parent=parent_folder_id)
assert dashboard.id is not None
Expand Down
Loading