Adds support to filter packages by version
What does this MR do and why?
Adds support to filter packages by version
Introduces a new search filter for package versions in the package registry. This new filter is available in the search bar on the packages list page and can be used to filter packages by their version.
The support from GraphQL API was added in Ability to filter API query for packages by ver... (#349065 - closed)
Screenshots or screen recordings
Before | After |
---|---|
No support for filter by version |
How to set up and validate locally
Publish few 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
-
rails c
- Open the rails console -
p1 = Project.find(1)
- Find one of your GDK projects. Project id can be found on the project home page -
FactoryBot.create_list(:npm_package, 10, project: p1, name: p1.name)
- Creates 10 npm packages -
p2 = Project.find(2)
- Find another project within the same group. -
FactoryBot.create_list(:npm_package, 10, project: p2, name: p2.name)
- Creates 10 npm packages - Add this line if above fails during the creation
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end
- Visit Group > Package Registry
- Ensure that filtering by version works as expected. Note that partial search is not supported and the exact version needs to be entered for search.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #370145 (closed)
Edited by Rahul Chanila