Skip to content

Commit e2e2706

Browse files
authored
Generate custom error during installation due to external metastore connectivity issues (#2425)
## Changes During installation, if there is an error due to external metastore connectivity, the installation raises an exception which may be confusing. This PR raises a custom exception msg and points user to the installation instruction for UCX to ext metastore. Resolves #1967 ### Functionality - [ ] added relevant user documentation - [ ] added new CLI command - [ ] modified existing command: `databricks labs ucx ...` - [ ] added a new workflow - [ ] modified existing workflow: `...` - [ ] added a new table - [ ] modified existing table: `...` ### Tests Tested by trying to install the ucx on a workspace with incorrect ext metastore connectivity - [ ] manually tested - [ ] added unit tests - [ ] added integration tests - [ ] verified on staging environment (screenshot attached)
1 parent a3ba965 commit e2e2706

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/databricks/labs/ucx/install.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
ResourceAlreadyExists,
4242
ResourceDoesNotExist,
4343
Unauthenticated,
44+
OperationFailed,
4445
)
4546
from databricks.sdk.retries import retried
4647
from databricks.sdk.service.dashboards import LifecycleState
@@ -529,6 +530,16 @@ def _create_database(self):
529530
"UCX Install: databricks labs install ucx"
530531
)
531532
raise BadRequest(msg) from err
533+
if "Unable to load AWS credentials from any provider in the chain" in str(err):
534+
msg = (
535+
"The UCX installation is configured to use external metastore. There is issue with the external metastore connectivity.\n"
536+
"Please check the UCX installation instruction https://github.com/databrickslabs/ucx?tab=readme-ov-file#prerequisites"
537+
"and re-run installation.\n"
538+
"Please Follow the Below Command to uninstall and Install UCX\n"
539+
"UCX Uninstall: databricks labs uninstall ucx.\n"
540+
"UCX Install: databricks labs install ucx"
541+
)
542+
raise OperationFailed(msg) from err
532543
raise err
533544

534545
def _get_create_dashboard_tasks(self) -> Iterable[Callable[[], None]]:

0 commit comments

Comments
 (0)