tektoncd / results

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

LIST method give error 404 - Not found if the filter result is empty #560

Closed sayan-biswas closed 1 year ago

sayan-biswas commented 1 year ago

Expected Behaviour

As per REST specs the search APIs should return status 200 - OK with empty array if there is no item in the result matching the filter.

Actual Behaviour

LIST methods give error 404 - Not found if the search result is empty.

Steps to Reproduce the Problem

  1. http://localhost:8080/apis/results.tekton.dev/v1alpha2/parents/default/results/-/records?filter=data_type+%3D%3D+%22tekton.dev%2Fv1beta1.TaskRun%22+%26%26+data.metadata.labels%5B%22tekton.dev%2FpipelineRun%22%5D+%3D%3D+%22test-app-168976780-w99vc-wcmjd%22

Additional Info

  Status code 404.{}
{"code": 5, "message": "record not found", "details": []}