tektoncd / results

Long term storage of execution results.
Apache License 2.0
78 stars 74 forks source link

Support filtering of `Results` using name of the PipelineRun/TaskRun #610

Closed avinal closed 9 months ago

avinal commented 1 year ago

Feature request

Currently there is no filtering option that can search for result created for a particular PipelineRun/TaskRun. The current flow is to search for records and then find the result name from them.

There should be a filtering option that can directly be applied to the Results using PipelineRun/TaskRun name.

Use case

This feature will be useful in:

Approach

We can add a new annotation to the Result.Summary that contains the name of the PipelineRun/TaskRun creating that results. The current path is records.data.metadata.name. After adding annotation the filter for results can be used as

filter='summary.annotations["RunName"]=="name"'

There can be other approaches as well.

avinal commented 1 year ago

cc @enarha

cmorinupgrade commented 9 months ago

Any progress on that front? That's something we would consider contributing at some point if there is no active work done on this. We need this feature to integrate the dashboard with the results api. I like the approach you suggested @avinal . It sounds like a quick win that could be put in place relatively fast.

adambkaplan commented 9 months ago

~Don't we support this with CEL filtering?~ I see the issue - the ask is for filtering on Result, not Record objects.

The main issue is that Result does not have a 1:1 relationship with TaskRun/PipelineRun. IIRC, for pipelines started by a Tekton EventListener, you can have more than one PipelineRun for a single Result.

avinal commented 9 months ago

As discussed in the WG group meeting and based on input from @adambkaplan and other members, I am going to close this issue as wontfix.