Skip to content

Adds bulk delete UI for other versions of package

What does this MR do and why?

Adds bulk deletion UI for other versions of package.

Adds tracking for implementation.

Adds package list row highlighting when selected.

Note:

Upon successful deletion there is currently a typebug which returns package versions marked for deletion #374295 (comment 1259248444). However this is not a blocker since Fix the package versions scope (!110657 - merged) should fix the issue separately.

Screenshots or screen recordings

Action Screenshot
without permission Screenshot_2023-02-01_at_5.18.13_pm
with permission Screenshot_2023-02-01_at_5.18.34_pm
select all Screenshot_2023-02-01_at_5.18.53_pm
modal to confirm deletion Screenshot_2023-02-01_at_5.19.06_pm
failure to delete Screenshot_2023-02-01_at_5.19.39_pm
successful deletion Screenshot_2023-02-01_at_5.20.08_pm

How to set up and validate locally

  1. Publish more than 20 packages with same name & different versions, as mentioned in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-create-a-list-of-packages-artificially
    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
  2. Visit package registry detail page via groups & projects package list page.
  3. Switch to the Other versions tab.
  4. Should be able delete single & multiple packages

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 #374295 (closed)

Edited by Rahul Chanila

Merge request reports

Loading