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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-11-22 03:10:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-22 03:10:40 +0300
commite3736bd03e55076fb8d9f5b4cc4602b32d13b2ec (patch)
treedd15325d34dd9bdb5fe37570f1ae691e6e329b7c /lib
parenta3e6d34643e760d1a8b8bd1e7e32d8d74c1ea678 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/internal_events.rb10
-rw-r--r--lib/gitlab/task_helpers.rb6
-rw-r--r--lib/tasks/gettext.rake4
-rw-r--r--lib/tasks/gitlab/shell.rake2
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/gitlab/internal_events.rb b/lib/gitlab/internal_events.rb
index c4fddede4b8..b7ba14bd53f 100644
--- a/lib/gitlab/internal_events.rb
+++ b/lib/gitlab/internal_events.rb
@@ -29,7 +29,11 @@ module Gitlab
send_application_instrumentation_event(event_name, kwargs)
end
rescue StandardError => e
- Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e, event_name: event_name, kwargs: kwargs)
+ extra = {}
+ kwargs.each_key do |k|
+ extra[k] = kwargs[k].is_a?(::ApplicationRecord) ? kwargs[k].try(:id) : kwargs[k]
+ end
+ Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e, event_name: event_name, kwargs: extra)
nil
end
@@ -62,7 +66,9 @@ module Gitlab
unique_method = :id
unless kwargs.has_key?(unique_property)
- raise InvalidPropertyError, "#{event_name} should be triggered with a named parameter '#{unique_property}'."
+ message = "#{event_name} should be triggered with a named parameter '#{unique_property}'."
+ Gitlab::AppJsonLogger.warn(message: message)
+ return
end
unique_value = kwargs[unique_property].public_send(unique_method) # rubocop:disable GitlabSecurity/PublicSend
diff --git a/lib/gitlab/task_helpers.rb b/lib/gitlab/task_helpers.rb
index 78c0f04e07e..038808667f4 100644
--- a/lib/gitlab/task_helpers.rb
+++ b/lib/gitlab/task_helpers.rb
@@ -149,12 +149,6 @@ module Gitlab
end
end
- def repository_storage_paths_args
- Gitlab::GitalyClient::StorageSettings.allow_disk_access do
- Gitlab.config.repositories.storages.values.map { |rs| rs.legacy_disk_path }
- end
- end
-
def user_home
Rails.env.test? ? Rails.root.join('tmp/tests') : Gitlab.config.gitlab.user_home
end
diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake
index 1a659a930ab..2d649a061b5 100644
--- a/lib/tasks/gettext.rake
+++ b/lib/tasks/gettext.rake
@@ -1,8 +1,7 @@
# frozen_string_literal: true
-require "gettext_i18n_rails/tasks"
-
namespace :gettext do
+ desc 'Compile po files to json, for usage in the frontend'
task :compile do
# See: https://gitlab.com/gitlab-org/gitlab-foss/issues/33014#note_31218998
FileUtils.touch(pot_file_path)
@@ -71,6 +70,7 @@ namespace :gettext do
end
end
+ desc 'Check whether gitlab.pot needs updates, used during CI'
task updated_check: [:regenerate] do
pot_diff = `git diff -- #{pot_file_path} | grep -E '^(\\+|-)msgid'`.strip
diff --git a/lib/tasks/gitlab/shell.rake b/lib/tasks/gitlab/shell.rake
index ddbb9a16baf..abeb5bbdf29 100644
--- a/lib/tasks/gitlab/shell.rake
+++ b/lib/tasks/gitlab/shell.rake
@@ -30,7 +30,7 @@ namespace :gitlab do
File.open("config.yml", "w+") { |f| f.puts config.to_yaml }
[
- %w[bin/install] + repository_storage_paths_args,
+ %w[bin/install],
%w[make build]
].each do |cmd|
unless Kernel.system(*cmd)