Skip to content

Commit

Permalink
Sparkjob - show and save UI ingress URL (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
urihoenig committed Oct 11, 2020
1 parent 65a00a9 commit 94a094c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mlrun/runtimes/sparkjob.py
Expand Up @@ -232,7 +232,14 @@ def _run(self, runobj: RunObject, execution: MLClientCtx):
meta.name, driver, status
)
)
logger.info("use .watch({}) to see logs".format(meta.name))
resp = self.get_job(meta.name, meta.namespace)
ui_ingress = (
resp.get("status", {})
.get("driverInfo", {})
.get("webUIIngressAddress")
)
if ui_ingress:
runobj.status.status_text = f"UI is available while the job is running: http://{ui_ingress}"
else:
logger.error(
"SparkJob status unknown or failed, check pods: {}".format(
Expand Down

0 comments on commit 94a094c

Please sign in to comment.