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

Ignore errors for Redash widgets and queries redeployment during installation #367

Merged
merged 3 commits into from
Oct 3, 2023
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
8 changes: 7 additions & 1 deletion src/databricks/labs/ucx/framework/dashboards.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dataclasses
import json
import logging
from collections.abc import Callable
from dataclasses import dataclass
from json import JSONDecodeError
Expand All @@ -17,6 +18,8 @@
)
from databricks.sdk.service.workspace import ImportFormat

logger = logging.getLogger(__name__)


@dataclass
class SimpleQuery:
Expand Down Expand Up @@ -186,7 +189,10 @@
_, name = k.split(":")
if name not in destructors:
continue
destructors[name](v)
try:
destructors[name](v)
except DatabricksError as err:
logger.info(f"Failed to delete {name}-{v} --- {err.error_code}")

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

View check run for this annotation

Codecov / codecov/patch

src/databricks/labs/ucx/framework/dashboards.py#L192-L195

Added lines #L192 - L195 were not covered by tests
state_dump = json.dumps(new_state, indent=2).encode("utf8")
self._ws.workspace.upload(self._query_state, state_dump, format=ImportFormat.AUTO, overwrite=True)

Expand Down
Loading