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

Feedback/beta release for TEP-0144: Param Enum #7410

Open
QuanZhang-William opened this issue Nov 23, 2023 · 9 comments
Open

Feedback/beta release for TEP-0144: Param Enum #7410

QuanZhang-William opened this issue Nov 23, 2023 · 9 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@QuanZhang-William
Copy link
Member

Feature looking for Promotion

Promote Param Enum feature to beta. Param.Enum allows resource authors to pre define a set of allowed values for a param and provides a built-in mechanism to perform param input value. This feature is guarded by dedicated feature flag enable-param-enum (setting it to true to experiment the feature).

Current Feature Version

alpha

Raise Feature Version

beta

Pipeline Release

v0.54

Issues Reported by the Users

Implementation PRs

@martinmlouis
Copy link

Could you please add enum feature with array values support? It currently supports string only. This is must if we switch from jenkins UI to tekton UI for deployment. All is good for Continuous Delivery but for Continuous Deployment we need this, please help

@QuanZhang-William
Copy link
Member Author

Hi @martinmlouis 👋 , thanks for the feedback.

When designing the TEP, we left the enum support for array param to future work since the use cases was not clear to us (e.g. how do we validate an array against an allowlist, do we need the enum to be an array of arr? ).

If you have a clear use case of enum for array param, we can definitely extend the TEP to support it!

Is tektoncd/dashboard#3193 your usecase? I was going through the discussion and it is still not clear how can an enum for array param type can help. But I'm happy to chat more about it.

@martinmlouis
Copy link

martinmlouis commented Nov 30, 2023

Yes, my use case for this feature is checkboxes for pipelines selection for CD. I just need to choose the pipelines from a list of pipelines either by - single select AND - multi select or - checkboxes. Concept copied from use of jenkins UI. How you implement it is upto the authors, Thanks

@AlanGreene
Copy link
Member

If I'm understanding correctly, in terms of validation, for the use case debscribed the values in the array would each be validated against the allowed values specified by the enum. It would not require arrays of arrays.

@martinmlouis
Copy link

martinmlouis commented Dec 3, 2023

Can you see if this can be one of many priorities for next pipeline/dashboard release? I am a user of tekton CI/CD authoring task/pipeline, so I hope to answer your questions from a user perspective.

@JeromeJu JeromeJu added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Dec 6, 2023
@QuanZhang-William
Copy link
Member Author

cc @tektoncd/core-collaborators @tektoncd/core-maintainers

@vdemeester
Copy link
Member

So one remark, missing piece is support of enum in objects, something like the following.

    params:
    - name: go
      description: >-
        Golang options, such as flags, …
      type: object
      properties:
        version:
          type: string
          enum: ["1.19", "1.20", "1.21", "1.22"]
        GOFLAGS: {type: string}
        GOOS: {type: string}
        GOARCH: {type: string}
        CGO_ENABLED: {type: string}
      default:
        version: "1.21"
        GOFLAGS: "-v"
        GOOS: ""
        GOARCH: ""
        CGO_ENABLED: "0"

I'll create an issue about it.

@vdemeester
Copy link
Member

See #7568

@martinmlouis
Copy link

martinmlouis commented Mar 14, 2024

Hello tekton CI/CD,
Is it possible to speed up this feature request so that authors like me will get

  • array params as dropdown in Dashboard rather than string
  • array params can be a task/pipeline
  • gives ability to manual deploy a pipeline with drop downs list of array params rather than typing/copying text to run the pipeline or task
  • gives ability to have array params for task/pipeline as selectable so that we can have parent pipeline =>many child selectable pipelines, so that we select what we need to deploy, these values selected from UI will have to be passed as params to any taskRun/pieplineRun. This will have a one-to-one mapping between the pipeline => to pipelineRun and task => to taskRun
    This helps a lots in using tekton as not only for the current CI/CD but also manual deployments Automation so that this part of operation can be given to Build + Release operation staff as well
    The goal is to replace jenkins UI with tekton UI
    Can someone help? I do not have golang to show a PR so that the authors of tekton CI/CD can see it in action
    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants