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
6280fd37
Commit
6280fd37
authored
Aug 23, 2016
by
Paco Guzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce number of database queries on builds tab
parent
7bbb523b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
4 deletions
+7
-4
CHANGELOG
CHANGELOG
+1
-0
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
app/models/commit_status.rb
app/models/commit_status.rb
+2
-0
app/views/projects/commit/_ci_stage.html.haml
app/views/projects/commit/_ci_stage.html.haml
+2
-2
No files found.
CHANGELOG
View file @
6280fd37
...
...
@@ -12,6 +12,7 @@ v 8.12.0 (unreleased)
v 8.11.2 (unreleased)
- Show "Create Merge Request" widget for push events to fork projects on the source project
- Reduce number of database queries on builds tab
v 8.11.1 (unreleased)
- Does not halt the GitHub import process when an error occurs
...
...
app/models/ci/build.rb
View file @
6280fd37
...
...
@@ -352,7 +352,7 @@ module Ci
end
def
artifacts?
!
artifacts_expired?
&&
artifacts_file
.
exists
?
!
artifacts_expired?
&&
self
[
:artifacts_file
].
present
?
end
def
artifacts_metadata?
...
...
app/models/ci/pipeline.rb
View file @
6280fd37
...
...
@@ -83,7 +83,7 @@ module Ci
end
def
stages_with_latest_statuses
statuses
.
latest
.
order
(
:stage_idx
).
group_by
(
&
:stage
)
statuses
.
latest
.
includes
(
project: :namespace
).
order
(
:stage_idx
).
group_by
(
&
:stage
)
end
def
project_id
...
...
app/models/commit_status.rb
View file @
6280fd37
...
...
@@ -25,6 +25,8 @@ class CommitStatus < ActiveRecord::Base
scope
:retried
,
->
{
where
.
not
(
id:
latest
)
}
scope
:ordered
,
->
{
order
(
:name
)
}
scope
:ignored
,
->
{
where
(
allow_failure:
true
,
status:
[
:failed
,
:canceled
])
}
scope
:latest_ci_stages
,
->
{
latest
.
ordered
.
includes
(
project: :namespace
)
}
scope
:retried_ci_stages
,
->
{
retried
.
ordered
.
includes
(
project: :namespace
)
}
state_machine
:status
do
event
:enqueue
do
...
...
app/views/projects/commit/_ci_stage.html.haml
View file @
6280fd37
...
...
@@ -8,8 +8,8 @@
-
if
stage
=
stage
.
titleize
=
render
statuses
.
latest
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
stage:
false
,
ref:
false
,
allow_retry:
true
=
render
statuses
.
retried
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
stage:
false
,
ref:
false
,
retried:
true
=
render
statuses
.
latest
_ci_stages
,
coverage:
@project
.
build_coverage_enabled?
,
stage:
false
,
ref:
false
,
allow_retry:
true
=
render
statuses
.
retried
_ci_stages
,
coverage:
@project
.
build_coverage_enabled?
,
stage:
false
,
ref:
false
,
retried:
true
%tr
%td
{
colspan:
10
}
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