diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/dependency_decisions.yml | 14 | ||||
-rw-r--r-- | config/gitlab.yml.example | 4 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 1 | ||||
-rw-r--r-- | config/initializers/8_metrics.rb | 12 | ||||
-rw-r--r-- | config/initializers/gollum.rb | 28 | ||||
-rw-r--r-- | config/initializers/sidekiq.rb | 10 | ||||
-rw-r--r-- | config/karma.config.js | 9 | ||||
-rw-r--r-- | config/routes.rb | 4 | ||||
-rw-r--r-- | config/routes/admin.rb | 6 | ||||
-rw-r--r-- | config/routes/group.rb | 4 | ||||
-rw-r--r-- | config/routes/project.rb | 5 | ||||
-rw-r--r-- | config/routes/user.rb | 1 | ||||
-rw-r--r-- | config/unicorn.rb.example | 4 | ||||
-rw-r--r-- | config/unicorn.rb.example.development | 4 | ||||
-rw-r--r-- | config/webpack.config.js | 2 |
15 files changed, 46 insertions, 62 deletions
diff --git a/config/dependency_decisions.yml b/config/dependency_decisions.yml index 664035831a5..62760ffee3a 100644 --- a/config/dependency_decisions.yml +++ b/config/dependency_decisions.yml @@ -585,3 +585,17 @@ and are therefore exempt. :versions: [] :when: 2018-08-30 12:06:35.668181000 Z +- - :approve + - caniuse-lite + - :who: Mike Greiling + :why: CC-BY-4.0 license. Tool only used during build process, code is not present + in compiled/distributed product so attribution not needed. + :versions: [] + :when: 2018-10-02 19:23:11.221660000 Z +- - :approve + - node-releases + - :who: Mike Greiling + :why: CC-BY-4.0 license. Tool only used during build process, code is not present + in compiled/distributed product so attribution not needed. + :versions: [] + :when: 2018-10-02 19:23:54.840151000 Z diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 67337f4b82f..a4db125f831 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -210,6 +210,7 @@ production: &base ## GitLab Pages pages: enabled: false + access_control: false # The location where pages are stored (default: shared/pages). # path: shared/pages @@ -771,9 +772,6 @@ test: default: path: tmp/tests/repositories/ gitaly_address: unix:tmp/tests/gitaly/gitaly.socket - broken: - path: tmp/tests/non-existent-repositories - gitaly_address: unix:tmp/tests/gitaly/gitaly.socket gitaly: client_path: tmp/tests/gitaly diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 0caa4962128..bd02b85c7ce 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -200,6 +200,7 @@ Settings.registry['path'] = Settings.absolute(Settings.registry['path # Settings['pages'] ||= Settingslogic.new({}) Settings.pages['enabled'] = false if Settings.pages['enabled'].nil? +Settings.pages['access_control'] = false if Settings.pages['access_control'].nil? Settings.pages['path'] = Settings.absolute(Settings.pages['path'] || File.join(Settings.shared['path'], "pages")) Settings.pages['https'] = false if Settings.pages['https'].nil? Settings.pages['host'] ||= "example.com" diff --git a/config/initializers/8_metrics.rb b/config/initializers/8_metrics.rb index 4d8d35bf6cf..eccf82ab8dc 100644 --- a/config/initializers/8_metrics.rb +++ b/config/initializers/8_metrics.rb @@ -3,7 +3,6 @@ # that we can stub it for testing, as it is only called when metrics are # enabled. # -# rubocop:disable Metrics/AbcSize def instrument_classes(instrumentation) instrumentation.instrument_instance_methods(Gitlab::Shell) @@ -48,16 +47,6 @@ def instrument_classes(instrumentation) instrumentation.instrument_methods(Premailer::Adapter::Nokogiri) instrumentation.instrument_instance_methods(Premailer::Adapter::Nokogiri) - [ - :Blame, :Branch, :BranchCollection, :Blob, :Commit, :Diff, :Repository, - :Tag, :TagCollection, :Tree - ].each do |name| - const = Rugged.const_get(name) - - instrumentation.instrument_methods(const) - instrumentation.instrument_instance_methods(const) - end - instrumentation.instrument_methods(Banzai::Renderer) instrumentation.instrument_methods(Banzai::Querying) @@ -101,7 +90,6 @@ def instrument_classes(instrumentation) # Needed for https://gitlab.com/gitlab-org/gitlab-ce/issues/30224#note_32306159 instrumentation.instrument_instance_method(MergeRequestDiff, :load_commits) end -# rubocop:enable Metrics/AbcSize # With prometheus enabled by default this breaks all specs # that stubs methods using `any_instance_of` for the models reloaded here. diff --git a/config/initializers/gollum.rb b/config/initializers/gollum.rb deleted file mode 100644 index ea9cc151a57..00000000000 --- a/config/initializers/gollum.rb +++ /dev/null @@ -1,28 +0,0 @@ -# WARNING changes in this file must be manually propagated to gitaly-ruby. -# -# https://gitlab.com/gitlab-org/gitaly/blob/master/ruby/lib/gitlab/gollum.rb - -module Gollum - GIT_ADAPTER = "rugged".freeze -end -require "gollum-lib" - -module Gollum - class Page - def text_data(encoding = nil) - data = if raw_data.respond_to?(:encoding) - raw_data.force_encoding(encoding || Encoding::UTF_8) - else - raw_data - end - - Gitlab::EncodingHelper.encode!(data) - end - end -end - -Rails.application.configure do - config.after_initialize do - Gollum::Page.per_page = Kaminari.config.default_per_page - end -end diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 6c1079faad1..bc6b7aed6aa 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -40,6 +40,10 @@ Sidekiq.configure_server do |config| ActiveRecord::Base.clear_all_connections! end + if Feature.enabled?(:gitlab_sidekiq_reliable_fetcher) + Sidekiq::ReliableFetcher.setup_reliable_fetch!(config) + end + # Sidekiq-cron: load recurring jobs from gitlab.yml # UGLY Hack to get nested hash from settingslogic cron_jobs = JSON.parse(Gitlab.config.cron_jobs.to_json) @@ -57,10 +61,10 @@ Sidekiq.configure_server do |config| Gitlab::SidekiqVersioning.install! - config = Gitlab::Database.config || + db_config = Gitlab::Database.config || Rails.application.config.database_configuration[Rails.env] - config['pool'] = Sidekiq.options[:concurrency] - ActiveRecord::Base.establish_connection(config) + db_config['pool'] = Sidekiq.options[:concurrency] + ActiveRecord::Base.establish_connection(db_config) Rails.logger.debug("Connection Pool size for Sidekiq Server is now: #{ActiveRecord::Base.connection.pool.instance_variable_get('@size')}") # Avoid autoload issue such as 'Mail::Parsers::AddressStruct' diff --git a/config/karma.config.js b/config/karma.config.js index 74dc5c13c70..e1d7c30b1c2 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -22,6 +22,13 @@ webpackConfig.optimization.splitChunks = false; // use quicker sourcemap option webpackConfig.devtool = 'cheap-inline-source-map'; +// set BABEL_ENV to indicate when we're running code coverage +webpackConfig.plugins.push( + new webpack.DefinePlugin({ + 'process.env.BABEL_ENV': JSON.stringify(process.env.BABEL_ENV || process.env.NODE_ENV || null), + }) +); + const specFilters = argumentsParser .option( '-f, --filter-spec [filter]', @@ -84,7 +91,7 @@ module.exports = function(config) { basePath: ROOT_PATH, browsers: ['ChromeHeadlessCustom'], client: { - color: !process.env.CI + color: !process.env.CI, }, customLaunchers: { ChromeHeadlessCustom: { diff --git a/config/routes.rb b/config/routes.rb index 1242bbbf932..c081ca9672a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -56,7 +56,6 @@ Rails.application.routes.draw do # '/-/health' implemented by BasicHealthMiddleware get 'liveness' => 'health#liveness' get 'readiness' => 'health#readiness' - post 'storage_check' => 'health#storage_check' resources :metrics, only: [:index] mount Peek::Railtie => '/peek', as: 'peek_routes' @@ -82,9 +81,6 @@ Rails.application.routes.draw do draw :instance_statistics end - # Koding route - get 'koding' => 'koding#index' - draw :api draw :sidekiq draw :help diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 7489b01ded6..fb29c4748c1 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -69,9 +69,7 @@ namespace :admin do end resource :logs, only: [:show] - resource :health_check, controller: 'health_check', only: [:show] do - post :reset_storage_health - end + resource :health_check, controller: 'health_check', only: [:show] resource :background_jobs, controller: 'background_jobs', only: [:show] resource :system_info, controller: 'system_info', only: [:show] resources :requests_profiles, only: [:index, :show], param: :name, constraints: { name: /.+\.html/ } @@ -107,7 +105,7 @@ namespace :admin do resource :application_settings, only: [:show, :update] do resources :services, only: [:index, :edit, :update] get :usage_data - put :reset_runners_token + put :reset_registration_token put :reset_health_check_token put :clear_repository_check_states get :integrations, :repository, :templates, :ci_cd, :reporting, :metrics_and_profiling, :network, :geo, :preferences diff --git a/config/routes/group.rb b/config/routes/group.rb index 893ec8a4e58..602bbe837cf 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -27,7 +27,9 @@ constraints(::Constraints::GroupUrlConstrainer.new) do as: :group, constraints: { group_id: Gitlab::PathRegex.full_namespace_route_regex }) do namespace :settings do - resource :ci_cd, only: [:show], controller: 'ci_cd' + resource :ci_cd, only: [:show], controller: 'ci_cd' do + put :reset_registration_token + end end resource :variables, only: [:show, :update] diff --git a/config/routes/project.rb b/config/routes/project.rb index 8a5310b5c23..9cbd5b644f6 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -32,6 +32,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get 'labels' get 'milestones' get 'commands' + get 'snippets' end end @@ -275,6 +276,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do member do get :status post :cancel + post :unschedule post :retry post :play post :erase @@ -365,7 +367,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get :discussions, format: :json end collection do - post :bulk_update + post :bulk_update end end @@ -437,6 +439,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get :members, to: redirect("%{namespace_id}/%{project_id}/project_members") resource :ci_cd, only: [:show, :update], controller: 'ci_cd' do post :reset_cache + put :reset_registration_token end resource :integrations, only: [:show] resource :repository, only: [:show], controller: :repository do diff --git a/config/routes/user.rb b/config/routes/user.rb index bc7df5e7584..e0ae264e2c0 100644 --- a/config/routes/user.rb +++ b/config/routes/user.rb @@ -45,6 +45,7 @@ scope(constraints: { username: Gitlab::PathRegex.root_namespace_route_regex }) d get :contributed, as: :contributed_projects get :snippets get :exists + get :activity get '/', to: redirect('%{username}'), as: nil end diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example index 020e9a00d87..e06cce3e97a 100644 --- a/config/unicorn.rb.example +++ b/config/unicorn.rb.example @@ -95,7 +95,7 @@ end before_fork do |server, worker| # the following is highly recommended for Rails + "preload_app true" # as there's no need for the master process to hold a connection - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect! # The following is only recommended for memory/DB-constrained @@ -133,7 +133,7 @@ after_fork do |server, worker| # server.listen(addr, :tries => -1, :delay => 5, :tcp_nopush => true) # the following is *required* for Rails + "preload_app true", - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection # reset prometheus client, this will cause any opened metrics files to be closed diff --git a/config/unicorn.rb.example.development b/config/unicorn.rb.example.development index 5712549a66d..f31df66015a 100644 --- a/config/unicorn.rb.example.development +++ b/config/unicorn.rb.example.development @@ -7,7 +7,7 @@ check_client_connection false before_fork do |server, worker| # the following is highly recommended for Rails + "preload_app true" # as there's no need for the master process to hold a connection - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect! if /darwin/ =~ RUBY_PLATFORM @@ -27,6 +27,6 @@ after_fork do |server, worker| require 'rbtrace' if ENV['ENABLE_RBTRACE'] # the following is *required* for Rails + "preload_app true", - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection end diff --git a/config/webpack.config.js b/config/webpack.config.js index 583f05f2fb7..9ecae9790fd 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -8,7 +8,7 @@ const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const ROOT_PATH = path.resolve(__dirname, '..'); -const CACHE_PATH = path.join(ROOT_PATH, 'tmp/cache'); +const CACHE_PATH = process.env.WEBPACK_CACHE_PATH || path.join(ROOT_PATH, 'tmp/cache'); const IS_PRODUCTION = process.env.NODE_ENV === 'production'; const IS_DEV_SERVER = process.argv.join(' ').indexOf('webpack-dev-server') !== -1; const DEV_SERVER_HOST = process.env.DEV_SERVER_HOST || 'localhost'; |