Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
commit1078b7bf25c2cb6e03c57da9ae25b0512858556f (patch)
treea50fbfaddb22aca89055296c4c532c7ecb2b1ca0 /lib/gitlab/database_importers
parent55733b19c526145cceb120e8bb874d476a84383a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/database_importers')
-rw-r--r--lib/gitlab/database_importers/self_monitoring/project/create_service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab/database_importers/self_monitoring/project/create_service.rb b/lib/gitlab/database_importers/self_monitoring/project/create_service.rb
index ef2e4055c62..039e85b3f6c 100644
--- a/lib/gitlab/database_importers/self_monitoring/project/create_service.rb
+++ b/lib/gitlab/database_importers/self_monitoring/project/create_service.rb
@@ -74,6 +74,15 @@ module Gitlab
)
if response
+ # In the add_prometheus_manual_configuration method, the Prometheus
+ # listen_address config is saved as an api_url in the PrometheusService
+ # model. There are validates hooks in the PrometheusService model that
+ # check if the project associated with the PrometheusService is the
+ # self_monitoring project. It checks
+ # Gitlab::CurrentSettings.self_monitoring_project_id, which is why the
+ # Gitlab::CurrentSettings cache needs to be expired here, so that
+ # PrometheusService sees the latest self_monitoring_project_id.
+ Gitlab::CurrentSettings.expire_current_application_settings
success(result)
else
log_error("Could not save instance administration project ID, errors: %{errors}" % { errors: application_settings.errors.full_messages })