Skip to content

Feature Request: Return reports sorted by time #268

@olblak

Description

@olblak

Is your feature request related to a problem?

Currently, the report endpoint /api/pipeline/reports?limit=2 returns the list of the latest report sorted by ID which is a bit confusing when we have a many reports.

The cause of this is the sql query used to retrieve those report, which implies a combination of SELECT queries

The initial motivation, is that a report can be identified by three different ID

  1. An ID to identify the specific report
  2. An ID to identify all the reports generated over time by for specific Updatecli manifest
  3. An ID to identify all the reports generated over time by all the Updatecli manifest sharing the same pipelineid

The currently the api endpoint uses the second ID, to return the last report for a specific Updatecli manifest

Solution you'd like

Now that the endpoint correctly handle pagination, I would prefer listing those report by publish time

Alternatives you've considered

Instead of using the DISTINCT ON to retrieve the latest reports, we could just list the latest published report

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions