Skip to content

Removes unnecessary project fragment for project level packages query

What does this MR do and why?

Removes unnecessary project fragment for project level packages query

The project fragment is required only for group level packages query.

Additionally, fullPath field can also be removed since the UI corresponding to this field was removed in !122843 (merged)

This change does not warrant a Changelog entry.

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 change in UI

How to set up and validate locally

  1. rails c - Open the rails console
  2. p1 = Project.find(1) - Find one of your GDK projects
  3. FactoryBot.create_list(25, :npm_package, project: p1) - Creates 25 npm packages
  4. Visit Project 1 > Deploy > Package Registry, make sure packages list page works (filtering, sorting, pagination, deleting packages, visiting package detail page) as expected.
  5. In the Browser Network tab, make sure that the GraphQL query does not request project related data for each package.
  6. p2 = Project.find(2) - Find another project under the same group
  7. FactoryBot.create_list(25, :npm_package, project: p2) - Creates 25 npm packages
  8. Visit Project 2 > Deploy > Package Registry, make sure packages list page works as expected.
  9. Visit Group > Deploy > Package Registry. make sure packages list page contains packages from both projects & works as expected.
  10. In the Browser Network tab, make sure that the GraphQL query requests project related data for each package.
Edited by Rahul Chanila

Merge request reports