Skip to content

Commit 7b8d419

Browse files
authored
Adds option to skip assess_workflows via install-time choice & config (#4380)
## Changes Adds an installation prompt and a configurable flag in config.yml for users to skip `assess_workflows`. ### Linked issues Resolves #4374 ### Functionality - [x] modified existing workflow: `assessment` ### Tests - [x] manually tested <img width="996" height="316" alt="image" src="https://github.com/user-attachments/assets/b22105a9-c1ae-475f-9466-cc79add58a1c" />
1 parent 4162cc6 commit 7b8d419

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

docs/ucx/docs/reference/workflows/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ the [assessment report](/docs/reference/assessment).
8989
19. `assess_workflows`(experimnetal): This task retrieves the jobs to analyze their notebooks and files for
9090
[migration problems](/docs/reference/linter_codes). This will run for workflows that ran within the last 30 days.
9191
To analyze all workflows run the ["migration-progress-experimental"] workflow](/docs/reference/workflows#migration-progress-experimental).
92+
The assess_workflows task can be skipped during installation by responding to the prompt, or by setting the 'skip_assess_workflows' flag in config.yml. This allows you to control whether workflow analysis is performed as part of the assessment workflow.
9293

9394
After UCX assessment workflow finished, see the assessment dashboard for findings and recommendations.
9495
See [this guide](/docs/reference/assessment) for more details.

src/databricks/labs/ucx/assessment/workflows.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ def assess_workflows(self, ctx: RuntimeContext):
225225
226226
Also, stores direct filesystem accesses for display in the migration dashboard.
227227
"""
228+
if ctx.config.skip_assess_workflows:
229+
logger.info("Skipping assess_workflows as skip_assess_workflows is enabled.")
230+
return
228231
ctx.workflow_linter.refresh_report(ctx.sql_backend, ctx.inventory_database)
229232

230233

src/databricks/labs/ucx/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ class WorkspaceConfig: # pylint: disable=too-many-instance-attributes
9393
# Skip TACL migration during table migration
9494
skip_tacl_migration: bool = False
9595

96+
# Skip assess_workflows task during assessment
97+
skip_assess_workflows: bool = False
98+
9699
# Select SQL query statement disposition
97100
query_statement_disposition: Disposition = Disposition.INLINE
98101

src/databricks/labs/ucx/install.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ def _prompt_for_new_installation(self) -> WorkspaceConfig:
245245
include_databases = self._select_databases()
246246

247247
skip_tacl_migration = self.prompts.confirm("Do you want to skip TACL migration when migrating tables?")
248+
skip_assess_workflows = self.prompts.confirm("Do you want to skip workflow assessment?")
248249

249250
# Checking if the user wants to define a default owner group.
250251
default_owner_group = None
@@ -269,6 +270,7 @@ def _prompt_for_new_installation(self) -> WorkspaceConfig:
269270
include_group_names=configure_groups.include_group_names,
270271
renamed_group_prefix=configure_groups.renamed_group_prefix,
271272
skip_tacl_migration=skip_tacl_migration,
273+
skip_assess_workflows=skip_assess_workflows,
272274
log_level=log_level,
273275
num_threads=num_threads,
274276
include_databases=include_databases,

0 commit comments

Comments
 (0)