Skip to content

Read GraphQL PackageLinks to render link on package versions page

What does this MR do and why?

Follow-up to !102366 (merged), this MR adds similar behaviour to versions tab on the package registry details page.

Screenshots or screen recordings

No visual changes

Reference:

Screenshot_2023-01-31_at_1.37.30_am

How to set up and validate locally

  1. rails c - Open the rails console

  2. p = Project.find(1) - Find one of your GDK projects. Project id can be found on the project home page

  3. FactoryBot.create_list(:npm_package, 25, project: p, name: p.name) - Creates 25 npm packages

  4. Add this line if above fails during the creation of files

       def fixture_file_upload(*args, **kwargs)
         Rack::Test::UploadedFile.new(*args, **kwargs)
       end
  5. Visit package registry list page for groups & projects.

  6. Should be able to click the link and view the package detail page.

  7. Visit the other versions tab. Should be able to click on each package and visit the package detail page

  8. Now change package status to error. This updates the status for the last created package

      Packages::Package.last.update!(status: "error")
  9. Confirm that the package is not clickable on the package registry list page.

  10. Confirm that the package is not clickable on the versions tab in package registry 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.

Related to #344257 (closed)

Edited by Rahul Chanila

Merge request reports