Skip to content

Commit

Permalink
[Notifications] Fix Pipeline Notification Log Spam + Git Notification (
Browse files Browse the repository at this point in the history
…mlrun#5563)

fix pipeline notification bugs

Co-authored-by: quaark <a.melnick@icloud.com>
  • Loading branch information
quaark and quaark committed May 15, 2024
1 parent 3e18472 commit 7a85be1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mlrun/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"iter",
"start",
"state",
"kind",
"name",
"labels",
"inputs",
Expand Down Expand Up @@ -57,6 +58,7 @@ def to_rows(self, extend_iterations=False):
get_in(run, "metadata.iteration", ""),
get_in(run, "status.start_time", ""),
get_in(run, "status.state", ""),
get_in(run, "step_kind", get_in(run, "kind", "")),
get_in(run, "metadata.name", ""),
get_in(run, "metadata.labels", ""),
get_in(run, "spec.inputs", ""),
Expand Down
8 changes: 7 additions & 1 deletion mlrun/utils/notifications/notification_pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,13 @@ def _add_deploy_function_step(_, _node_template, _step_kind):

@staticmethod
def _get_workflow_manifest(workflow_id: str) -> typing.Optional[dict]:
kfp_client = kfp.Client(namespace=mlrun.mlconf.namespace)
kfp_url = mlrun.mlconf.resolve_kfp_url(mlrun.mlconf.namespace)
if not kfp_url:
raise mlrun.errors.MLRunNotFoundError(
"KubeFlow Pipelines is not configured"
)

kfp_client = kfp.Client(host=kfp_url)

# arbitrary timeout of 5 seconds, the workflow should be done by now
kfp_run = kfp_client.wait_for_run_completion(workflow_id, 5)
Expand Down

0 comments on commit 7a85be1

Please sign in to comment.