Skip to content

Removes conditional logic in gl-keyset-pagination within registry

Rahul Chanila requested to merge remove-keyset-pagination-check into master

What does this MR do and why?

Removes conditional logic in gl-keyset-pagination within registry

Since gitlab-ui!3520 (merged) is merged, this check is handled within the component itself

Screenshots or screen recordings

No change in UI

How to set up and validate locally

The below instructions should generate a list of entries less than default page size so pagination won't be shown. To confirm pagination does appear, feel free to add more packages/images.

Package Registry

List

  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, 10, project: p, name: p.name) - Creates 10 npm packages
  4. Add this line if above fails during the creation
     def fixture_file_upload(*args, **kwargs)
       Rack::Test::UploadedFile.new(*args, **kwargs)
     end
  5. Visit groups & projects package list page.

Versions

  1. After following previous instructions, visit package registry detail page via groups & projects package list page
  2. Switch to the Other versions tab.

Package files

  1. Use the following command for i in {1..10}; do curl --header "PRIVATE-TOKEN: <TOKEN>" --upload-file $PWD/<filename> "http://172.16.123.1:3000/api/v4/projects/<project-id>/packages/generic/<package-name>/<version>/<filename>$i"; done to upload 10 package files.
    1. Replace token, project-id, package-name, version, filename
  2. Visit package registry detail page via groups & projects package list page.

Container Registry

Images list

  1. Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md
  2. Follow steps in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-add-images-with-tags-quickly-to-the-registry
  3. To see pagination, run the following in the terminal
    $ ./publish.sh <project-path> 2 10 127.0.0.1:5000 # creates 10 images with 2 tags each
  4. Visit the container registry list page for the project

Tags list

  1. After following previous instructions, visit the container registry list page for the project
  2. Clicking one of the images should take you the tags list(details) page

Dependency proxy

  1. Enable dependency proxy on GDK.

  2. Visit Gitlab-org Group > Packages and registries > Dependency proxy

  3. Assuming 172.16.123.1:3000/gitlab-org/dependency_proxy/containers is the Dependency proxy image prefix on the page, run the following on the terminal:

    versions=("latest" "1.33.1" "1.33" "1.32.1"); proxy_url="172.16.123.1:3000/gitlab-org/dependency_proxy/containers"; for version in "${versions[@]}"; do docker pull "${proxy_url}/busybox:${version}"; done

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rahul Chanila

Merge request reports