@@ -139,7 +139,6 @@ def __init__(
139139 promtps : Prompts | None = None ,
140140 wheels : Wheels | None = None ,
141141 sql_backend : SqlBackend | None = None ,
142- skip_prompts : bool = False ,
143142 ):
144143 if "DATABRICKS_RUNTIME_VERSION" in os .environ :
145144 msg = "WorkspaceInstaller is not supposed to be executed in Databricks Runtime"
@@ -157,7 +156,6 @@ def __init__(
157156 self ._dashboards : dict [str , str ] = {}
158157 self ._state = InstallState (ws , self ._install_folder )
159158 self ._install_override_clusters = None
160- self ._skip_prompts = skip_prompts
161159
162160 def run (self ):
163161 logger .info (f"Installing UCX v{ self ._wheels .version ()} " )
@@ -193,15 +191,15 @@ def _install_spark_config_for_hms_lineage(self):
193191 if gscript .enabled :
194192 logger .info ("Already exists and enabled. Skipped creating a new one." )
195193 elif not gscript .enabled :
196- if self ._skip_prompts or self . _prompts .confirm (
194+ if self ._prompts .confirm (
197195 "Your Global Init Script with required spark config is disabled, Do you want to enable it?"
198196 ):
199197 logger .info ("Enabling Global Init Script..." )
200198 hms_lineage .enable_global_init_script (gscript )
201199 else :
202200 logger .info ("No change to Global Init Script is made." )
203201 elif not gscript :
204- if self ._skip_prompts or self . _prompts .confirm (
202+ if self ._prompts .confirm (
205203 "No Global Init Script with Required Spark Config exists, Do you want to create one?"
206204 ):
207205 logger .info ("Creating Global Init Script..." )
@@ -217,10 +215,9 @@ def run_for_config(
217215 wheels : Wheels | None = None ,
218216 override_clusters : dict [str , str ] | None = None ,
219217 sql_backend : SqlBackend | None = None ,
220- skip_prompts : bool = False ,
221218 ) -> "WorkspaceInstaller" :
222219 workspace_installer = WorkspaceInstaller (
223- ws , prefix = prefix , promtps = promtps , wheels = wheels , sql_backend = sql_backend , skip_prompts = skip_prompts
220+ ws , prefix = prefix , promtps = promtps , wheels = wheels , sql_backend = sql_backend
224221 )
225222 logger .info (f"Installing UCX v{ workspace_installer ._wheels .version ()} on { ws .config .host } " )
226223 workspace_installer ._config = config
@@ -555,7 +552,7 @@ def _create_readme(self):
555552 self ._ws .workspace .upload (path , intro .encode ("utf8" ), overwrite = True )
556553 url = self .notebook_link (path )
557554 logger .info (f"Created README notebook with job overview: { url } " )
558- if self ._skip_prompts or self . _prompts .confirm ("Open job overview in README notebook in your home directory?" ):
555+ if self ._prompts .confirm ("Open job overview in README notebook in your home directory?" ):
559556 webbrowser .open (url )
560557
561558 def _replace_inventory_variable (self , text : str ) -> str :
@@ -803,7 +800,7 @@ def latest_job_status(self) -> list[dict]:
803800 return latest_status
804801
805802 def uninstall (self ):
806- if self ._skip_prompts or self . _prompts .confirm (
803+ if self ._prompts .confirm (
807804 "Do you want to uninstall ucx from the workspace too, this would "
808805 "remove ucx project folder, dashboards, queries and jobs"
809806 ):
@@ -825,7 +822,7 @@ def uninstall(self):
825822 logger .info ("UnInstalling UCX complete" )
826823
827824 def _remove_database (self ):
828- if self ._skip_prompts or self . _prompts .confirm (
825+ if self ._prompts .confirm (
829826 f"Do you want to delete the inventory database { self ._current_config .inventory_database } too?"
830827 ):
831828 logger .info (f"Deleting inventory database { self ._current_config .inventory_database } " )
0 commit comments