ref_service: Clean up find_local_branches_response
What does this MR do and why?
Currently, we use a flag to navigate between the new fields (local_branches) and the old fields (branches). This is error prone, as it introduces a circular dependency between Rails <> Gitaly. Instead, in this patch lets handle both the scenarios with a simple if condition.
Screenshots or screen recordings
Not UI facing!
How to set up and validate locally
-
Enable the feature flag
Feature.enable(:gitaly_simplify_find_local_branches_response)
-
Go to the branches route for any repo e.g.: http://localhost:3000/gitlab-org/gitlab-shell/-/
-
Ensure branches are displayed.
-
Disable the feature flag
Feature.disable(:gitaly_simplify_find_local_branches_response)
-
Go to the branches route for any repo e.g.: http://localhost:3000/gitlab-org/gitlab-shell/-/
-
Ensure branches are displayed
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.
Related to #4455 (closed)