Commit 9ea89b24 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '327319-feature-flag-remove-cached_sidebar_merge_requests_count' into 'master'

Remove cached_sidebar_merge_requests_count feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!62935
parents 836adc69 e57650e4
......@@ -88,14 +88,6 @@ module GroupsHelper
.count
end
def group_open_merge_requests_count(group)
if Feature.enabled?(:cached_sidebar_merge_requests_count, group, default_enabled: :yaml)
cached_issuables_count(@group, type: :merge_requests)
else
number_with_delimiter(group_merge_requests_count(state: 'opened'))
end
end
def group_merge_requests_count(state:)
MergeRequestsFinder
.new(current_user, group_id: @group.id, state: state, non_archived: true, include_subgroups: true)
......
- issues_count = cached_issuables_count(@group, type: :issues)
- merge_requests_count = group_open_merge_requests_count(@group)
- merge_requests_count = cached_issuables_count(@group, type: :merge_requests)
- aside_title = @group.subgroup? ? _('Subgroup navigation') : _('Group navigation')
%aside.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?), **sidebar_tracking_attributes_by_object(@group), 'aria-label': aside_title }
......
---
name: cached_sidebar_merge_requests_count
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55971
rollout_issue_url:
milestone: '13.11'
type: development
group: group::product planning
default_enabled: true
......@@ -360,32 +360,7 @@ All the above can be done with the [`git-mr`](https://gitlab.com/glensc/git-mr)
## Cached merge request count
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/299542) in GitLab 13.11.
> - It's [deployed behind a feature flag](../../../feature_flags.md), enabled by default.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-cached-merge-request-count).
WARNING:
This feature might not be available to you. Refer to the previous **version history** note for details.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/327319) in GitLab 14.0.
In a group, the sidebar displays the total count of open merge requests. This value is cached if it's greater than
than 1000. The cached value is rounded to thousands (or millions) and updated every 24 hours.
### Enable or disable cached merge request count **(FREE SELF)**
Cached merge request count in the left sidebar is under development but ready for production use. It is
deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../../administration/feature_flags.md)
can disable it.
To disable it:
```ruby
Feature.disable(:cached_sidebar_merge_requests_count)
```
To enable it:
```ruby
Feature.enable(:cached_sidebar_merge_requests_count)
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment