tektoncd / results

Long term storage of execution results.
Apache License 2.0
77 stars 73 forks source link

Fix status 404 for LIST records #563

Closed sayan-biswas closed 1 year ago

sayan-biswas commented 1 year ago

Changes

Removed check from ListRecord method which searches for result name when the record lister returns empty array. This was incorrect because a "-" can be used as result name to list records across multiple results.

Fixes #560

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

Release Notes

ACTION REQUIRED: List records will return 200 - OK status and empty array in response when the filter criteria doesn't match any records
sayan-biswas commented 1 year ago

Is there a test case for -?

@khrm There are tests for "-" result name, but I have added a test specifically for this case where result name is "-" and the filter doesn't match anything.

adambkaplan commented 1 year ago

This PR should have a release note - we are changing the behavior of an API response. Some might consider this a "breaking change" that warrants an ACTION REQUIRED prefix.

sayan-biswas commented 1 year ago

This PR should have a release note - we are changing the behavior of an API response. Some might consider this a "breaking change" that warrants an ACTION REQUIRED prefix.

@adambkaplan Added a release note. This behaviour was particular to ListRecords. Now it will align with ListResults and ListLogs

tekton-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tektoncd/results/blob/main/OWNERS)~~ [adambkaplan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment