diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-10 15:09:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-10 15:09:50 +0000 |
commit | de2fb5b82c92c90f90ed67ced45143c04e934fb8 (patch) | |
tree | ff8e5e642580de7bb596d90dd0e7f739f44ca540 /app/services | |
parent | c6a33b298229f9e04933be43d6176c476ef03012 (diff) | |
download | gitlab-ce-de2fb5b82c92c90f90ed67ced45143c04e934fb8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
7 files changed, 13 insertions, 5 deletions
diff --git a/app/services/metrics/dashboard/base_service.rb b/app/services/metrics/dashboard/base_service.rb index a19f3f78b3d..219b26defb1 100644 --- a/app/services/metrics/dashboard/base_service.rb +++ b/app/services/metrics/dashboard/base_service.rb @@ -11,6 +11,7 @@ module Metrics SEQUENCE = [ STAGES::CommonMetricsInserter, STAGES::EndpointInserter, + STAGES::PanelIdsInserter, STAGES::Sorter ].freeze diff --git a/app/services/metrics/dashboard/gitlab_alert_embed_service.rb b/app/services/metrics/dashboard/gitlab_alert_embed_service.rb index 5515b84f112..38e89d392ad 100644 --- a/app/services/metrics/dashboard/gitlab_alert_embed_service.rb +++ b/app/services/metrics/dashboard/gitlab_alert_embed_service.rb @@ -10,7 +10,10 @@ module Metrics class GitlabAlertEmbedService < ::Metrics::Dashboard::BaseEmbedService include Gitlab::Utils::StrongMemoize - SEQUENCE = [STAGES::EndpointInserter].freeze + SEQUENCE = [ + STAGES::EndpointInserter, + STAGES::PanelIdsInserter + ].freeze class << self # Determines whether the provided params are sufficient diff --git a/app/services/metrics/dashboard/grafana_metric_embed_service.rb b/app/services/metrics/dashboard/grafana_metric_embed_service.rb index 274057b8262..d58b80162f5 100644 --- a/app/services/metrics/dashboard/grafana_metric_embed_service.rb +++ b/app/services/metrics/dashboard/grafana_metric_embed_service.rb @@ -10,7 +10,8 @@ module Metrics include ReactiveCaching SEQUENCE = [ - ::Gitlab::Metrics::Dashboard::Stages::GrafanaFormatter + ::Gitlab::Metrics::Dashboard::Stages::GrafanaFormatter, + ::Gitlab::Metrics::Dashboard::Stages::PanelIdsInserter ].freeze self.reactive_cache_key = ->(service) { service.cache_key } diff --git a/app/services/metrics/dashboard/predefined_dashboard_service.rb b/app/services/metrics/dashboard/predefined_dashboard_service.rb index 297f00b1be9..f454df63773 100644 --- a/app/services/metrics/dashboard/predefined_dashboard_service.rb +++ b/app/services/metrics/dashboard/predefined_dashboard_service.rb @@ -11,6 +11,7 @@ module Metrics SEQUENCE = [ STAGES::EndpointInserter, + STAGES::PanelIdsInserter, STAGES::Sorter ].freeze diff --git a/app/services/metrics/dashboard/self_monitoring_dashboard_service.rb b/app/services/metrics/dashboard/self_monitoring_dashboard_service.rb index bcdc8a8844f..d97668d1c7c 100644 --- a/app/services/metrics/dashboard/self_monitoring_dashboard_service.rb +++ b/app/services/metrics/dashboard/self_monitoring_dashboard_service.rb @@ -11,6 +11,7 @@ module Metrics SEQUENCE = [ STAGES::CustomMetricsInserter, STAGES::EndpointInserter, + STAGES::PanelIdsInserter, STAGES::Sorter ].freeze diff --git a/app/services/metrics/dashboard/system_dashboard_service.rb b/app/services/metrics/dashboard/system_dashboard_service.rb index 1c9d7f4968a..c28b7b875df 100644 --- a/app/services/metrics/dashboard/system_dashboard_service.rb +++ b/app/services/metrics/dashboard/system_dashboard_service.rb @@ -13,6 +13,7 @@ module Metrics STAGES::CustomMetricsInserter, STAGES::CustomMetricsDetailsInserter, STAGES::EndpointInserter, + STAGES::PanelIdsInserter, STAGES::Sorter ].freeze diff --git a/app/services/tags/create_service.rb b/app/services/tags/create_service.rb index 4de6b2d2774..8a7b98ab944 100644 --- a/app/services/tags/create_service.rb +++ b/app/services/tags/create_service.rb @@ -4,7 +4,7 @@ module Tags class CreateService < BaseService def execute(tag_name, target, message) valid_tag = Gitlab::GitRefValidator.validate(tag_name) - return error('Tag name invalid') unless valid_tag + return error('Tag name invalid', 400) unless valid_tag repository = project.repository message = message&.strip @@ -14,7 +14,7 @@ module Tags begin new_tag = repository.add_tag(current_user, tag_name, target, message) rescue Gitlab::Git::Repository::TagExistsError - return error("Tag #{tag_name} already exists") + return error("Tag #{tag_name} already exists", 409) rescue Gitlab::Git::PreReceiveError => ex return error(ex.message) end @@ -24,7 +24,7 @@ module Tags success.merge(tag: new_tag) else - error("Target #{target} is invalid") + error("Target #{target} is invalid", 400) end end end |