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

Print workflow template location as part of argo-workflows create #1411

Merged
merged 3 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
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
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