Load refs for the "Run Pipeline" form on demand, limit to 100 results per ref type
What does this MR do?
Improve performance of the "Run pipeline" page for projects with many branches or tags (refs
).
Fix for: #322170 (closed) and #321790 (closed)

Background
In the original implementation of this page, we loaded all the tags and branches in the HTML payload.
Even though this was not ideal, this was cleverly done by adding the data to an inline javascript which loaded fast enough, although I has the potential to create a large amount of DOM elements in projects with a large amount of refs
.
During the migration to Vue this problem was exacerbated as refs
data was made reactive by Vue, and the number of DOM elements became higher, as the Vue dropdowns generate more DOM elements than the plain Javascript version.
Solution
Use the same JSON endpoint as the Repository page (e.g. in https://gitlab.com/gitlab-org/gitlab/-/tree/master) to load a limited number of refs
and allow the user to filter by searching with a search box, as in the repository pages.
Screenshots (strongly suggested)
Using an example with 200 tags and 200 branches.
Before:
All refs
are loaded to the page:
After
Only 100 tags and 100 branches are loaded, and they are loaded only after the user opens the dropdown, additionally the search works by requesting the data to the backend instead of filtering in the frontend:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #321790 (closed)
Merge request reports
Activity
changed milestone to %13.10
- Resolved by Miguel Rincon
1 Warning This merge request is quite big (679 lines changed), please consider splitting it into multiple merge requests. 1 Message This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. Documentation review
The following files require a review from a technical writer:
doc/ci/pipelines/index.md
The review does not need to block merging this merge request. See the:
- Technical Writers assignments for the appropriate technical writer for this review.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Category Reviewer Maintainer ~changelog No reviewer available No maintainer available frontend Scott Stern ( @sstern
) (UTC-8, 9 hours behind@mrincon
)Natalia Tepluhina ( @ntepluhina
) (UTC+1, same timezone as@mrincon
)If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by 🤖 GitLab Bot 🤖Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 5cbdfdbd and e5826739
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.18 MB 3.18 MB - 0.0 % mainChunk 1.95 MB 1.95 MB - 0.0 %
Please look at the full report for more details
Read more about how this report works.
Generated by
DangerEdited by 🤖 GitLab Bot 🤖mentioned in issue #322170 (closed)
- Resolved by Sean Carroll
mentioned in merge request !54435 (closed)
marked the checklist item Changelog entry as completed
marked the checklist item Documentation (if required) as completed
marked the checklist item Code review guidelines as completed
marked the checklist item Merge request performance guidelines as completed
marked the checklist item Style guides as completed
assigned to @mrincon
added documentation label
- Resolved by Marcel Amirault
- Resolved by Miguel Rincon
@marcel.amirault Please help me take a look at a small update to the docs here
requested review from @marcel.amirault
- Resolved by Natalia Tepluhina
@sstern Please help me with frontend review, if you happen to approve please pass to @jivanvl for review.
cc @pburdette Your input is also super valuable!
requested review from @sstern
requested review from @dskim_gitlab
removed workflowin review label
mentioned in issue #321790 (closed)
- Resolved by Miguel Rincon
requested review from @v_mishra
- Resolved by Payton Burdette
- Resolved by Payton Burdette
- Resolved by Payton Burdette
- Resolved by Miguel Rincon
- Resolved by Payton Burdette
- Resolved by Miguel Rincon
requested review from @igor.drozdov and removed review request for @dskim_gitlab
@mrincon thanks for your work on this MR. This endpoint is not currently flagged as needing changes for performance, ie: it is not on this board.
If you are seeing otherwise please ping me or open an issue. I don't see that it needs a BE review at this time. (@igor.drozdov feel free to disagree
)removed review request for @igor.drozdov
mentioned in merge request !49575 (merged)
- Resolved by Natalia Tepluhina
- Resolved by Natalia Tepluhina
requested review from @ntepluhina
removed review request for @v_mishra
mentioned in issue #323444
added Technical Writing docsimprovement twdoing labels
- Resolved by Natalia Tepluhina
- Resolved by Natalia Tepluhina
- Resolved by Natalia Tepluhina
Thanks for working on this @mrincon! I have a minor non-blocking comment, back to you
mentioned in commit c05acf6f
mentioned in issue #322386 (closed)
added workflowstaging label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
mentioned in issue #229632 (closed)
added releasedcandidate label
mentioned in issue #343496
mentioned in issue #327085 (closed)
mentioned in issue #358968
mentioned in issue #381233 (closed)