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

WorkflowTemplate should accept arguments.parameters without providing a "value" #7128

Closed
sappier opened this issue Nov 2, 2021 · 1 comment
Assignees
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@sappier
Copy link

sappier commented Nov 2, 2021

Summary

What happened/what you expected to happen?

WorkflowTemplate with arguments.paramters without a value should be created:

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: parameterflow
spec:
  entrypoint: whalesay
  arguments:
    parameters:
      - name: alpha
  templates:
    - name: whalesay
      container:
        image: docker/whalesay
        command: ["cowsay"]
        args: ["{{workflow.parameters.alpha}}"]

But instead it returns an error:

$ argo template create param-flow.yaml
2021/11/02 13:59:45 Failed to create workflow template: spec.arguments.alpha.value is required

Earlier it was possible to create a WorkflowTemplate with a parameter without providing a default value.
Only Workflows submitted from such template, would fail when the parameter wouldn't be provided and require to pass a parameter explicitly.

Even more, I still can successfully create the WorkflowTemplate directly with kubectl and then submit a Workflow from it, works as expected:

$ kubectl apply -f param-flow.yaml
workflowtemplate.argoproj.io/parameterflow created
$ argo submit --from wftmpl/parameterflow -p alpha=100
Name:                parameterflow-xbvkx
Namespace:           default
ServiceAccount:      default
Status:              Pending
Created:             Tue Nov 02 14:47:32 +0100 (now)
Progress:            
Parameters:          
  alpha:             100

What version is it broken in?
I'm observing it on 3.0.3, 3.2.0 and the latest 3.2.3

What version was it working in?
1 year ago this functionality definitely worked.
May be 2.x?

Diagnostics

Either a workflow that reproduces the bug, or paste you whole workflow YAML, including status, something like:

See an example yaml above

What Kubernetes provider are you using?

Minikube on Linux and "Docker Desktop" on MacOS

What executor are you running? Docker/K8SAPI/Kubelet/PNS/Emissary

# Logs from the workflow controller:
kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

# The workflow's pods that are problematic:
kubectl get pod -o yaml -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

# Logs from in your workflow's wait container, something like:
kubectl logs -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@sappier sappier added type/bug type/regression Regression from previous behavior (a specific type of bug) triage labels Nov 2, 2021
@sarabala1979 sarabala1979 added this to To do in Run The Business (incl. bugs) via automation Nov 2, 2021
@sarabala1979 sarabala1979 self-assigned this Nov 2, 2021
@sarabala1979 sarabala1979 moved this from To do to In progress in Run The Business (incl. bugs) Nov 2, 2021
@tczhao
Copy link
Member

tczhao commented Nov 4, 2021

Duplicate of #6044

@tczhao tczhao marked this as a duplicate of #6044 Nov 4, 2021
@sarabala1979 sarabala1979 assigned tczhao and unassigned sarabala1979 Nov 4, 2021
@alexec alexec closed this as completed Nov 19, 2021
@sarabala1979 sarabala1979 moved this from In progress to Done in Run The Business (incl. bugs) Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Development

Successfully merging a pull request may close this issue.

4 participants