Commit 434a9955 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent d46287cc
...@@ -68,3 +68,4 @@ ...@@ -68,3 +68,4 @@
@import 'framework/flex_grid'; @import 'framework/flex_grid';
@import 'framework/system_messages'; @import 'framework/system_messages';
@import "framework/spinner"; @import "framework/spinner";
@import 'framework/card';
.card-header {
&:first-child {
// intended use case: card with only a header (for example empty related issues)
&.border-0,
&.border-bottom-0 {
@include border-radius($card-inner-border-radius);
}
}
}
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
# * Add `usage` value to enum # * Add `usage` value to enum
# * (Optionally) add columns to `internal_ids` if needed for scope. # * (Optionally) add columns to `internal_ids` if needed for scope.
class InternalId < ApplicationRecord class InternalId < ApplicationRecord
include Gitlab::Utils::StrongMemoize
belongs_to :project belongs_to :project
belongs_to :namespace belongs_to :namespace
...@@ -47,10 +49,18 @@ class InternalId < ApplicationRecord ...@@ -47,10 +49,18 @@ class InternalId < ApplicationRecord
def update_and_save(&block) def update_and_save(&block)
lock! lock!
yield yield
update_and_save_counter.increment(usage: usage, changed: last_value_changed?)
save! save!
last_value last_value
end end
# Temporary instrumentation to track for-update locks
def update_and_save_counter
strong_memoize(:update_and_save_counter) do
Gitlab::Metrics.counter(:gitlab_internal_id_for_update_lock, 'Number of ROW SHARE (FOR UPDATE) locks on individual records from internal_ids')
end
end
class << self class << self
def track_greatest(subject, scope, usage, new_value, init) def track_greatest(subject, scope, usage, new_value, init)
return new_value unless available? return new_value unless available?
......
---
title: Redo fix for related issues border radius
merge_request: 17172
author:
type: fixed
...@@ -71,6 +71,7 @@ describe Ci::CreatePipelineService do ...@@ -71,6 +71,7 @@ describe Ci::CreatePipelineService do
expect(Gitlab::Metrics).to receive(:counter) expect(Gitlab::Metrics).to receive(:counter)
.with(:pipelines_created_total, "Counter of pipelines created") .with(:pipelines_created_total, "Counter of pipelines created")
.and_call_original .and_call_original
allow(Gitlab::Metrics).to receive(:counter).and_call_original # allow other counters
pipeline pipeline
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment