Skip to content

Display package errors on Other versions tab of package registry

What does this MR do and why?

We display packages that are either in default or error status, we do not display any details about the error.

This MR makes it similar to the packages list page where we show the error.

Also truncates package version similar to Truncates package version in packages list page (!109780 - merged)

Screenshots or screen recordings

Screenshot_2023-02-03_at_4.55.57_pm

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 version is not visible and error message and warning is displayed 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.

Closes #389965 (closed)

Edited by Rahul Chanila

Merge request reports