Skip to content
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

Fixed databricks labs ucx workflows command #608

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/databricks/labs/ucx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,14 +890,18 @@ def _get_ext_hms_conf_from_policy(cluster_policy):
def latest_job_status(self) -> list[dict]:
latest_status = []
for step, job_id in self._state.jobs.items():
job_runs = list(self._ws.jobs.list_runs(job_id=job_id, limit=1))
latest_status.append(
{
"step": step,
"state": "UNKNOWN" if not job_runs else str(job_runs[0].state.result_state),
"started": "" if not job_runs else job_runs[0].start_time,
}
)
try:
job_runs = list(self._ws.jobs.list_runs(job_id=job_id, limit=1))
latest_status.append(
{
"step": step,
"state": "UNKNOWN" if not job_runs else str(job_runs[0].state.result_state),
"started": "<never run>" if not job_runs else job_runs[0].start_time,
}
)
except InvalidParameterValue as e:
logger.warning(f"skipping {step}: {e}")
continue
return latest_status


Expand Down
Loading