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

feature: add status grouping to argo-workflows output #1604

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion metaflow/plugins/argo/argo_workflows_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def status(obj, run_id):
name = run_id[5:]
status = ArgoWorkflows.get_workflow_status(obj.flow.name, name)
if status is not None:
obj.echo_always(status)
obj.echo_always(remap_status(status))


@argo_workflows.command(help="Terminate flow execution on Argo Workflows.")
Expand Down Expand Up @@ -954,3 +954,11 @@ def sanitize_for_argo(text):
.replace("+", "")
.lower()
)


def remap_status(status):
"""
Group similar Argo Workflow statuses together in order to have similar output to step functions statuses.
"""
STATUS_MAP = {"Error": "Failed"}
return STATUS_MAP.get(status, status)