Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0abe3164
Commit
0abe3164
authored
Apr 09, 2021
by
Eugenia Grieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cached_sidebar_open_issues_count FF
- Update specs - Update docs
parent
4fc8d66e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
75 deletions
+8
-75
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+0
-8
app/views/layouts/nav/sidebar/_group.html.haml
app/views/layouts/nav/sidebar/_group.html.haml
+1
-1
changelogs/unreleased/323493-remove-ff-cached-sidebar-open-issues-count.yml
...sed/323493-remove-ff-cached-sidebar-open-issues-count.yml
+5
-0
config/feature_flags/development/cached_sidebar_open_issues_count.yml
...re_flags/development/cached_sidebar_open_issues_count.yml
+0
-8
doc/user/project/issues/managing_issues.md
doc/user/project/issues/managing_issues.md
+2
-28
spec/helpers/groups_helper_spec.rb
spec/helpers/groups_helper_spec.rb
+0
-30
No files found.
app/helpers/groups_helper.rb
View file @
0abe3164
...
@@ -65,14 +65,6 @@ module GroupsHelper
...
@@ -65,14 +65,6 @@ module GroupsHelper
can?
(
current_user
,
:set_emails_disabled
,
group
)
&&
!
group
.
parent
&
.
emails_disabled?
can?
(
current_user
,
:set_emails_disabled
,
group
)
&&
!
group
.
parent
&
.
emails_disabled?
end
end
def
group_open_issues_count
(
group
)
if
Feature
.
enabled?
(
:cached_sidebar_open_issues_count
,
group
,
default_enabled: :yaml
)
cached_issuables_count
(
group
,
type: :issues
)
else
number_with_delimiter
(
group_issues_count
(
state:
'opened'
))
end
end
def
group_issues_count
(
state
:)
def
group_issues_count
(
state
:)
IssuesFinder
IssuesFinder
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
state
,
non_archived:
true
,
include_subgroups:
true
)
.
new
(
current_user
,
group_id:
@group
.
id
,
state:
state
,
non_archived:
true
,
include_subgroups:
true
)
...
...
app/views/layouts/nav/sidebar/_group.html.haml
View file @
0abe3164
-
issues_count
=
group_open_issues_count
(
@group
)
-
issues_count
=
cached_issuables_count
(
@group
,
type: :issues
)
-
merge_requests_count
=
group_open_merge_requests_count
(
@group
)
-
merge_requests_count
=
group_open_merge_requests_count
(
@group
)
-
aside_title
=
@group
.
subgroup?
?
_
(
'Subgroup navigation'
)
:
_
(
'Group navigation'
)
-
aside_title
=
@group
.
subgroup?
?
_
(
'Subgroup navigation'
)
:
_
(
'Group navigation'
)
-
overview_title
=
@group
.
subgroup?
?
_
(
'Subgroup overview'
)
:
_
(
'Group overview'
)
-
overview_title
=
@group
.
subgroup?
?
_
(
'Subgroup overview'
)
:
_
(
'Group overview'
)
...
...
changelogs/unreleased/323493-remove-ff-cached-sidebar-open-issues-count.yml
0 → 100644
View file @
0abe3164
---
title
:
Cache issues count in sidebar at group level
merge_request
:
59004
author
:
type
:
performance
config/feature_flags/development/cached_sidebar_open_issues_count.yml
deleted
100644 → 0
View file @
4fc8d66e
---
name
:
cached_sidebar_open_issues_count
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49739
rollout_issue_url
:
milestone
:
'
13.8'
type
:
development
group
:
group::product planning
default_enabled
:
true
doc/user/project/issues/managing_issues.md
View file @
0abe3164
...
@@ -325,15 +325,8 @@ To enable it, you need to enable [ActionCable in-app mode](https://docs.gitlab.c
...
@@ -325,15 +325,8 @@ To enable it, you need to enable [ActionCable in-app mode](https://docs.gitlab.c
## Cached issue count **(FREE SELF)**
## Cached issue count **(FREE SELF)**
> - [Introduced]([link-to-issue](https://gitlab.com/gitlab-org/gitlab/-/issues/243753)) in GitLab 13.9.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/243753) in GitLab 13.9.
> - It was [deployed behind a feature flag](../../feature_flags.md), disabled by default.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/323493) in GitLab 13.11.
> - [Became enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/323493) in GitLab 13.10.
> - 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-issue-count) **(FREE SELF)**
WARNING:
This feature might not be available to you. Check the
**version history**
note above for details.
In a group, the sidebar displays the total count of open issues and this value is cached if higher
In a group, the sidebar displays the total count of open issues and this value is cached if higher
than 1000. The cached value is rounded to thousands (or millions) and updated every 24 hours.
than 1000. The cached value is rounded to thousands (or millions) and updated every 24 hours.
...
@@ -371,22 +364,3 @@ until the issue is reopened.
...
@@ -371,22 +364,3 @@ until the issue is reopened.
You can then see issue statuses in the issues list and the
You can then see issue statuses in the issues list and the
[
epic tree
](
../../group/epics/index.md#issue-health-status-in-epic-tree
)
.
[
epic tree
](
../../group/epics/index.md#issue-health-status-in-epic-tree
)
.
## Enable or disable cached issue count **(FREE SELF)**
Cached issue 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_open_issues_count
)
```
To enable it:
```
ruby
Feature
.
enable
(
:cached_sidebar_open_issues_count
)
```
spec/helpers/groups_helper_spec.rb
View file @
0abe3164
...
@@ -481,36 +481,6 @@ RSpec.describe GroupsHelper do
...
@@ -481,36 +481,6 @@ RSpec.describe GroupsHelper do
end
end
end
end
describe
'#group_open_issues_count'
do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
,
:public
)
}
let_it_be
(
:count_service
)
{
Groups
::
OpenIssuesCountService
}
before
do
allow
(
helper
).
to
receive
(
:current_user
)
{
current_user
}
end
it
'returns count value from cache'
do
allow_next_instance_of
(
count_service
)
do
|
service
|
allow
(
service
).
to
receive
(
:count
).
and_return
(
2500
)
end
expect
(
helper
.
group_open_issues_count
(
group
)).
to
eq
(
'2.5k'
)
end
context
'when cached_sidebar_open_issues_count feature flag is disabled'
do
before
do
stub_feature_flags
(
cached_sidebar_open_issues_count:
false
)
end
it
'returns not cached issues count'
do
allow
(
helper
).
to
receive
(
:group_issues_count
).
and_return
(
2500
)
expect
(
helper
.
group_open_issues_count
(
group
)).
to
eq
(
'2,500'
)
end
end
end
describe
'#cached_issuables_count'
do
describe
'#cached_issuables_count'
do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
,
name:
'group'
)
}
let_it_be
(
:group
)
{
create
(
:group
,
name:
'group'
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment