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

Workflow parameter not passable anymore after changing default entrypoint #7294

Closed
nielstenboom opened this issue Nov 29, 2021 · 6 comments
Closed
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@nielstenboom
Copy link
Contributor

nielstenboom commented Nov 29, 2021

Summary

Previously you could submit a workflowtemplate in the UI by passing a parameter manually, it would not matter which entrypoint of the workflow you chose. Now in version v3.2.4, you can only submit a parameter to the workflow if you choose the default entrypoint.

Default entrypoint -> able to pass the workflow parameter
image

Picked different entrpoint -> not able to pass the workflow parameter any longer
image

What happened/what you expected to happen?
I expect to always be able to pass a parameter via the UI, even when selecting another entrypoint.

What version is it broken in?
v3.2.4

What version was it working in?
v3.1.8

Diagnostics

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

Relevant part of workflow:

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: cbct-evaluation
  namespace: argo
spec:
  entrypoint: cbct-evaluation-pipeline
  # branch parameter so this workflow can be dynamically called for different PRs
  arguments:
    parameters:
    - name: branch
  
  templates:
  - name: cbct-evaluation-pipeline
    retryStrategy:
      limit: "0"
    steps:
    - - name: git-pull-data-and-src
        template: git-pull-data-and-src # also outputs commit-sha
    - - name: install-env
        template: install-env
      - name: generate-path-list
        template: generate-path-list
    - - name: run-evaluation
        template: run-evaluation
        arguments:
          parameters:
          - name: path
            value: "{{item}}"
        withParam: "{{steps.generate-path-list.outputs.result}}" # json list containing the paths
    - - name: aggregate-results
        template: aggregate-results
        arguments:
          parameters:
            - name: commit-sha
              value: "{{steps.git-pull-data-and-src.outputs.parameters.result}}"
    - - name: copy-results-to-s3
        template: copy-results-to-s3
        arguments:
          parameters:
            - name: commit-sha
              value: "{{steps.git-pull-data-and-src.outputs.parameters.result}}"
    - - name: visual-evaluation
        template: visual-evaluation
      - name: write-result-to-github
        template: write-result-to-github

....

What Kubernetes provider are you using?
EKS

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


Message from the maintainers:

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

@nielstenboom nielstenboom added type/bug type/regression Regression from previous behavior (a specific type of bug) triage labels Nov 29, 2021
@sarabala1979
Copy link
Member

I think this PR is causing this validation #5319
@alexec Can we pre-select the entrypoint from workflowTemplate?

@sarabala1979
Copy link
Member

@kennytrytek Can you confirm this issue introduced from your PR?

@kennytrytek
Copy link
Contributor

@sarabala1979 correct, it is behaving as expected. The cbct-evaluation-pipeline template does not have any inputs, so it doesn't make sense to pass inputs to it.

@nielstenboom
Copy link
Contributor Author

@sarabala1979 correct, it is behaving as expected. The cbct-evaluation-pipeline template does not have any inputs, so it doesn't make sense to pass inputs to it.

But the parameter I want to pass is a workflow parameter which I reference in multiple steps as {{workflow.parameters.branch}} , in an earlier version I was able to do so regardless of which template entrypoint was selected, but now that's not possible any longer. That does not seem like the intended behavior to me, I believe it should always be possible to pass a parameter that is workflow scoped.

@kennytrytek
Copy link
Contributor

kennytrytek commented Nov 30, 2021

Yeah, that makes sense. I think a good solution would be to always show and allow workflow parameters as well as entrypoint-specific parameters, and merge the two parameter maps on submission.

EDIT: On second thought, merging the two parameter maps would lose information about what is a workflow parameter and what is a template input parameter; there could even be name collisions between the two. It seems that they would need to remain separate, but as far as I know, the server does not support two sets of parameters.

@sarabala1979 sarabala1979 added type/feature Feature request and removed triage labels Nov 30, 2021
@sarabala1979
Copy link
Member

@nielstenboom I will close this issue. you can open new enhancement for UI change

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)
Projects
None yet
Development

No branches or pull requests

3 participants