Skip to content

Return an empty `pipelines` in the package REST API payload

🚨 🚨 NOTE: This MR should only be merged on May 6th, in time for the 3rd breaking changes window (2024-05-06 09:00UTC to 2024-05-08 22:00UTC) 🚨 🚨

What does this MR do and why?

Return an empty pipelines in the package REST API payload

Remove pipelines from the payload to improve performance.

The most recent pipeline is still available in the pipeline payload key. This satisfies most use cases that need the pipelines key.

The pipelines can still be retrieved using the GraphQL API.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

No UI changes 🌈

How to set up and validate locally

  1. Create a package and run some pipeline jobs for it

  2. Prepare an access token with API access to the package's project

  3. Note down the project ID and the package ID

  4. Hit the GET package endpoint:

curl --header "PRIVATE-TOKEN: $YOUR_ACCESS_TOKEN" "http://gdk.test:3001/api/v4/projects/<project_id>/packages/<package_id>"

Expected results:

master branch

  • pipelines contain the package pipelines
  • pipeline contains the most recent package pipeline

MR branch

  • pipelines is an empty array
  • pipeline contains the most recent package pipeline

Note: If the package doesn't have any pipelines, the pipelines attribute will not be included in the response. This is true for both the master branch and the MR branch.

Related to #289956

Edited by Radamanthus Batnag

Merge request reports