-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: asses_jobs task fails #838
Comments
ClusterDetails objects is not complete. When adding |
@geiranton you're using unreleased version at your own risk ;) |
Is there an existing issue for this?
Current Behavior
`AttributeError: 'ClusterSpec' object has no attribute 'creator_user_name'
AttributeError Traceback (most recent call last)
File ~/.ipykernel/1139/command--1-1486021540:18
15 entry = [ep for ep in metadata.distribution("databricks_labs_ucx").entry_points if ep.name == "runtime"]
16 if entry:
17 # Load and execute the entrypoint, assumes no parameters
---> 18 entry[0].load()()
19 else:
20 import databricks_labs_ucx
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/runtime.py:365, in main(*argv)
363 if len(argv) == 0:
364 argv = sys.argv
--> 365 trigger(*argv)
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/framework/tasks.py:245, in trigger(*argv)
243 ucx_logger = logging.getLogger("databricks.labs.ucx")
244 ucx_logger.info(f"UCX v{version} After job finishes, see debug logs at {task_logger}")
--> 245 current_task.fn(cfg)
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/runtime.py:114, in assess_jobs(cfg)
112 ws = WorkspaceClient(config=cfg.to_databricks_config())
113 crawler = JobsCrawler(ws, RuntimeBackend(), cfg.inventory_database)
--> 114 crawler.snapshot()
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/assessment/jobs.py:99, in JobsCrawler.snapshot(self)
98 def snapshot(self) -> Iterable[JobInfo]:
---> 99 return self._snapshot(self._try_fetch, self._crawl)
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/framework/crawlers.py:293, in CrawlerBase._snapshot(self, fetcher, loader)
291 pass
292 logger.debug(f"[{self._full_name}] crawling new batch for {self._table}")
--> 293 loaded_records = list(loader())
294 self._append_records(loaded_records)
295 return loaded_records
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/assessment/jobs.py:54, in JobsCrawler._crawl(self)
52 all_jobs = list(self._ws.jobs.list(expand_tasks=True))
53 all_clusters = {c.cluster_id: c for c in self._ws.clusters.list()}
---> 54 return self._assess_jobs(all_jobs, all_clusters)
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/assessment/jobs.py:87, in JobsCrawler._assess_jobs(self, all_jobs, all_clusters_by_id)
85 if not job_id:
86 continue
---> 87 cluster_failures = self._check_cluster_failures(cluster_config)
88 for failure in json.loads(cluster_failures.failures):
89 job_assessment[job_id].add(failure)
File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.10/site-packages/databricks/labs/ucx/assessment/clusters.py:72, in ClustersMixin._check_cluster_failures(self, cluster)
70 def _check_cluster_failures(self, cluster: ClusterDetails):
71 failures = []
---> 72 if not cluster.creator_user_name:
73 logger.warning(
74 f"Cluster {cluster.cluster_id} have Unknown creator, it means that the original creator "
75 f"has been deleted and should be re-created"
76 )
77 cluster_info = ClusterInfo(
78 cluster_id=cluster.cluster_id if cluster.cluster_id else "",
79 cluster_name=cluster.cluster_name,
(...)
82 failures="[]",
83 )
AttributeError: 'ClusterSpec' object has no attribute 'creator_user_name'`
Expected Behavior
Steps To Reproduce
Run "[UCX] assessment" workflow
Cloud
Azure
Operating System
Linux
Version
via install.sh
Relevant log output
The text was updated successfully, but these errors were encountered: