@@ -490,12 +490,17 @@ def config(self):
490490 def folder (self ):
491491 return self ._installation .install_folder ()
492492
493- def run (self ):
493+ def run (self ) -> bool :
494+ """Run workflow installation.
495+
496+ Returns
497+ bool :
498+ True, installation finished. False installation did not finish.
499+ """
494500 logger .info (f"Installing UCX v{ self ._product_info .version ()} " )
495- install_tasks = [self ._create_database ()] # Need the database before creating the dashboards
496- install_tasks .extend (self ._create_dashboards ())
501+ install_tasks = [self ._create_database_and_dashboards , self ._workflows_installer .create_jobs ]
497502 Threads .strict ("installing components" , install_tasks )
498- readme_url = self ._workflows_installer . create_jobs ( )
503+ readme_url = self ._installation . workspace_link ( "README" )
499504 if not self ._is_account_install and self ._prompts .confirm (f"Open job overview in your browser? { readme_url } " ):
500505 webbrowser .open (readme_url )
501506 logger .info (f"Installation completed successfully! Please refer to the { readme_url } for the next steps." )
@@ -504,6 +509,10 @@ def run(self):
504509 self ._trigger_workflow ("assessment" )
505510 return True
506511
512+ def _create_database_and_dashboards (self ) -> None :
513+ self ._create_database () # Need the database before creating the dashboards
514+ Threads .strict ("installing dashboards" , list (self ._get_create_dashboard_tasks ()))
515+
507516 def _create_database (self ):
508517 try :
509518 deploy_schema (self ._sql_backend , self ._config .inventory_database )
@@ -519,8 +528,8 @@ def _create_database(self):
519528 raise BadRequest (msg ) from err
520529 raise err
521530
522- def _create_dashboards (self ) -> Iterable [Callable [[], None ]]:
523- """Create the lakeview dashboards from the SQL queries in the queries subfolders"""
531+ def _get_create_dashboard_tasks (self ) -> Iterable [Callable [[], None ]]:
532+ """Get the tasks to create Lakeview dashboards from the SQL queries in the queries subfolders"""
524533 logger .info ("Creating dashboards..." )
525534 dashboard_folder_remote = f"{ self ._installation .install_folder ()} /dashboards"
526535 try :
@@ -544,7 +553,7 @@ def _create_dashboards(self) -> Iterable[Callable[[], None]]:
544553
545554 # TODO: Confirm the assumption below is correct
546555 # An InternalError may occur when the dashboard is being published and the database does not exists
547- @retried (on = [InternalError ], timeout = timedelta (minutes = 2 ))
556+ @retried (on = [InternalError ], timeout = timedelta (minutes = 4 ))
548557 def _create_dashboard (self , folder : Path , * , parent_path : str | None = None ) -> None :
549558 """Create a lakeview dashboard from the SQL queries in the folder"""
550559 logger .info (f"Creating dashboard in { folder } ..." )
0 commit comments