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
d2226857
Commit
d2226857
authored
Apr 02, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
1add270d
723f936f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+10
-4
changelogs/unreleased/sh-cache-pipeline-find-commits.yml
changelogs/unreleased/sh-cache-pipeline-find-commits.yml
+5
-0
spec/controllers/projects/pipelines_controller_spec.rb
spec/controllers/projects/pipelines_controller_spec.rb
+2
-0
No files found.
app/controllers/projects/pipelines_controller.rb
View file @
d2226857
...
...
@@ -31,10 +31,7 @@ class Projects::PipelinesController < Projects::ApplicationController
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
POLLING_INTERVAL
)
render
json:
{
pipelines:
PipelineSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
with_pagination
(
request
,
response
)
.
represent
(
@pipelines
,
disable_coverage:
true
,
preload:
true
),
pipelines:
serialize_pipelines
,
count:
{
all:
@pipelines_count
,
running:
@running_count
,
...
...
@@ -150,6 +147,15 @@ class Projects::PipelinesController < Projects::ApplicationController
private
def
serialize_pipelines
::
Gitlab
::
GitalyClient
.
allow_ref_name_caching
do
PipelineSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
with_pagination
(
request
,
response
)
.
represent
(
@pipelines
,
disable_coverage:
true
,
preload:
true
)
end
end
def
render_show
respond_to
do
|
format
|
format
.
html
do
...
...
changelogs/unreleased/sh-cache-pipeline-find-commits.yml
0 → 100644
View file @
d2226857
---
title
:
Cache FindCommit results in pipelines view
merge_request
:
26776
author
:
type
:
performance
spec/controllers/projects/pipelines_controller_spec.rb
View file @
d2226857
...
...
@@ -28,6 +28,8 @@ describe Projects::PipelinesController do
end
it
'returns serialized pipelines'
,
:request_store
do
expect
(
::
Gitlab
::
GitalyClient
).
to
receive
(
:allow_ref_name_caching
).
and_call_original
queries
=
ActiveRecord
::
QueryRecorder
.
new
do
get_pipelines_index_json
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