argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.02k stars 3.2k forks source link

More concise display names for looped steps #8937

Open james-simpson opened 2 years ago

james-simpson commented 2 years ago

Summary

I'd like to be able to customise the step name for a looped/fan out step generated by withItems/withParam. At the moment, the step name doesn't seem to be templatable - I get an error like 'must consist of lower case alphanumeric characters' when trying to submit the workflow in the UI.

E.g. could we do something like this, with name: "{{item}}":

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: loops-
spec:
  entrypoint: loop-example
  templates:
  - name: loop-example
    steps:
    - - name: "{{item}}"
        template: whalesay
        arguments:
          parameters:
          - name: message
            value: "{{item}}"
        withItems:
        - item-1
        - item-2
...

Maybe the best way to do it could be a separate templatable displayName field than overrides name in the UI if provided?

Use Cases

We're using Argo Workflows to run end to end tests in parallel and it would be nice to customise the name of each fanned out step in the UI.

What we currently see:

parallel-steps-1

or

parallel-steps-2

With custom/templated names we could see at a glance which scenario failed, and could easily find and click into a particular scenario we care about.

CRASH-Tech commented 2 years ago

Same issue

andaag commented 2 years ago

I got a similar issue - which I think is close enough it probably doesn't warrant its own issue.

I got very long parameters (a yaml blob) for some dynamic fan out jobs. For those the names become extremely long. Where I only really need 1 argument in the name/visible in the ui, and the rest visible in the "inputs/outputs" tab.

Considering the max length of these arguments is around 256kb, I think it's a bit much to stick all of them in the generated name 😀

//edit - and I just realized in the pod type it just uses the short names, but in the step type it includes all parameters.

prakhar47b commented 1 year ago

Same issue

ehellmann-nydig commented 1 year ago

same

simonartige commented 1 year ago

Same issue

sfc-gh-rpeng commented 1 year ago

Same issue

agilgur5 commented 12 months ago

Potentially related: #2871

JTarball commented 11 months ago

same

swzy commented 9 months ago

Same underlying issue. Generated displayNames result in very long workflow.failures elements which in turn are causing unavoidable env variable size limitations.

bhill74 commented 9 months ago

At the risk of sounding repetitive ... same issue for me.

stefanondisponibile commented 3 months ago

Same issue here. Couldn't we use some annotation to use just on the UI? I believe Kubeflow uses pipelines.kubeflow.org/task_display_name in the same way. I don't think we need a custom template name, we just need to customize how a pod name is displayed in the argo-server workflow ui. What do you think?

KaiWaldrant commented 1 month ago

Agree, we're looking for the same thing.