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
cfb297e9
Commit
cfb297e9
authored
Jun 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
460ec041
50063f4a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
55 additions
and
15 deletions
+55
-15
app/assets/javascripts/diffs/components/commit_item.vue
app/assets/javascripts/diffs/components/commit_item.vue
+1
-1
app/assets/stylesheets/pages/commits.scss
app/assets/stylesheets/pages/commits.scss
+8
-0
app/models/project_ci_cd_setting.rb
app/models/project_ci_cd_setting.rb
+2
-0
app/presenters/ci/build_runner_presenter.rb
app/presenters/ci/build_runner_presenter.rb
+1
-1
changelogs/unreleased/61072-link-to-user-profile-not-distinguishable-on-latest-commit-widget.yml
...r-profile-not-distinguishable-on-latest-commit-widget.yml
+5
-0
changelogs/unreleased/osw-fix-post-dep-migration-with-timeout.yml
...gs/unreleased/osw-fix-post-dep-migration-with-timeout.yml
+5
-0
db/post_migrate/20190528180441_enqueue_reset_merge_status.rb
db/post_migrate/20190528180441_enqueue_reset_merge_status.rb
+5
-10
spec/javascripts/diffs/components/commit_item_spec.js
spec/javascripts/diffs/components/commit_item_spec.js
+1
-1
spec/migrations/enqueue_reset_merge_status_spec.rb
spec/migrations/enqueue_reset_merge_status_spec.rb
+5
-2
spec/models/project_ci_cd_setting_spec.rb
spec/models/project_ci_cd_setting_spec.rb
+12
-0
spec/presenters/ci/build_runner_presenter_spec.rb
spec/presenters/ci/build_runner_presenter_spec.rb
+10
-0
No files found.
app/assets/javascripts/diffs/components/commit_item.vue
View file @
cfb297e9
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
<icon
:size=
"12"
name=
"ellipsis_h"
/>
<icon
:size=
"12"
name=
"ellipsis_h"
/>
</button>
</button>
<div
class=
"commiter"
>
<div
class=
"commit
t
er"
>
<a
<a
:href=
"authorUrl"
:href=
"authorUrl"
:class=
"authorClass"
:class=
"authorClass"
...
...
app/assets/stylesheets/pages/commits.scss
View file @
cfb297e9
...
@@ -180,6 +180,14 @@
...
@@ -180,6 +180,14 @@
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.committer
{
color
:
$gl-text-color-tertiary
;
.commit-author-link
{
color
:
$gl-text-color
;
}
}
}
}
.commit-actions
{
.commit-actions
{
...
...
app/models/project_ci_cd_setting.rb
View file @
cfb297e9
...
@@ -31,6 +31,8 @@ class ProjectCiCdSetting < ApplicationRecord
...
@@ -31,6 +31,8 @@ class ProjectCiCdSetting < ApplicationRecord
private
private
def
set_default_git_depth
def
set_default_git_depth
return
unless
Feature
.
enabled?
(
:ci_set_project_default_git_depth
,
default_enabled:
true
)
self
.
default_git_depth
||=
DEFAULT_GIT_DEPTH
self
.
default_git_depth
||=
DEFAULT_GIT_DEPTH
end
end
end
end
...
...
app/presenters/ci/build_runner_presenter.rb
View file @
cfb297e9
...
@@ -27,7 +27,7 @@ module Ci
...
@@ -27,7 +27,7 @@ module Ci
def
git_depth
def
git_depth
if
git_depth_variable
if
git_depth_variable
git_depth_variable
[
:value
]
git_depth_variable
[
:value
]
els
e
els
if
Feature
.
enabled?
(
:ci_project_git_depth
,
default_enabled:
true
)
project
.
default_git_depth
project
.
default_git_depth
end
.
to_i
end
.
to_i
end
end
...
...
changelogs/unreleased/61072-link-to-user-profile-not-distinguishable-on-latest-commit-widget.yml
0 → 100644
View file @
cfb297e9
---
title
:
User link styling for commits
merge_request
:
29150
author
:
type
:
other
changelogs/unreleased/osw-fix-post-dep-migration-with-timeout.yml
0 → 100644
View file @
cfb297e9
---
title
:
Avoid DB timeouts when scheduling migrations
merge_request
:
29437
author
:
type
:
fixed
db/post_migrate/20190528180441_enqueue_reset_merge_status.rb
View file @
cfb297e9
...
@@ -16,15 +16,10 @@ class EnqueueResetMergeStatus < ActiveRecord::Migration[5.1]
...
@@ -16,15 +16,10 @@ class EnqueueResetMergeStatus < ActiveRecord::Migration[5.1]
def
up
def
up
say
'Scheduling `ResetMergeStatus` jobs'
say
'Scheduling `ResetMergeStatus` jobs'
# We currently have around 135_000 opened, mergeable MRs in GitLab.com. This iteration
# We currently have more than ~5_000_000 merge request records on GitLab.com.
# will schedule around 13 batches of 10_000 MRs, which should take around 1 hour to
# This means it'll schedule ~500 jobs (10k MRs each) with a 5 minutes gap,
# complete.
# so this should take ~41 hours for all background migrations to complete.
relation
=
MergeRequest
.
where
(
state:
'opened'
,
merge_status:
'can_be_merged'
)
# ((5_000_000 / 10_000) * 5) / 60 => 41.6666..
queue_background_migration_jobs_by_range_at_intervals
(
MergeRequest
,
MIGRATION
,
DELAY_INTERVAL
,
batch_size:
BATCH_SIZE
)
relation
.
each_batch
(
of:
BATCH_SIZE
)
do
|
batch
,
index
|
range
=
batch
.
pluck
(
'MIN(id)'
,
'MAX(id)'
).
first
BackgroundMigrationWorker
.
perform_in
(
index
*
DELAY_INTERVAL
,
MIGRATION
,
range
)
end
end
end
end
end
spec/javascripts/diffs/components/commit_item_spec.js
View file @
cfb297e9
...
@@ -18,7 +18,7 @@ const getDescExpandElement = vm =>
...
@@ -18,7 +18,7 @@ const getDescExpandElement = vm =>
vm
.
$el
.
querySelector
(
'
.commit-content .text-expander.js-toggle-button
'
);
vm
.
$el
.
querySelector
(
'
.commit-content .text-expander.js-toggle-button
'
);
const
getShaElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.commit-sha-group
'
);
const
getShaElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.commit-sha-group
'
);
const
getAvatarElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.user-avatar-link
'
);
const
getAvatarElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.user-avatar-link
'
);
const
getCommitterElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.commiter
'
);
const
getCommitterElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.commit
t
er
'
);
const
getCommitActionsElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.commit-actions
'
);
const
getCommitActionsElement
=
vm
=>
vm
.
$el
.
querySelector
(
'
.commit-actions
'
);
describe
(
'
diffs/components/commit_item
'
,
()
=>
{
describe
(
'
diffs/components/commit_item
'
,
()
=>
{
...
...
spec/migrations/enqueue_reset_merge_status_spec.rb
View file @
cfb297e9
...
@@ -40,9 +40,12 @@ describe EnqueueResetMergeStatus, :migration, :sidekiq do
...
@@ -40,9 +40,12 @@ describe EnqueueResetMergeStatus, :migration, :sidekiq do
.
to
be_scheduled_delayed_migration
(
5
.
minutes
,
1
,
2
)
.
to
be_scheduled_delayed_migration
(
5
.
minutes
,
1
,
2
)
expect
(
described_class
::
MIGRATION
)
expect
(
described_class
::
MIGRATION
)
.
to
be_scheduled_delayed_migration
(
10
.
minutes
,
3
,
3
)
.
to
be_scheduled_delayed_migration
(
10
.
minutes
,
3
,
4
)
expect
(
BackgroundMigrationWorker
.
jobs
.
size
).
to
eq
(
2
)
expect
(
described_class
::
MIGRATION
)
.
to
be_scheduled_delayed_migration
(
15
.
minutes
,
5
,
5
)
expect
(
BackgroundMigrationWorker
.
jobs
.
size
).
to
eq
(
3
)
end
end
end
end
end
end
...
...
spec/models/project_ci_cd_setting_spec.rb
View file @
cfb297e9
...
@@ -48,5 +48,17 @@ describe ProjectCiCdSetting do
...
@@ -48,5 +48,17 @@ describe ProjectCiCdSetting do
expect
(
project
.
reload
.
ci_cd_settings
.
default_git_depth
).
to
eq
(
0
)
expect
(
project
.
reload
.
ci_cd_settings
.
default_git_depth
).
to
eq
(
0
)
end
end
context
'when feature flag :ci_set_project_default_git_depth is disabled'
do
let
(
:project
)
{
create
(
:project
)
}
before
do
stub_feature_flags
(
ci_set_project_default_git_depth:
{
enabled:
false
}
)
end
it
'does not set default value for new records'
do
expect
(
project
.
ci_cd_settings
.
default_git_depth
).
to
eq
(
nil
)
end
end
end
end
end
end
spec/presenters/ci/build_runner_presenter_spec.rb
View file @
cfb297e9
...
@@ -136,6 +136,16 @@ describe Ci::BuildRunnerPresenter do
...
@@ -136,6 +136,16 @@ describe Ci::BuildRunnerPresenter do
it
'defaults to git depth setting for the project'
do
it
'defaults to git depth setting for the project'
do
expect
(
git_depth
).
to
eq
(
build
.
project
.
default_git_depth
)
expect
(
git_depth
).
to
eq
(
build
.
project
.
default_git_depth
)
end
end
context
'when feature flag :ci_project_git_depth is disabled'
do
before
do
stub_feature_flags
(
ci_project_git_depth:
{
enabled:
false
})
end
it
'defaults to 0'
do
expect
(
git_depth
).
to
eq
(
0
)
end
end
end
end
describe
'#refspecs'
do
describe
'#refspecs'
do
...
...
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