Displays latest pipeline details on package list page
What does this MR do and why?
Why
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. Instead show the newest pipeline.
What
- Changes the packages list GraphQL query pipelines fragment to request
first
instead oflast
- Adds feature specs to confirm behaviour
Screenshots or screen recordings
No change in UI
How to set up and validate locally
- Open ci editor for project with files -
<project-url>-/ci/editor
- Copy the following in the editor by replacing
<filename>
with any file from the project
image: curlimages/curl:latest
stages:
- upload
upload:
stage: upload
script:
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file <filename> "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/0.0.1/<filename>"'
- Commit changes a few times, this should trigger pipelines & publish files to the package.
- Visit the package registry list page at project & group level
- Confirm that the
sha
is from the latest pipeline instead of the oldest for themy_package
package. This can be confirmed by checking the package details page
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Fixes frontend for #365828 (closed)
Edited by Rahul Chanila