tektoncd / dashboard

A dashboard for Tekton!
Apache License 2.0
863 stars 258 forks source link

Allow filtering with regex/match pattern #3478

Closed fpt-dylan-datnt305 closed 6 days ago

fpt-dylan-datnt305 commented 6 days ago

Feature request

What I want to achieve is that I can search the pipeline run using regex

Use case

Currently, I'm assigning several labels to our pipeline runs. We have quite many pipeline runs for our apps so it would be really difficult to find out which pipeline run. As of now, whenever I want to search for a pipeline run, I have to use the full value of the label to find exactly. What I want to achieve is that I can search the pipeline run using regex (e.g. name:ci-pull-request-*) would return a list of pipeline run that have label is "name" and have value that starts with "ci-pull-request-". Currently when I try to use asterisk to find all, it gets Bad Request like image below.

image
AlanGreene commented 6 days ago

Hi @fpt-dylan-datnt305, thanks for the feature request. The Dashboard relies on Kubernetes' APIs to retrieve the resources, and Kubernetes does not support this type of advanced filtering.

Doing the filtering in the Dashboard client doesn't really make sense as we would still need to load the full set of resources before processing.

The only options currently are:

We do have another issue to improve the UI handling of labels for filtering / navigation, see https://github.com/tektoncd/dashboard/issues/1428 for details, including one option we were considering for an improved filtering experience.

Closing this as a duplicate of that issue, feel free to comment there with any additional requirements or suggestions not already covered.