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
af0c054c
Commit
af0c054c
authored
Jul 10, 2019
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve Gitaly N+1 for CI/CD environments statuses
parent
49f8697a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
app/models/project.rb
app/models/project.rb
+1
-2
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+2
-2
No files found.
app/models/project.rb
View file @
af0c054c
...
...
@@ -1914,9 +1914,8 @@ class Project < ApplicationRecord
@route_maps_by_commit
||=
Hash
.
new
do
|
h
,
sha
|
h
[
sha
]
=
begin
data
=
repository
.
route_map_for
(
sha
)
next
unless
data
Gitlab
::
RouteMap
.
new
(
data
)
Gitlab
::
RouteMap
.
new
(
data
)
if
data
rescue
Gitlab
::
RouteMap
::
FormatError
nil
end
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
af0c054c
...
...
@@ -922,7 +922,7 @@ describe Projects::MergeRequestsController do
expect
(
merge_request
).
to
be_present
expect
{
get_ci_environments_status
}
.
not_to
change
{
Gitlab
::
GitalyClient
.
get_request_count
}
.
to
change
{
Gitlab
::
GitalyClient
.
get_request_count
}.
by_at_most
(
1
)
end
end
...
...
@@ -937,7 +937,7 @@ describe Projects::MergeRequestsController do
expect
(
merge_request
.
merge_request_diff
.
merge_request_diff_files
).
to
be_many
expect
{
get_ci_environments_status
}
.
not_to
change
{
Gitlab
::
GitalyClient
.
get_request_count
}
.
to
change
{
Gitlab
::
GitalyClient
.
get_request_count
}.
by_at_most
(
1
)
end
end
end
...
...
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