summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 18:38:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 18:38:24 +0000
commit983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch)
treeb153cd387c14ba23bd5a07514c7c01fddf6a78a0 /config
parenta2bddee2cdb38673df0e004d5b32d9f77797de64 (diff)
downloadgitlab-ce-983a0bba5d2a042c4a3bbb22432ec192c7501d82.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example5
-rw-r--r--config/initializers/1_settings.rb4
-rw-r--r--config/initializers/7_prometheus_metrics.rb4
-rw-r--r--config/initializers/lograge.rb4
-rw-r--r--config/routes.rb7
-rw-r--r--config/routes/issues.rb1
-rw-r--r--config/routes/project.rb4
-rw-r--r--config/routes/repository.rb3
-rw-r--r--config/routes/repository_scoped.rb6
-rw-r--r--config/sidekiq_queues.yml2
10 files changed, 28 insertions, 12 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index b66389b1a6f..090ec9265df 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -477,11 +477,6 @@ production: &base
elastic_index_bulk_cron_worker:
cron: "*/1 * * * *"
- # Elasticsearch metrics
- # NOTE: This will only take effect if Elasticsearch is enabled.
- elastic_metrics_update_worker:
- cron: "*/1 * * * *"
-
registry:
# enabled: true
# host: registry.example.com
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 68406049358..c3fcd0f8ff0 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -546,9 +546,6 @@ Gitlab.ee do
Settings.cron_jobs['elastic_index_bulk_cron_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['elastic_index_bulk_cron_worker']['cron'] ||= '*/1 * * * *'
Settings.cron_jobs['elastic_index_bulk_cron_worker']['job_class'] ||= 'ElasticIndexBulkCronWorker'
- Settings.cron_jobs['elastic_metrics_update_worker'] ||= Settingslogic.new({})
- Settings.cron_jobs['elastic_metrics_update_worker']['cron'] ||= '*/1 * * * *'
- Settings.cron_jobs['elastic_metrics_update_worker']['job_class'] ||= 'ElasticMetricsUpdateWorker'
Settings.cron_jobs['sync_seat_link_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['sync_seat_link_worker']['cron'] ||= "#{rand(60)} 0 * * *"
Settings.cron_jobs['sync_seat_link_worker']['job_class'] = 'SyncSeatLinkWorker'
@@ -725,6 +722,7 @@ Settings.monitoring['ip_whitelist'] ||= ['127.0.0.1/8']
Settings.monitoring['unicorn_sampler_interval'] ||= 10
Settings.monitoring['puma_sampler_interval'] ||= 5
Settings.monitoring['ruby_sampler_interval'] ||= 60
+Settings.monitoring['global_search_sampler_interval'] ||= 60
Settings.monitoring['sidekiq_exporter'] ||= Settingslogic.new({})
Settings.monitoring.sidekiq_exporter['enabled'] ||= false
Settings.monitoring.sidekiq_exporter['address'] ||= 'localhost'
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb
index aa2601ea650..3ad90ad7d65 100644
--- a/config/initializers/7_prometheus_metrics.rb
+++ b/config/initializers/7_prometheus_metrics.rb
@@ -43,6 +43,10 @@ if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled?
defined?(::Prometheus::Client.reinitialize_on_pid_change) && Prometheus::Client.reinitialize_on_pid_change
Gitlab::Metrics::Samplers::RubySampler.initialize_instance(Settings.monitoring.ruby_sampler_interval).start
+
+ if Gitlab.ee? && Gitlab::Runtime.sidekiq?
+ Gitlab::Metrics::Samplers::GlobalSearchSampler.instance(Settings.monitoring.global_search_sampler_interval).start
+ end
rescue IOError => e
Gitlab::ErrorTracking.track_exception(e)
Gitlab::Metrics.error_detected!
diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb
index 6ba2fa39aa6..e1e15d1870c 100644
--- a/config/initializers/lograge.rb
+++ b/config/initializers/lograge.rb
@@ -12,6 +12,10 @@ unless Gitlab::Runtime.sidekiq?
config.lograge.logger = ActiveSupport::Logger.new(filename)
config.lograge.before_format = lambda do |data, payload|
data.delete(:error)
+ data[:db_duration_s] = Gitlab::Utils.ms_to_round_sec(data.delete(:db))
+ data[:view_duration_s] = Gitlab::Utils.ms_to_round_sec(data.delete(:view))
+ data[:duration_s] = Gitlab::Utils.ms_to_round_sec(data.delete(:duration))
+
data
end
diff --git a/config/routes.rb b/config/routes.rb
index c4a1f693048..097814d90a7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -53,6 +53,8 @@ Rails.application.routes.draw do
Gitlab.ee do
get '/autocomplete/project_groups' => 'autocomplete#project_groups'
+ get '/autocomplete/project_routes' => 'autocomplete#project_routes'
+ get '/autocomplete/namespace_routes' => 'autocomplete#namespace_routes'
end
# Sign up
@@ -157,6 +159,11 @@ Rails.application.routes.draw do
# Spam reports
resources :abuse_reports, only: [:new, :create]
+
+ # JWKS (JSON Web Key Set) endpoint
+ # Used by third parties to verify CI_JOB_JWT, placeholder route
+ # in case we decide to move away from doorkeeper-openid_connect
+ get 'jwks' => 'doorkeeper/openid_connect/discovery#keys'
end
# End of the /-/ scope.
diff --git a/config/routes/issues.rb b/config/routes/issues.rb
index 9ac69975690..51b4637b89f 100644
--- a/config/routes/issues.rb
+++ b/config/routes/issues.rb
@@ -18,5 +18,6 @@ resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do
collection do
post :bulk_update
post :import_csv
+ post :export_csv
end
end
diff --git a/config/routes/project.rb b/config/routes/project.rb
index ab7c439318f..1ce889dd578 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -26,10 +26,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
scope '-' do
get 'archive/*id', constraints: { format: Gitlab::PathRegex.archive_formats_regex, id: /.+?/ }, to: 'repositories#archive', as: 'archive'
- scope controller: :static_site_editor do
- get '/sse/*id', action: :show, as: :show_sse
- end
-
resources :artifacts, only: [:index, :destroy]
resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do
diff --git a/config/routes/repository.rb b/config/routes/repository.rb
index 38d6cdbbaf8..eec204f2870 100644
--- a/config/routes/repository.rb
+++ b/config/routes/repository.rb
@@ -21,6 +21,9 @@ resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do
end
end
+# NOTE: Add new routes to repository_scoped.rb instead (see
+# https://docs.gitlab.com/ee/development/routing.html#project-routes).
+#
# Don't use format parameter as file extension (old 3.0.x behavior)
# See http://guides.rubyonrails.org/routing.html#route-globbing-and-wildcard-segments
scope format: false do
diff --git a/config/routes/repository_scoped.rb b/config/routes/repository_scoped.rb
index c6343039d62..42ec8ca1806 100644
--- a/config/routes/repository_scoped.rb
+++ b/config/routes/repository_scoped.rb
@@ -30,5 +30,11 @@ scope format: false do
resources :protected_branches, only: [:index, :show, :create, :update, :destroy, :patch], constraints: { id: Gitlab::PathRegex.git_reference_regex }
resources :protected_tags, only: [:index, :show, :create, :update, :destroy]
+
+ scope constraints: { id: /[^\0]+/ } do
+ scope controller: :static_site_editor do
+ get '/sse/*id', action: :show, as: :show_sse
+ end
+ end
end
end
diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml
index bc7eff9d181..9e446cd1b9a 100644
--- a/config/sidekiq_queues.yml
+++ b/config/sidekiq_queues.yml
@@ -44,6 +44,8 @@
- 2
- - chat_notification
- 2
+- - ci_batch_reset_minutes
+ - 1
- - container_repository
- 1
- - create_commit_signature