Packages list page: display the most recent pipeline

🔥 Problem

In the page that lists the available packages, we show a pipeline if the package was built by one.

The problem is that, the package (name+version) can accept duplicates and so multiple pipelines could have built it. The index page is showing the oldest pipeline. That's a bit unexpected as the newest pipeline

Example: https://staging.gitlab.com/10io/pkgs_build_by_ci/-/packages

🚒 Solution

  • Update the frontend GraphQL query so that pipelines(first: 1) is queried and not pipelines(last: 1).
  • (Bonus) It seems that the field pipeline of the Rest API has the same behavior.
    • Updating it could be a breaking change, so I'll leave it as a Bonus point.

Implementation guide

Edited by Dzmitry (Dima) Meshcharakou