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
path: root/lib/tasks
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /lib/tasks
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/ci/build_artifacts.rake20
-rw-r--r--lib/tasks/dev.rake52
-rw-r--r--lib/tasks/gitlab/background_migrations.rake6
-rw-r--r--lib/tasks/gitlab/db.rake124
-rw-r--r--lib/tasks/gitlab/db/validate_config.rake113
-rw-r--r--lib/tasks/gitlab/refresh_project_statistics_build_artifacts_size.rake36
-rw-r--r--lib/tasks/gitlab/setup.rake22
-rw-r--r--lib/tasks/gitlab/tw/codeowners.rake23
-rw-r--r--lib/tasks/gitlab_danger.rake19
9 files changed, 290 insertions, 125 deletions
diff --git a/lib/tasks/ci/build_artifacts.rake b/lib/tasks/ci/build_artifacts.rake
deleted file mode 100644
index 4f4faef5a62..00000000000
--- a/lib/tasks/ci/build_artifacts.rake
+++ /dev/null
@@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-require 'httparty'
-require 'csv'
-
-namespace :ci do
- namespace :build_artifacts do
- desc "GitLab | CI | Fetch projects with incorrect artifact size on GitLab.com"
- task :project_with_incorrect_artifact_size do
- csv_url = ENV['SISENSE_PROJECT_IDS_WITH_INCORRECT_ARTIFACTS_URL']
-
- # rubocop: disable Gitlab/HTTParty
- body = HTTParty.get(csv_url)
- # rubocop: enable Gitlab/HTTParty
-
- table = CSV.parse(body.parsed_response, headers: true)
- puts table['PROJECT_ID'].join(' ')
- end
- end
-end
diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake
index 99ffeb4ec0b..42b12cd0ae3 100644
--- a/lib/tasks/dev.rake
+++ b/lib/tasks/dev.rake
@@ -10,7 +10,12 @@ namespace :dev do
Gitlab::Database::EachDatabase.each_database_connection do |connection|
# Make sure DB statistics are up to date.
+ # gitlab:setup task can insert quite a bit of data, especially with MASS_INSERT=1
+ # so ANALYZE can take more than default 15s statement timeout. This being a dev task,
+ # we disable the statement timeout for ANALYZE to run and enable it back afterwards.
+ connection.execute('SET statement_timeout TO 0')
connection.execute('ANALYZE')
+ connection.execute('RESET statement_timeout')
end
Rake::Task["gitlab:shell:setup"].invoke
@@ -21,4 +26,51 @@ namespace :dev do
Rails.configuration.eager_load = true
Rails.application.eager_load!
end
+
+ # If there are any clients connected to the DB, PostgreSQL won't let
+ # you drop the database. It's possible that Sidekiq, Puma, or
+ # some other client will be hanging onto a connection, preventing
+ # the DROP DATABASE from working. To workaround this problem, this
+ # method terminates all the connections so that a subsequent DROP
+ # will work.
+ desc "Used to drop all connections in development"
+ task :terminate_all_connections do
+ # In production, we might want to prevent ourselves from shooting
+ # ourselves in the foot, so let's only do this in a test or
+ # development environment.
+ unless Rails.env.production?
+ cmd = <<~SQL
+ SELECT pg_terminate_backend(pg_stat_activity.pid)
+ FROM pg_stat_activity
+ WHERE datname = current_database()
+ AND pid <> pg_backend_pid();
+ SQL
+
+ Gitlab::Database::EachDatabase.each_database_connection(include_shared: false) do |connection|
+ connection.execute(cmd)
+ rescue ActiveRecord::NoDatabaseError
+ end
+ end
+ end
+
+ databases = ActiveRecord::Tasks::DatabaseTasks.setup_initial_database_yaml
+
+ namespace :copy_db do
+ ALLOWED_DATABASES = %w[ci].freeze
+
+ ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name|
+ next unless ALLOWED_DATABASES.include?(name)
+
+ desc "Copies the #{name} database from the main database"
+ task name => :environment do
+ Rake::Task["dev:terminate_all_connections"].invoke
+
+ db_config = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env, name: name)
+
+ ApplicationRecord.connection.create_database(db_config.database, template: ApplicationRecord.connection_db_config.database)
+ rescue ActiveRecord::DatabaseAlreadyExists
+ warn "Database '#{db_config.database}' already exists"
+ end
+ end
+ end
end
diff --git a/lib/tasks/gitlab/background_migrations.rake b/lib/tasks/gitlab/background_migrations.rake
index b1084495f3d..e0699d5eb41 100644
--- a/lib/tasks/gitlab/background_migrations.rake
+++ b/lib/tasks/gitlab/background_migrations.rake
@@ -80,8 +80,8 @@ namespace :gitlab do
def display_migration_status(database_name, connection)
Gitlab::Database::SharedModel.using_connection(connection) do
- statuses = Gitlab::Database::BackgroundMigration::BatchedMigration.statuses
- max_status_length = statuses.keys.map(&:length).max
+ valid_status = Gitlab::Database::BackgroundMigration::BatchedMigration.valid_status
+ max_status_length = valid_status.map(&:length).max
format_string = "%-#{max_status_length}s | %s\n"
puts "Database: #{database_name}\n"
@@ -94,7 +94,7 @@ namespace :gitlab do
migration.job_arguments.to_json
].join(',')
- printf(format_string, migration.status, identification_fields)
+ printf(format_string, migration.status_name, identification_fields)
end
end
end
diff --git a/lib/tasks/gitlab/db.rake b/lib/tasks/gitlab/db.rake
index 50ceb11581e..3a7e53a27e4 100644
--- a/lib/tasks/gitlab/db.rake
+++ b/lib/tasks/gitlab/db.rake
@@ -2,6 +2,14 @@
databases = ActiveRecord::Tasks::DatabaseTasks.setup_initial_database_yaml
+def each_database(databases, include_geo: false)
+ ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |database|
+ next if !include_geo && database == 'geo'
+
+ yield database
+ end
+end
+
namespace :gitlab do
namespace :db do
desc 'GitLab | DB | Manually insert schema migration version on all configured databases'
@@ -10,10 +18,10 @@ namespace :gitlab do
end
namespace :mark_migration_complete do
- ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |database|
- desc "Gitlab | DB | Manually insert schema migration version on #{database} database"
- task database, [:version] => :environment do |_, args|
- mark_migration_complete(args[:version], only_on: database)
+ each_database(databases) do |database_name|
+ desc "Gitlab | DB | Manually insert schema migration version on #{database_name} database"
+ task database_name, [:version] => :environment do |_, args|
+ mark_migration_complete(args[:version], only_on: database_name)
end
end
end
@@ -39,10 +47,10 @@ namespace :gitlab do
end
namespace :drop_tables do
- ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |database|
- desc "GitLab | DB | Drop all tables on the #{database} database"
- task database => :environment do
- drop_tables(only_on: database)
+ each_database(databases) do |database_name|
+ desc "GitLab | DB | Drop all tables on the #{database_name} database"
+ task database_name => :environment do
+ drop_tables(only_on: database_name)
end
end
end
@@ -76,16 +84,38 @@ namespace :gitlab do
desc 'GitLab | DB | Configures the database by running migrate, or by loading the schema and seeding if needed'
task configure: :environment do
- # Check if we have existing db tables
- # The schema_migrations table will still exist if drop_tables was called
- if ActiveRecord::Base.connection.tables.count > 1
- Rake::Task['db:migrate'].invoke
+ databases_with_tasks = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env)
+
+ databases_loaded = []
+
+ if databases_with_tasks.size == 1
+ next unless databases_with_tasks.first.name == 'main'
+
+ connection = Gitlab::Database.database_base_models['main'].connection
+ databases_loaded << configure_database(connection)
else
- # Add post-migrate paths to ensure we mark all migrations as up
+ Gitlab::Database.database_base_models.each do |name, model|
+ next unless databases_with_tasks.any? { |db_with_tasks| db_with_tasks.name == name }
+
+ databases_loaded << configure_database(model.connection, database_name: name)
+ end
+ end
+
+ Rake::Task['db:seed_fu'].invoke if databases_loaded.present? && databases_loaded.all?
+ end
+
+ def configure_database(connection, database_name: nil)
+ database_name = ":#{database_name}" if database_name
+ load_database = connection.tables.count <= 1
+
+ if load_database
Gitlab::Database.add_post_migrate_path_to_rails(force: true)
- Rake::Task['db:structure:load'].invoke
- Rake::Task['db:seed_fu'].invoke
+ Rake::Task["db:schema:load#{database_name}"].invoke
+ else
+ Rake::Task["db:migrate#{database_name}"].invoke
end
+
+ load_database
end
desc 'GitLab | DB | Run database migrations and print `unattended_migrations_completed` if action taken'
@@ -155,6 +185,15 @@ namespace :gitlab do
Gitlab::Database::Partitioning.sync_partitions
end
+ namespace :create_dynamic_partitions do
+ each_database(databases) do |database_name|
+ desc "Create missing dynamic database partitions on the #{database_name} database"
+ task database_name => :environment do
+ Gitlab::Database::Partitioning.sync_partitions(only_on: database_name)
+ end
+ end
+ end
+
# This is targeted towards deploys and upgrades of GitLab.
# Since we're running migrations already at this time,
# we also check and create partitions as needed here.
@@ -162,14 +201,12 @@ namespace :gitlab do
Rake::Task['gitlab:db:create_dynamic_partitions'].invoke
end
- ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name|
- # We'll temporarily skip this enhancement for geo, since in some situations we
- # wish to setup the geo database before the other databases have been setup,
- # and partition management attempts to connect to the main database.
- next if name == 'geo'
-
- Rake::Task["db:migrate:#{name}"].enhance do
- Rake::Task['gitlab:db:create_dynamic_partitions'].invoke
+ # We'll temporarily skip this enhancement for geo, since in some situations we
+ # wish to setup the geo database before the other databases have been setup,
+ # and partition management attempts to connect to the main database.
+ each_database(databases) do |database_name|
+ Rake::Task["db:migrate:#{database_name}"].enhance do
+ Rake::Task["gitlab:db:create_dynamic_partitions:#{database_name}"].invoke
end
end
@@ -185,25 +222,17 @@ namespace :gitlab do
Rake::Task['gitlab:db:create_dynamic_partitions'].invoke
end
- ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name|
- # We'll temporarily skip this enhancement for geo, since in some situations we
- # wish to setup the geo database before the other databases have been setup,
- # and partition management attempts to connect to the main database.
- next if name == 'geo'
-
- Rake::Task["db:schema:load:#{name}"].enhance do
- Rake::Task['gitlab:db:create_dynamic_partitions'].invoke
+ # We'll temporarily skip this enhancement for geo, since in some situations we
+ # wish to setup the geo database before the other databases have been setup,
+ # and partition management attempts to connect to the main database.
+ each_database(databases) do |database_name|
+ # :nocov:
+ Rake::Task["db:schema:load:#{database_name}"].enhance do
+ Rake::Task["gitlab:db:create_dynamic_partitions:#{database_name}"].invoke
end
+ # :nocov:
end
- desc "Clear all connections"
- task :clear_all_connections do
- ActiveRecord::Base.clear_all_connections!
- end
-
- Rake::Task['db:test:purge'].enhance(['gitlab:db:clear_all_connections'])
- Rake::Task['db:drop'].enhance(['gitlab:db:clear_all_connections'])
-
# During testing, db:test:load restores the database schema from scratch
# which does not include dynamic partitions. We cannot rely on application
# initializers here as the application can continue to run while
@@ -229,7 +258,7 @@ namespace :gitlab do
end
namespace :reindex do
- ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |database_name|
+ each_database(databases) do |database_name|
desc "Reindex #{database_name} database without downtime to eliminate bloat"
task database_name => :environment do
unless Gitlab::Database::Reindexing.enabled?
@@ -292,13 +321,22 @@ namespace :gitlab do
task down: :environment do
Gitlab::Database::Migrations::Runner.down.run
end
+
+ desc 'Sample traditional background migrations with instrumentation'
+ task :sample_background_migrations, [:duration_s] => [:environment] do |_t, args|
+ duration = args[:duration_s]&.to_i&.seconds || 30.minutes # Default of 30 minutes
+
+ Gitlab::Database::Migrations::Runner.background_migrations.run_jobs(for_duration: duration)
+ end
end
desc 'Run all pending batched migrations'
task execute_batched_migrations: :environment do
- Gitlab::Database::BackgroundMigration::BatchedMigration.active.queue_order.each do |migration|
- Gitlab::AppLogger.info("Executing batched migration #{migration.id} inline")
- Gitlab::Database::BackgroundMigration::BatchedMigrationRunner.new.run_entire_migration(migration)
+ Gitlab::Database::EachDatabase.each_database_connection do |connection, name|
+ Gitlab::Database::BackgroundMigration::BatchedMigration.with_status(:active).queue_order.each do |migration|
+ Gitlab::AppLogger.info("Executing batched migration #{migration.id} on database #{name} inline")
+ Gitlab::Database::BackgroundMigration::BatchedMigrationRunner.new(connection: connection).run_entire_migration(migration)
+ end
end
end
diff --git a/lib/tasks/gitlab/db/validate_config.rake b/lib/tasks/gitlab/db/validate_config.rake
new file mode 100644
index 00000000000..cc5f6bb6e09
--- /dev/null
+++ b/lib/tasks/gitlab/db/validate_config.rake
@@ -0,0 +1,113 @@
+# frozen_string_literal: true
+
+databases = ActiveRecord::Tasks::DatabaseTasks.setup_initial_database_yaml
+
+namespace :gitlab do
+ namespace :db do
+ desc 'Validates `config/database.yml` to ensure a correct behavior is configured'
+ task validate_config: :environment do
+ original_db_config = ActiveRecord::Base.connection_db_config
+
+ # The include_replicas: is a legacy name to fetch all hidden entries (replica: true or database_tasks: false)
+ # Once we upgrade to Rails 7.x this should be changed to `include_hidden: true`
+ # Ref.: https://github.com/rails/rails/blob/f2d9316ba965e150ad04596085ee10eea4f58d3e/activerecord/lib/active_record/database_configurations.rb#L48
+ db_configs = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env, include_replicas: true)
+ db_configs = db_configs.reject(&:replica?)
+
+ # Map each database connection into unique identifier of system+database
+ all_connections = db_configs.map do |db_config|
+ identifier =
+ begin
+ ActiveRecord::Base.establish_connection(db_config) # rubocop: disable Database/EstablishConnection
+ ActiveRecord::Base.connection.select_one("SELECT system_identifier, current_database() FROM pg_control_system()")
+ rescue ActiveRecord::ConnectionNotEstablished, PG::ConnectionBad => err
+ warn "WARNING: Could not establish database connection for #{db_config.name}: #{err.message}"
+ rescue ActiveRecord::NoDatabaseError
+ end
+
+ {
+ name: db_config.name,
+ config: db_config,
+ database_tasks?: db_config.database_tasks?,
+ identifier: identifier
+ }
+ end.compact
+
+ unique_connections = all_connections.group_by { |connection| connection[:identifier] }
+ primary_connection = all_connections.find { |connection| ActiveRecord::Base.configurations.primary?(connection[:name]) }
+ named_connections = all_connections.index_by { |connection| connection[:name] }
+
+ warnings = []
+
+ # The `main:` should always have `database_tasks: true`
+ unless primary_connection[:database_tasks?]
+ warnings << "- The '#{primary_connection[:name]}' is required to use 'database_tasks: true'"
+ end
+
+ # Each unique database should have exactly one configuration with `database_tasks: true`
+ unique_connections.each do |identifier, connections|
+ next unless identifier
+
+ connections_with_tasks = connections.select { |connection| connection[:database_tasks?] }
+ if connections_with_tasks.many?
+ names = connections_with_tasks.pluck(:name)
+
+ warnings << "- Many configurations (#{names.join(', ')}) " \
+ "share the same database (#{identifier}). " \
+ "This will result in failures provisioning or migrating this database. " \
+ "Ensure that additional databases are configured " \
+ "with 'database_tasks: false' or are pointing to a dedicated database host."
+ end
+ end
+
+ # Each configuration with `database_tasks: false` should share the database with `main:`
+ all_connections.each do |connection|
+ share_with = Gitlab::Database.db_config_share_with(connection[:config])
+ next unless share_with
+
+ shared_connection = named_connections[share_with]
+ unless shared_connection
+ warnings << "- The '#{connection[:name]}' is expecting to share configuration with '#{share_with}', " \
+ "but no such is to be found."
+ next
+ end
+
+ # Skip if databases are yet to be provisioned
+ next unless connection[:identifier] && shared_connection[:identifier]
+
+ unless connection[:identifier] == shared_connection[:identifier]
+ warnings << "- The '#{connection[:name]}' since it is using 'database_tasks: false' " \
+ "should share database with '#{share_with}:'."
+ end
+ end
+
+ if warnings.any?
+ warnings.unshift("Database config validation failure:")
+
+ # Warn (for now) by default in production environment
+ if Gitlab::Utils.to_boolean(ENV['GITLAB_VALIDATE_DATABASE_CONFIG'], default: true)
+ warnings << "Use `export GITLAB_VALIDATE_DATABASE_CONFIG=0` to ignore this validation."
+
+ raise warnings.join("\n")
+ else
+ warnings << "Use `export GITLAB_VALIDATE_DATABASE_CONFIG=1` to enforce this validation."
+
+ warn warnings.join("\n")
+ end
+ end
+
+ ensure
+ ActiveRecord::Base.establish_connection(original_db_config) # rubocop: disable Database/EstablishConnection
+ end
+
+ Rake::Task['db:migrate'].enhance(['gitlab:db:validate_config'])
+ Rake::Task['db:schema:load'].enhance(['gitlab:db:validate_config'])
+ Rake::Task['db:schema:dump'].enhance(['gitlab:db:validate_config'])
+
+ ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name|
+ Rake::Task["db:migrate:#{name}"].enhance(['gitlab:db:validate_config'])
+ Rake::Task["db:schema:load:#{name}"].enhance(['gitlab:db:validate_config'])
+ Rake::Task["db:schema:dump:#{name}"].enhance(['gitlab:db:validate_config'])
+ end
+ end
+end
diff --git a/lib/tasks/gitlab/refresh_project_statistics_build_artifacts_size.rake b/lib/tasks/gitlab/refresh_project_statistics_build_artifacts_size.rake
index 1cc18d14d78..203d500b616 100644
--- a/lib/tasks/gitlab/refresh_project_statistics_build_artifacts_size.rake
+++ b/lib/tasks/gitlab/refresh_project_statistics_build_artifacts_size.rake
@@ -1,23 +1,43 @@
# frozen_string_literal: true
+require 'httparty'
+require 'csv'
+
namespace :gitlab do
- desc "GitLab | Refresh build artifacts size project statistics for given project IDs"
+ desc "GitLab | Refresh build artifacts size project statistics for given list of Project IDs from remote CSV"
BUILD_ARTIFACTS_SIZE_REFRESH_ENQUEUE_BATCH_SIZE = 500
- task :refresh_project_statistics_build_artifacts_size, [:project_ids] => :environment do |_t, args|
- project_ids = []
- project_ids = $stdin.read.split unless $stdin.tty?
- project_ids = args.project_ids.to_s.split unless project_ids.any?
+ task :refresh_project_statistics_build_artifacts_size, [:csv_url] => :environment do |_t, args|
+ csv_url = args.csv_url
+
+ # rubocop: disable Gitlab/HTTParty
+ body = HTTParty.get(csv_url)
+ # rubocop: enable Gitlab/HTTParty
+
+ table = CSV.parse(body.to_s, headers: true)
+ project_ids = table['PROJECT_ID']
+
+ puts "Loaded #{project_ids.size} project ids to import"
+
+ imported = 0
+ missing = 0
if project_ids.any?
- project_ids.in_groups_of(BUILD_ARTIFACTS_SIZE_REFRESH_ENQUEUE_BATCH_SIZE) do |ids|
+ project_ids.in_groups_of(BUILD_ARTIFACTS_SIZE_REFRESH_ENQUEUE_BATCH_SIZE, false) do |ids|
projects = Project.where(id: ids)
Projects::BuildArtifactsSizeRefresh.enqueue_refresh(projects)
+
+ # Take a short break to allow replication to catch up
+ Kernel.sleep(1)
+
+ imported += projects.size
+ missing += ids.size - projects.size
+ puts "#{imported}/#{project_ids.size} (missing projects: #{missing})"
end
- puts 'Done.'.green
+ puts 'Done.'
else
- puts 'Please provide a string of space-separated project IDs as the argument or through the STDIN'.red
+ puts 'Project IDs must be listed in the CSV under the header PROJECT_ID'.red
end
end
end
diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake
index a5289476378..006dfad3a95 100644
--- a/lib/tasks/gitlab/setup.rake
+++ b/lib/tasks/gitlab/setup.rake
@@ -30,7 +30,7 @@ namespace :gitlab do
# In production, we might want to prevent ourselves from shooting
# ourselves in the foot, so let's only do this in a test or
# development environment.
- terminate_all_connections unless Rails.env.production?
+ Rake::Task["dev:terminate_all_connections"].invoke unless Rails.env.production?
Rake::Task["db:reset"].invoke
Rake::Task["db:seed_fu"].invoke
@@ -38,24 +38,4 @@ namespace :gitlab do
puts "Quitting...".color(:red)
exit 1
end
-
- # If there are any clients connected to the DB, PostgreSQL won't let
- # you drop the database. It's possible that Sidekiq, Puma, or
- # some other client will be hanging onto a connection, preventing
- # the DROP DATABASE from working. To workaround this problem, this
- # method terminates all the connections so that a subsequent DROP
- # will work.
- def self.terminate_all_connections
- cmd = <<~SQL
- SELECT pg_terminate_backend(pg_stat_activity.pid)
- FROM pg_stat_activity
- WHERE datname = current_database()
- AND pid <> pg_backend_pid();
- SQL
-
- Gitlab::Database::EachDatabase.each_database_connection do |connection|
- connection.execute(cmd)
- rescue ActiveRecord::NoDatabaseError
- end
- end
end
diff --git a/lib/tasks/gitlab/tw/codeowners.rake b/lib/tasks/gitlab/tw/codeowners.rake
index 358bc6c31eb..0aed017c84a 100644
--- a/lib/tasks/gitlab/tw/codeowners.rake
+++ b/lib/tasks/gitlab/tw/codeowners.rake
@@ -12,17 +12,16 @@ namespace :tw do
CodeOwnerRule.new("Adoption", '@kpaizee'),
CodeOwnerRule.new('Activation', '@kpaizee'),
CodeOwnerRule.new('Adoption', '@kpaizee'),
- CodeOwnerRule.new('APM', '@ngaskill'),
- CodeOwnerRule.new('Authentication & Authorization', '@eread'),
+ CodeOwnerRule.new('Authentication and Authorization', '@eread'),
CodeOwnerRule.new('Certify', '@msedlakjakubowski'),
CodeOwnerRule.new('Code Review', '@aqualls'),
CodeOwnerRule.new('Compliance', '@eread'),
CodeOwnerRule.new('Composition Analysis', '@rdickenson'),
CodeOwnerRule.new('Configure', '@marcia'),
- CodeOwnerRule.new('Container Security', '@ngaskill'),
+ CodeOwnerRule.new('Container Security', '@claytoncornell'),
CodeOwnerRule.new('Contributor Experience', '@eread'),
CodeOwnerRule.new('Conversion', '@kpaizee'),
- CodeOwnerRule.new('Database', '@aqualls'),
+ CodeOwnerRule.new('Database', '@marcia'),
CodeOwnerRule.new('Development', '@marcia'),
CodeOwnerRule.new('Distribution', '@axil'),
CodeOwnerRule.new('Distribution (Charts)', '@axil'),
@@ -37,26 +36,28 @@ namespace :tw do
CodeOwnerRule.new('Geo', '@axil'),
CodeOwnerRule.new('Gitaly', '@eread'),
CodeOwnerRule.new('Global Search', '@marcia'),
- CodeOwnerRule.new('Health', '@ngaskill'),
- CodeOwnerRule.new('Import', '@ngaskill'),
+ CodeOwnerRule.new('Import', '@eread'),
CodeOwnerRule.new('Infrastructure', '@marcia'),
CodeOwnerRule.new('Integrations', '@kpaizee'),
CodeOwnerRule.new('Knowledge', '@aqualls'),
CodeOwnerRule.new('License', '@sselhorn'),
CodeOwnerRule.new('Memory', '@marcia'),
- CodeOwnerRule.new('Monitor', '@ngaskill'),
+ CodeOwnerRule.new('Monitor', '@msedlakjakubowski'),
+ CodeOwnerRule.new('Observability', 'msedlakjakubowski'),
CodeOwnerRule.new('Optimize', '@fneill'),
- CodeOwnerRule.new('Package', '@ngaskill'),
+ CodeOwnerRule.new('Package', '@claytoncornell'),
CodeOwnerRule.new('Pipeline Authoring', '@marcel.amirault'),
CodeOwnerRule.new('Pipeline Execution', '@marcel.amirault'),
+ CodeOwnerRule.new('Pipeline Insights', '@marcel.amirault'),
CodeOwnerRule.new('Portfolio Management', '@msedlakjakubowski'),
- CodeOwnerRule.new('Product Intelligence', '@fneill'),
+ CodeOwnerRule.new('Product Intelligence', '@claytoncornell'),
CodeOwnerRule.new('Product Planning', '@msedlakjakubowski'),
CodeOwnerRule.new('Project Management', '@msedlakjakubowski'),
CodeOwnerRule.new('Provision', '@sselhorn'),
CodeOwnerRule.new('Purchase', '@sselhorn'),
CodeOwnerRule.new('Redirect', 'Redirect'),
CodeOwnerRule.new('Release', '@rdickenson'),
+ CodeOwnerRule.new('Respond', '@msedlakjakubowski'),
CodeOwnerRule.new('Runner', '@sselhorn'),
CodeOwnerRule.new('Sharding', '@marcia'),
CodeOwnerRule.new('Source Code', '@aqualls'),
@@ -64,9 +65,9 @@ namespace :tw do
CodeOwnerRule.new('Static Site Editor', '@aqualls'),
CodeOwnerRule.new('Style Guide', '@sselhorn'),
CodeOwnerRule.new('Testing', '@eread'),
- CodeOwnerRule.new('Threat Insights', '@fneill'),
+ CodeOwnerRule.new('Threat Insights', '@claytoncornell'),
CodeOwnerRule.new('Utilization', '@sselhorn'),
- CodeOwnerRule.new('Vulnerability Research', '@fneill'),
+ CodeOwnerRule.new('Vulnerability Research', '@claytoncornell'),
CodeOwnerRule.new('Workspace', '@fneill')
].freeze
diff --git a/lib/tasks/gitlab_danger.rake b/lib/tasks/gitlab_danger.rake
deleted file mode 100644
index ff9464a588a..00000000000
--- a/lib/tasks/gitlab_danger.rake
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-desc 'Run local Danger rules'
-task :danger_local do
- require_relative '../../tooling/danger/project_helper'
- require 'gitlab/popen'
-
- puts("#{Tooling::Danger::ProjectHelper.local_warning_message}\n")
-
- # _status will _always_ be 0, regardless of failure or success :(
- output, _status = Gitlab::Popen.popen(%w{danger dry_run})
-
- if output.empty?
- puts(Tooling::Danger::ProjectHelper.success_message)
- else
- puts(output)
- exit(1)
- end
-end