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
a245ea31
Commit
a245ea31
authored
Aug 19, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
d3759b55
b1905a39
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
89 additions
and
16 deletions
+89
-16
app/assets/javascripts/diffs/components/app.vue
app/assets/javascripts/diffs/components/app.vue
+1
-1
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+1
-2
changelogs/unreleased/63905-discussion-expand-collapse-button-is-only-clickable-on-one-side.yml
...-expand-collapse-button-is-only-clickable-on-one-side.yml
+5
-0
config.ru
config.ru
+5
-13
config/initializers/7_prometheus_metrics.rb
config/initializers/7_prometheus_metrics.rb
+3
-0
lib/prometheus/cleanup_multiproc_dir_service.rb
lib/prometheus/cleanup_multiproc_dir_service.rb
+23
-0
spec/lib/prometheus/cleanup_multiproc_dir_service_spec.rb
spec/lib/prometheus/cleanup_multiproc_dir_service_spec.rb
+51
-0
No files found.
app/assets/javascripts/diffs/components/app.vue
View file @
a245ea31
...
...
@@ -305,7 +305,7 @@ export default {
<div
v-show=
"showTreeList"
:style=
"
{ width: `${treeWidth}px` }"
class="diff-tree-list js-diff-tree-list"
class="diff-tree-list js-diff-tree-list
mr-3
"
>
<panel-resizer
:size.sync=
"treeWidth"
...
...
app/assets/stylesheets/pages/diff.scss
View file @
a245ea31
...
...
@@ -1032,7 +1032,6 @@ table.code {
$top-pos
:
$header-height
+
$mr-tabs-height
+
$mr-version-controls-height
+
10px
;
top
:
$header-height
+
$mr-tabs-height
+
$mr-version-controls-height
+
10px
;
max-height
:
calc
(
100vh
-
#{
$top-pos
}
);
padding-right
:
$gl-padding
;
z-index
:
202
;
.with-performance-bar
&
{
...
...
@@ -1043,7 +1042,7 @@ table.code {
.drag-handle
{
bottom
:
16px
;
transform
:
translateX
(
-6
px
);
transform
:
translateX
(
10
px
);
}
}
...
...
changelogs/unreleased/63905-discussion-expand-collapse-button-is-only-clickable-on-one-side.yml
0 → 100644
View file @
a245ea31
---
title
:
All of discussion expand/collapse button is clickable
merge_request
:
31730
author
:
type
:
fixed
config.ru
View file @
a245ea31
...
...
@@ -17,24 +17,16 @@ end
require
::
File
.
expand_path
(
'../config/environment'
,
__FILE__
)
# The following is necessary to ensure stale Prometheus metrics don't accumulate over time.
# It needs to be done as early as here to ensure metrics files aren't deleted.
# After we hit our app in `warmup`, first metrics and corresponding files already being created,
# for example in `lib/gitlab/metrics/requests_rack_middleware.rb`.
def
cleanup_prometheus_multiproc_dir
if
dir
=
::
Prometheus
::
Client
.
configuration
.
multiprocess_files_dir
old_metrics
=
Dir
[
File
.
join
(
dir
,
'*.db'
)]
FileUtils
.
rm_rf
(
old_metrics
)
end
end
def
master_process?
Prometheus
::
PidProvider
.
worker_id
.
in?
%w(unicorn_master puma_master)
end
warmup
do
|
app
|
cleanup_prometheus_multiproc_dir
if
master_process?
# The following is necessary to ensure stale Prometheus metrics don't accumulate over time.
# It needs to be done as early as here to ensure metrics files aren't deleted.
# After we hit our app in `warmup`, first metrics and corresponding files already being created,
# for example in `lib/gitlab/metrics/requests_rack_middleware.rb`.
Prometheus
::
CleanupMultiprocDirService
.
new
.
execute
if
master_process?
client
=
Rack
::
MockRequest
.
new
(
app
)
client
.
get
(
'/'
)
...
...
config/initializers/7_prometheus_metrics.rb
View file @
a245ea31
...
...
@@ -32,6 +32,9 @@ end
Sidekiq
.
configure_server
do
|
config
|
config
.
on
(
:startup
)
do
# webserver metrics are cleaned up in config.ru: `warmup` block
Prometheus
::
CleanupMultiprocDirService
.
new
.
execute
Gitlab
::
Metrics
::
SidekiqMetricsExporter
.
instance
.
start
end
end
...
...
lib/prometheus/cleanup_multiproc_dir_service.rb
0 → 100644
View file @
a245ea31
# frozen_string_literal: true
module
Prometheus
class
CleanupMultiprocDirService
include
Gitlab
::
Utils
::
StrongMemoize
def
execute
FileUtils
.
rm_rf
(
old_metrics
)
if
old_metrics
end
private
def
old_metrics
strong_memoize
(
:old_metrics
)
do
Dir
[
File
.
join
(
multiprocess_files_dir
,
'*.db'
)]
if
multiprocess_files_dir
end
end
def
multiprocess_files_dir
::
Prometheus
::
Client
.
configuration
.
multiprocess_files_dir
end
end
end
spec/lib/prometheus/cleanup_multiproc_dir_service_spec.rb
0 → 100644
View file @
a245ea31
# frozen_string_literal: true
require
'spec_helper'
describe
Prometheus
::
CleanupMultiprocDirService
do
describe
'.call'
do
subject
{
described_class
.
new
.
execute
}
let
(
:metrics_multiproc_dir
)
{
Dir
.
mktmpdir
}
let
(
:metrics_file_path
)
{
File
.
join
(
metrics_multiproc_dir
,
'counter_puma_master-0.db'
)
}
before
do
FileUtils
.
touch
(
metrics_file_path
)
end
after
do
FileUtils
.
rm_r
(
metrics_multiproc_dir
)
end
context
'when `multiprocess_files_dir` is defined'
do
before
do
expect
(
Prometheus
::
Client
.
configuration
)
.
to
receive
(
:multiprocess_files_dir
)
.
and_return
(
metrics_multiproc_dir
)
.
at_least
(
:once
)
end
it
'removes old metrics'
do
expect
{
subject
}
.
to
change
{
File
.
exist?
(
metrics_file_path
)
}
.
from
(
true
)
.
to
(
false
)
end
end
context
'when `multiprocess_files_dir` is not defined'
do
before
do
expect
(
Prometheus
::
Client
.
configuration
)
.
to
receive
(
:multiprocess_files_dir
)
.
and_return
(
nil
)
.
at_least
(
:once
)
end
it
'does not remove any files'
do
expect
{
subject
}
.
not_to
change
{
File
.
exist?
(
metrics_file_path
)
}
.
from
(
true
)
end
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