Skip to content

Optimize protected branches/tags matching

What does this MR do and why?

Contributes to #345479

Problem

We request branches and tags object from Gitaly, however we need only their names to match against provided reference.

Solution

Use branch_names and tag_names calls that support caching and are much faster.

Screenshots or screen recordings

http://127.0.0.1:3000/flightjs/Flight/-/settings/repository#js-protected-tags-settings

Before After
Screenshot_2022-01-12_at_11.52.57_AM Screenshot_2022-01-12_at_11.49.03_AM

See gitaly execution times

Approximately I expect 20-40% decrease of response time. Grafana: https://dashboards.gitlab.net/goto/k8XL9c17k?orgId=1.

MR acceptance checklist

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

Edited by Vasilii Iakliushin

Merge request reports

Loading