Refactor branch switcher in pipeline editor
What does this MR do?
For #330869 (closed) and #331105 (closed)
This refactor does two things:
- Addresses the follow up issue where we use
fetchMore
to implement the pagination foravailableBranchesQuery
- Separates the query into two so that the query for fetching all branches is different from the query for fetching branches using a
searchPattern
. This is an iterative step to address the bug mentioned in #331105 (comment 581598628) where the proposed solution is to use anetwork-only
fetch policy for searching but use the cache when fetching all branches.
The changes are implemented in two separate commits if the reviewer finds it easier to review by commit
The only real change is the updated fetch policy for searching; there are no new features introduced in this MR, so the existing tests should still pass.
Screenshots
No visual changes to the branch switcher.
Does this MR meet the acceptance criteria?
Conformity
- [-] I have included a changelog entry, or it's not needed. (Does this MR need a changelog?)
- [-] I have added/updated documentation, or it's not needed. (Is documentation required?)
- [-] I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?)
- [-] I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?)
-
I have self-reviewed this MR per code review guidelines. - [-] This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines)
-
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) - [-] I have tested this MR in all supported browsers, or it's not needed.
- [-] I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Edited by Mireya Andres