dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

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

Open TheUncleRemus opened this issue 11 months ago • 8 comments

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 avatar Jan 17 '25 16:01 TheUncleRemus

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 https://github.com/tektoncd/pipeline/issues/7410. Feel free to add your support there, this will help to highlight the importance of this feature for the community.

AlanGreene avatar Jan 17 '25 16:01 AlanGreene

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 😊

TheUncleRemus avatar Jan 17 '25 17:01 TheUncleRemus

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.

AlanGreene avatar Jan 17 '25 17:01 AlanGreene

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!!🙏🏻🙏🏻

TheUncleRemus avatar Jan 17 '25 22:01 TheUncleRemus

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 https://github.com/tektoncd/dashboard/issues/2171

why you cannot release an alpha feature of the dashboard?

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

AlanGreene avatar Jan 18 '25 12:01 AlanGreene

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 avatar Jan 19 '25 19:01 TheUncleRemus

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.

TheUncleRemus avatar Jan 21 '25 17:01 TheUncleRemus