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

Add a dropdown selection in TaskRun section that bind an enum param #3901

Open
TheUncleRemus opened this issue Jan 17, 2025 · 8 comments
Open
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@TheUncleRemus
Copy link

Feature request

When I need to run my Task with a param which values are in a predefined subset, I would to choise my correct value from a dropdow-list not set it in a input-text

Use case

For example: I have to set my environment "canonical name" from an input var, but I want to show its values from a predefined dropdown instead of input-text because I want to reduce the error prone by the operator.

Alternatives

Of course, I known that in k8s context anything is a YAML resource, but since I have a dashboard, it would be nice to have the choice of this type of parameter from a dropdown.

@TheUncleRemus TheUncleRemus added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 17, 2025
@AlanGreene
Copy link
Member

Thanks for the feature request @TheUncleRemus. Something like this should be possible by leveraging Tekton Pipelines support for param enums (currently in alpha). Would this be suitable for your use case?

Once the feature is promoted to beta we could consider implementing support in the Dashboard.

Promotion to beta is being tracked in tektoncd/pipeline#7410. Feel free to add your support there, this will help to highlight the importance of this feature for the community.

@TheUncleRemus
Copy link
Author

Hi @AlanGreene thx for your response.

The point is: why you can't open this feature on the dashboard basically watching the ConfigMap feature-flags and enable it iff the param enable-param-enum is True.

Obviously I don't know the tkn dash source code, and I can't know the consequences about this approach.

Thx 😊

@AlanGreene
Copy link
Member

Alpha features are experimental and subject to change so typically the Dashboard does not add support for them. There are many reasons for this, including the overhead in maintaining them as they change, potentially frequently across a number of releases. It also becomes very difficult to provide backwards / forwards compatibility without the code becoming too complex.

However, once a feature progresses to beta it is much more stable and less likely to change in breaking ways so at that point the Dashboard would typically consider adding support.

@TheUncleRemus
Copy link
Author

Hi @AlanGreene
thx for your response.

I know what is an alpha version (or feature)😅

but...

consider that, for example, the "array" type of a param (this is not an alpha feature).

Currently I see that the tkn dash provides an input-text as js component to mange this type of param, but it is counterintuitive (I think). Because if I have to write manually my array param what is the useful of the dashboard?

Probably a component like labels manager (that the dashboard already has) is better.

Therefore:

  • you already have the js component
  • you have the the type param manager
  • you have the name of the alpha param (called "enum")
  • and if you have a external config (like a ConfigMap) useful to configure the dashboard, you can add/remove/edit the number and the name of the parameters type (for example):
...
supported_types:
  - name: array
    js_component: "button-appender"
    enabled: true
  - name: string
    js_component: "input-text"
    enabled: true
  - name: enum
    js_component: "drop-down"
    enabled: true
...

and then:
why you cannot release an alpha feature of the dashboard?

Thx you so much!!🙏🏻🙏🏻

@AlanGreene
Copy link
Member

Currently I see that the tkn dash provides an input-text as js component to mange this type of param, but it is counterintuitive (I think). Because if I have to write manually my array param what is the useful of the dashboard?

The Dashboard does not currently support inputting array params via the form-based UI. This is tracked in #2171

why you cannot release an alpha feature of the dashboard?

I have already explained some of the reasons behind this decision.

@TheUncleRemus
Copy link
Author

Hi @AlanGreene ,
thx for your response.

Therefore, the dashboard:

  • doesn't support the enum param (because enum param is an alpha feature)

but

  • it doesn't support the array param (stable)
  • and, (I suppose) it doesn't support the object param (stable)

Do you confirm?

Thx.

@TheUncleRemus
Copy link
Author

Hi @AlanGreene ,
by my side, the issue is closed. Now I have a bit more clear idea about the status of the project.

Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants
@AlanGreene @TheUncleRemus and others