tektoncd / dashboard

A dashboard for Tekton!
Apache License 2.0
874 stars 265 forks source link

Add the ability to select a pipeline/task from a dropdown list and optionally make it mandatory #3274

Open cmorinupgrade opened 9 months ago

cmorinupgrade commented 9 months ago

Feature request

Have a dropdown list with all tekton.dev/pipeline/tekton.dev/task available. Clicking on it would filter the list of PipelineRuns/TaskRuns.

Use case

Running Tekton at large scale makes it quite challenging to get good UX on the dashboard given the number of CRDs laying around on the cluster (even with some aggressive pruning, you still get thousands of CRDs in-cluster for 800-1000 repositories, which results in every page load to query the entire etcd database!).

Alternatives

An alternative is to use hyperlinks to get to the pages we want. However, having a mandatory dropdown (forcing developers to select a pipeline/task should be configurable) would help developers select the pipeline/task they need, while also improving overall UI performance since we would not end up querying the entire etcd database everytime.

Additional context

N/A

AlanGreene commented 9 months ago

Thanks for the feature request @cmorinupgrade.

The Dashboard already provides links to the PipelineRuns / TaskRuns pages filtered by the selected Pipeline / Task, you can find these on the Pipelines / Tasks pages. These can be filtered by namespace and/or label too to further scope the results. Does this address your need?

image

image

cmorinupgrade commented 9 months ago

That's a good start, yes. Would have been great to have a dropdown in the PipelineRuns panel where we find developers going more often. I was thinking of something similar to the dropdown we have for namespaces, but now for Pipeline/Task directly in the PipelineRuns and TaskRuns pages.

I was also thinking of having a way to configure the deployment of the actual dashboard so that developers are forced to select a Pipeline from the dropdown, to avoid doing heavy querying against etcd at large scale. That would avoid querying ALL PipelineRuns/TaskRuns for a particular namespace, which in our case, can result in thousands of CRDs even though we aggressively prune them. Granted, Results API is the best option but for now there are gaps that avoid us from going that route.

These relatively small features would enable large scale companies to confine the problem of heavy queries against their etcd databases.

What do you think?

AlanGreene commented 9 months ago

Providing the user with a better filtering experience is definitely something we want to do and we have explored a number of options in the past, for example: https://github.com/tektoncd/dashboard/issues/1428#issuecomment-1046715738

However, I'm not sure about forcing the user to select a pipeline before displaying anything. I don't think this is something we're likely to add in the short term at least, but leave it with me for now and I'll see if we can organise some user tests.

I'd prefer to see the effort put into addressing gaps in the Results API since that's the strategic direction we'd like to go and it would provide much greater value to more users.