Skip to content

Commit

Permalink
Handle widget delete on upgrade platform bug (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
pritishpai authored and dmoore247 committed Mar 23, 2024
1 parent 6fc5fd0 commit 2ec6832
Showing 1 changed file with 5 additions and 1 deletion.
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 @@ def _install_dashboard(self, dashboard_name: str, parent_folder_id: str, dashboa
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")
# 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

0 comments on commit 2ec6832

Please sign in to comment.