Skip to content

Commit 752cbec

Browse files
authored
Fixed OSError: [Errno 95] bug in assess_workflows task by skipping GIT-sourced workflows from static code analysis (#2924)
Fix #2888
1 parent 9ac48a5 commit 752cbec

File tree

1 file changed

+5
-0
lines changed
  • src/databricks/labs/ucx/source_code

1 file changed

+5
-0
lines changed

src/databricks/labs/ucx/source_code/jobs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from databricks.sdk import WorkspaceClient
2020
from databricks.sdk.errors import NotFound, ResourceDoesNotExist, BadRequest
2121
from databricks.sdk.service import compute, jobs
22+
from databricks.sdk.service.jobs import Source
2223
from databricks.sdk.service.workspace import Language
2324

2425
from databricks.labs.ucx.assessment.crawlers import runtime_version_tuple
@@ -224,6 +225,10 @@ def _register_egg(self, graph, library):
224225
def _register_notebook(self, graph: DependencyGraph) -> Iterable[DependencyProblem]:
225226
if not self._task.notebook_task:
226227
return []
228+
if self._task.notebook_task.source == Source.GIT:
229+
# see https://github.com/databrickslabs/ucx/issues/2888
230+
message = 'Notebooks are in GIT. Use "databricks labs ucx lint-local-code" CLI command to discover problems'
231+
return [DependencyProblem("not-supported", message)]
227232
self._named_parameters = self._task.notebook_task.base_parameters
228233
notebook_path = self._task.notebook_task.notebook_path
229234
logger.info(f'Discovering {self._task.task_key} entrypoint: {notebook_path}')

0 commit comments

Comments
 (0)