Skip to content

Commit

Permalink
Fixed InvalidParameterValue failure for scanning jobs running on in…
Browse files Browse the repository at this point in the history
…teractive clusters that got deleted (#2935)

Fix #2930
  • Loading branch information
nfx authored Oct 11, 2024
1 parent 38bd88b commit f2e8d2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/databricks/labs/ucx/source_code/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from databricks.labs.blueprint.paths import DBFSPath
from databricks.labs.lsql.backends import SqlBackend
from databricks.sdk import WorkspaceClient
from databricks.sdk.errors import NotFound, ResourceDoesNotExist, BadRequest
from databricks.sdk.errors import NotFound, ResourceDoesNotExist, BadRequest, InvalidParameterValue
from databricks.sdk.service import compute, jobs
from databricks.sdk.service.jobs import Source
from databricks.sdk.service.workspace import Language
Expand Down Expand Up @@ -327,7 +327,7 @@ def _register_existing_cluster_id(self, graph: DependencyGraph):
for library_full_status in library_full_status_list:
if library_full_status.library:
yield from self._register_library(graph, library_full_status.library)
except ResourceDoesNotExist:
except (ResourceDoesNotExist, InvalidParameterValue):
yield DependencyProblem('cluster-not-found', f'Could not find cluster: {self._task.existing_cluster_id}')

def _register_spark_submit_task(self, graph: DependencyGraph): # pylint: disable=unused-argument
Expand All @@ -340,7 +340,7 @@ def _register_cluster_info(self):
try:
cluster_info = self._ws.clusters.get(self._task.existing_cluster_id)
return self._new_job_cluster_metadata(cluster_info)
except ResourceDoesNotExist:
except (ResourceDoesNotExist, InvalidParameterValue):
message = f'Could not find cluster: {self._task.existing_cluster_id}'
yield DependencyProblem('cluster-not-found', message)
if self._task.new_cluster:
Expand Down

0 comments on commit f2e8d2c

Please sign in to comment.