Open sahil-sharma opened 1 week ago
Also tried the official example defined in Intermediate steps (see here) but it has a
boolean
value. I expect astring
as an input.
It's actually an enum
of options. The first example on the page shows "YES" or "NO" and the second one shows a list of "db1", "db2", or "db3" that you have to choose from.
I believe you can do something similar to accept an arbitrary string, particularly as the enum
option is actually UI only and can be bypassed in the API.
Try:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: user-input-param-example-
namespace: custom-namespace
spec:
serviceAccountName: argo-workflows
entrypoint: main
templates:
- name: main
steps:
- - name: suspend-step
template: suspend-template
- - name: echo-user-input-step
template: echo-user-input-template
arguments:
parameters:
- name: user-input
value: "{{steps.suspend-step.outputs.parameters.user-input}}"
- name: suspend-template
inputs:
parameters:
- name: user-input
description: Type something in
outputs:
parameters:
- name: user-input
valueFrom:
supplied: {}
- name: echo-user-input-template
inputs:
parameters:
- name: user-input
container:
image: alpine:latest
command: ["/bin/sh", "-c"]
args: ["echo 'User input received: {{inputs.parameters.user-input}}'"]
Upon looking for similar issues I found this #7563 but this is picking up the
null
value (""
) and simply succeeds without prompting for user input in the UI.
Since that was an old bug that was fixed, I believe using the correct valueFrom.supplied: {}
syntax should work now:
valueFrom:
supplied: {}
Pre-requisites
:latest
image tag (i.e.quay.io/argoproj/workflow-controller:latest
) and can confirm the issue still exists on:latest
. If not, I have explained why, in detail, in my description below.What happened/what did you expect to happen?
We have a Job (defined as a Workflow) that expects user input when a user triggers or re-submit the Workflow (via UI). In an ideal situation upon submission Workflow it should suspend for a user input and pass this input to a further step after receiving it. And if not provided then exit the Workflow.
Upon looking for similar issues I found this #7563 but this is picking up the
null
value (""
) and simply succeeds without prompting for user input in the UI. Duringsuspend-step
when click on resume button (hoping it to prompt for user input) I get:Are you sure you want to resume node user-input-param-example-65qsm-1460707896 ?
There are no errors in Workflow-Server Pod logs.
Also tried the official example defined in Intermediate steps (see here) but it has a
boolean
value. I expect astring
as an input.Tried a bunch of other methods but none worked.
Version
v3.5.7
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container