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

Argo CLI: Lint: Enums can't have default in WorkflowTemplate #11471

Closed
2 of 3 tasks
frmrm opened this issue Jul 28, 2023 · 3 comments · Fixed by #11736
Closed
2 of 3 tasks

Argo CLI: Lint: Enums can't have default in WorkflowTemplate #11471

frmrm opened this issue Jul 28, 2023 · 3 comments · Fixed by #11736
Assignees
Labels

Comments

@frmrm
Copy link

frmrm commented Jul 28, 2023

Pre-requisites

  • I have double-checked my configuration
  • I can confirm the issues exists when I tested with :latest
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what you expected to happen?

This appears to be a variation of #6044.

When creating a WorkflowTemplate I would expect that I can define an enum parameter that also provides a default matching one of the enum values if no value was provided when the WorkflowTemplate becomes an actual Workflow. This does not appear to be the case. When I attempt to argo lint this I get the following error:

in "value-bug-example" (WorkflowTemplate): rpc error: code = InvalidArgument desc = spec.arguments.test-parameter.value is required

Version

v3.4.9

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.

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: value-bug-example

spec:
  arguments:
    parameters:
      - name: test-parameter
        enum: ['hello', 'goodbye']
        default: 'hello'

  templates:
    - name: test
      script:
        image: ubuntu
        source: echo {{workflow.parameters.test-parameter}}

Logs from the workflow controller

N/A

Logs from in your workflow's wait container

N/A
@caelan-io
Copy link
Member

Thanks for reporting this. We're looking for more contributors to support argo lint. Would you be interested in contributing this fix?

@frmrm
Copy link
Author

frmrm commented Sep 2, 2023

Thanks for reporting this. We're looking for more contributors to support argo lint. Would you be interested in contributing this fix?

Yeah why not. I haven't had much time for OSS since my youngest was born and I've benefitted from Argo a lot. I'll probably do it from my personal account, @farmdawgnation. (I like to keep some separation between the "for work" and "not for work" stuff.)

@caelan-io
Copy link
Member

Congrats on your growing family! We completely understand that. Other contributors and I are happy to support you in investigating this and reviewing your PR. Please feel free to tag me here or on Slack if any questions as you're getting started.

Note that we are working on improving the local dev setup but it can be a little rough around the edges for newcomers. If you're not on macOS we recommend using Nix to get started and develop locally.

farmdawgnation added a commit to farmdawgnation/argo-workflows that referenced this issue Sep 3, 2023
farmdawgnation added a commit to farmdawgnation/argo-workflows that referenced this issue Oct 8, 2023
terrytangyuan pushed a commit that referenced this issue Oct 11, 2023
terrytangyuan pushed a commit that referenced this issue Oct 19, 2023
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this issue May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants