Async import components on package details page
What does this MR do and why?
Async import components on package details page
package_versions_list is rendered under a tab so
it does not need to be part of the main bundle.
package_files renders GlTable, is below the fold
and as part of !120828 (merged)
will be rendered through its own query.
Screenshots or screen recordings
No change in UI
How to set up and validate locally
Premise:
- Visit package registry detail page via groups & projects package list page.
- Check that files table & versions tab gets loaded
Steps for npm:
-
rails c- Open the rails console -
p = Project.find(1)- Find one of your GDK projects. Project id can be found on the project home page -
FactoryBot.create_list(:npm_package, 25, project: p, name: p.name)- Creates 25 npm packages - Add this line if above fails during the creation of files
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end
Steps for generic packages with lot of files:
- Use the following command
for i in {1..125}; do curl --header "PRIVATE-TOKEN: BSJ3_whVvzU8jSjzGPtQ" --upload-file $PWD/<filename> "http://172.16.123.1:3000/api/v4/projects/<project-id>/packages/generic/<package-name>/<version>/<filename>"; doneto upload 125 package files.- Replace token, project-id, package-name, version, filename
You can also try publishing different types of packages, as mentioned in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks.
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.
Edited by Rahul Chanila