argo-workflows icon indicating copy to clipboard operation
argo-workflows copied to clipboard

Show values set in templateDefaults in UI

Open nielstenboom opened this issue 2 years ago • 4 comments

Summary

It would be nice if values that are set in the templateDefaults are also shown in the UI. Take the following example:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: hello-world-
spec:
  entrypoint: whalesay
  templateDefaults: 
    container:
      env: 
      - name: TEST_VARIABLE
        value: "hi"
  templates:
  - name: whalesay
    container:
      image: docker/whalesay:latest
      command: [bash]
      args: ["-c", "echo $TEST_VARIABLE"]

The container is given the TEST_VARIABLE by default, but the UI is showing there are no ENV variables for this container:

image

It would be nice if the variable set in the defaults also shows up there.

Use Cases

We use the templateDefaults regularly in our workflows to set env variables. It would be more clear if these env variables also show up in the UI.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

nielstenboom avatar Dec 10 '21 09:12 nielstenboom

would love to work on this issue 🚀

CIPHERTron avatar Feb 12 '22 16:02 CIPHERTron

I think the UI is looking at workflow.spec be should look at workflow.status.storeWorkflowSpec. We'd need to hunt down where that is.

alexec avatar Feb 15 '22 19:02 alexec

@CIPHERTron are you working this issue?

sarabala1979 avatar Aug 12 '22 23:08 sarabala1979

@alexec @sarabala1979 I have started looking into this and here are my observations:

  • If it's just the UI issue, we can include templateDefaults coming in workflow.spec along with the envs present in template.

  • The other way is to leverage workflow.status.storedWorkflowTemplateSpec but it is coming undefined always and I did not find a place where it is being set.

I am thinking of going ahead with first approach. Can you share your thoughts please?

anilkumar-pcs avatar Sep 29 '22 14:09 anilkumar-pcs