Skip to content

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

  1. Enable the feature flag

    Feature.enable(:gitaly_simplify_find_local_branches_response)
  2. Go to the branches route for any repo e.g.: http://localhost:3000/gitlab-org/gitlab-shell/-/

  3. Ensure branches are displayed.

  4. Disable the feature flag

    Feature.disable(:gitaly_simplify_find_local_branches_response)
  5. Go to the branches route for any repo e.g.: http://localhost:3000/gitlab-org/gitlab-shell/-/

  6. 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.

Related to #4455 (closed)

Edited by Karthik Nayak

Merge request reports