Skip to content

Commit

Permalink
Warn about errors instead to avoid job task failure (#3219)
Browse files Browse the repository at this point in the history
## Changes
Log warning instead of raising the error to ensure job task run success.

### Linked issues
Resolves #3214
  • Loading branch information
pritishpai authored Nov 6, 2024
1 parent 84e5499 commit e52b1e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/databricks/labs/ucx/source_code/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from typing import TypeVar
from urllib import parse

from databricks.labs.blueprint.parallel import ManyError, Threads
from databricks.labs.blueprint.parallel import Threads
from databricks.labs.blueprint.paths import DBFSPath
from databricks.labs.lsql.backends import SqlBackend
from databricks.sdk import WorkspaceClient
Expand Down Expand Up @@ -430,7 +430,8 @@ def refresh_report(self, sql_backend: SqlBackend, inventory_database: str) -> No
self._directfs_crawler.dump_all(job_dfsas)
self._used_tables_crawler.dump_all(job_tables)
if len(errors) > 0:
raise ManyError(errors)
error_messages = "\n".join([str(error) for error in errors])
logger.warning(f"Errors occurred during linting:\n{error_messages}")

def lint_job(self, job_id: int) -> tuple[list[JobProblem], list[DirectFsAccess], list[UsedTable]]:
try:
Expand Down

0 comments on commit e52b1e9

Please sign in to comment.