Skip to content

Commit

Permalink
Introduce Argo Workflows UI Url in the deployment post-text
Browse files Browse the repository at this point in the history
  • Loading branch information
savingoyal committed May 15, 2023
1 parent 7898125 commit f22b9b9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions metaflow/metaflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@
ARGO_EVENTS_EVENT = from_conf("ARGO_EVENTS_EVENT")
ARGO_EVENTS_WEBHOOK_URL = from_conf("ARGO_EVENTS_WEBHOOK_URL")

ARGO_WORKFLOWS_UI_URL = from_conf("ARGO_WORKFLOWS_UI_URL")

##
# Airflow Configuration
Expand Down
17 changes: 16 additions & 1 deletion metaflow/plugins/argo/argo_workflows_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
from metaflow import JSONType, current, decorators, parameters
from metaflow._vendor import click
from metaflow.exception import MetaflowException, MetaflowInternalError
from metaflow.metaflow_config import SERVICE_VERSION_CHECK, UI_URL
from metaflow.metaflow_config import (
SERVICE_VERSION_CHECK,
UI_URL,
ARGO_WORKFLOWS_UI_URL,
KUBERNETES_NAMESPACE,
)
from metaflow.package import MetaflowPackage

# TODO: Move production_token to utils
Expand Down Expand Up @@ -201,6 +206,16 @@ def create(
"due to Kubernetes naming conventions\non Argo Workflows. The "
"original flow name is stored in the workflow annotation.\n"
)
if ARGO_WORKFLOWS_UI_URL:
obj.echo(
"See it in the Argo Workflows UI here - \n"
"%s/workflow-templates/%s/%s\n"
% (
ARGO_WORKFLOWS_UI_URL.rstrip("/"),
KUBERNETES_NAMESPACE,
obj.workflow_name,
)
)
flow.schedule()
obj.echo("What will trigger execution of the workflow:", bold=True)
obj.echo(flow.trigger_explanation(), indent=True)
Expand Down

0 comments on commit f22b9b9

Please sign in to comment.