Skip to content
Snippets Groups Projects
Commit 9f2d4a64 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent fda87350
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -90,7 +90,7 @@ module Clusters
# ensures headers containing auth data are appended to original k8s client options
options = kube_client.rest_client.options.merge(headers: kube_client.headers)
Gitlab::PrometheusClient.new(proxy_url, options)
rescue Kubeclient::HttpError, Errno::ECONNRESET, Errno::ECONNREFUSED
rescue Kubeclient::HttpError, Errno::ECONNRESET, Errno::ECONNREFUSED, Errno::ENETUNREACH
# If users have mistakenly set parameters or removed the depended clusters,
# `proxy_url` could raise an exception because gitlab can not communicate with the cluster.
# Since `PrometheusAdapter#can_query?` is eargely loaded on environement pages in gitlab,
Loading
Loading
Loading
Loading
@@ -152,9 +152,7 @@ class Note < ApplicationRecord
scope :for_note_or_capitalized_note, ->(text) { where(note: [text, text.capitalize]) }
scope :like_note_or_capitalized_note, ->(text) { where('(note LIKE ? OR note LIKE ?)', text, text.capitalize) }
 
after_initialize :ensure_discussion_id
before_validation :nullify_blank_type, :nullify_blank_line_code
before_validation :set_discussion_id, on: :create
after_save :keep_around_commit, if: :for_project_noteable?, unless: :importing?
after_save :expire_etag_cache, unless: :importing?
after_save :touch_noteable, unless: :importing?
Loading
Loading
@@ -394,7 +392,7 @@ class Note < ApplicationRecord
 
# See `Discussion.override_discussion_id` for details.
def discussion_id(noteable = nil)
discussion_class(noteable).override_discussion_id(self) || super()
discussion_class(noteable).override_discussion_id(self) || super() || ensure_discussion_id
end
 
# Returns a discussion containing just this note.
Loading
Loading
@@ -533,17 +531,13 @@ class Note < ApplicationRecord
end
 
def ensure_discussion_id
return unless self.persisted?
# Needed in case the SELECT statement doesn't ask for `discussion_id`
return unless self.has_attribute?(:discussion_id)
return if self.discussion_id
return if self.attribute_present?(:discussion_id)
 
set_discussion_id
update_column(:discussion_id, self.discussion_id)
self.discussion_id = derive_discussion_id
end
 
def set_discussion_id
self.discussion_id ||= discussion_class.discussion_id(self)
def derive_discussion_id
discussion_class.discussion_id(self)
end
 
def all_referenced_mentionables_allowed?(user)
Loading
Loading
---
title: Return 503 error when metrics dashboard has no connectivity
merge_request: 22140
author:
type: fixed
---
title: Process quick actions when using Service Desk templates
merge_request: 21948
author:
type: fixed
---
title: Remove after_initialize and before_validation for Note
merge_request: 22128
author:
type: performance
Loading
Loading
@@ -224,14 +224,9 @@ users are, how much automation you use, mirroring, and repo/change size.
 
- **Supported Users (approximate):** 2,000
- **Test RPS Rates:** API: 40 RPS, Web: 4 RPS, Git: 4 RPS
- **Status:** Work-in-progress
- **Known Issues:** For the latest list of known performance issues head
[here](https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=Quality%3Aperformance-issues).
 
NOTE: **Note:** This architecture is a work-in-progress of the work so far. The
Quality team will be certifying this environment in late 2019 or early 2020. The specifications
may be adjusted prior to certification based on performance testing.
| Service | Nodes | Configuration | GCP type |
| ----------------------------|-------|-----------------------|---------------|
| GitLab Rails <br> - Puma workers on each node set to 90% of available CPUs with 8 threads | 3 | 8 vCPU, 7.2GB Memory | n1-highcpu-8 |
Loading
Loading
@@ -255,14 +250,9 @@ vendors a best effort like for like can be used.
 
- **Supported Users (approximate):** 5,000
- **Test RPS Rates:** API: 100 RPS, Web: 10 RPS, Git: 10 RPS
- **Status:** Work-in-progress
- **Known Issues:** For the latest list of known performance issues head
[here](https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=Quality%3Aperformance-issues).
 
NOTE: **Note:** This architecture is a work-in-progress of the work so far. The
Quality team will be certifying this environment in late 2019 or early 2020. The specifications
may be adjusted prior to certification based on performance testing.
| Service | Nodes | Configuration | GCP type |
| ----------------------------|-------|-----------------------|---------------|
| GitLab Rails <br> - Puma workers on each node set to 90% of available CPUs with 16 threads | 3 | 16 vCPU, 14.4GB Memory | n1-highcpu-16 |
Loading
Loading
Loading
Loading
@@ -79,3 +79,5 @@ module Gitlab
end
end
end
Gitlab::Email::Handler::ReplyProcessing.prepend_if_ee('::EE::Gitlab::Email::Handler::ReplyProcessing')
Loading
Loading
@@ -117,6 +117,12 @@ describe Clusters::Applications::Prometheus do
let(:exception) { Errno::ECONNRESET }
end
end
context 'when the network is unreachable' do
it_behaves_like 'exception caught for prometheus client' do
let(:exception) { Errno::ENETUNREACH }
end
end
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment