Skip to content

Update max helm charts displayed to 1000

Tim Rizzi requested to merge trizzi-master-patch-38754 into master

What does this MR do and why?

Related to: #342883 (closed)

This MR increases the maximum number of Helm charts that can be displayed from 300 to 1000. This will help customers that have many charts and want to be able to access them and view them in the user interface.

Query performance

The below is copied from a comment in #342883 (comment 1112812390)

I was recently reminded of this (cc @trizzi) and realized we have a way to check performance with large package sets. Here is an example using a project that has over 10k helm packages:

LIMIT 300 - 573ms https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/12269/commands/43579

LIMIT 1000 - 659ms https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/12269/commands/43581

Both are not great, but they are not too different. The key aspect to notice is the limiting factor of the query are lines 13-15 in the explain plan. This includes the index scans on:

idx_packages_on_project_id_name_version_unique_when_helm index_packages_package_files_on_package_id_id index_packages_helm_file_metadata_on_pf_id_and_channel

Those are returning and working with the total number of helm packages in the project regardless of what the eventual limit is. So I might argue that increasing the limit to 1000 does not lower the performance of the existing query.

Based on Steve's note, I thought I'd open an MR to raise the limit.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Merge request reports