diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 12:24:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 12:24:38 +0300 |
commit | 898e2cc1dfa88b4ac39cb4b35011f61b37f57b51 (patch) | |
tree | c6524edb6c9a43cccf93be05c36883fde1a53ee4 /lib | |
parent | b5571e6e22cdacc81f78eff5943d68c8ba220fbb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/award_emoji.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/background_migration/archive_legacy_traces.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/import_export/project_tree_restorer.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/metrics/subscribers/action_view.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/pages.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/sherlock/file_sample.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/sherlock/line_profiler.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/usage_data.rb | 1 | ||||
-rw-r--r-- | lib/tasks/gitlab/lfs/migrate.rake | 2 |
9 files changed, 5 insertions, 9 deletions
diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb index 89b7e5c5e4b..7a815fa3dde 100644 --- a/lib/api/award_emoji.rb +++ b/lib/api/award_emoji.rb @@ -27,7 +27,6 @@ module API ":id/#{awardable_string}/:#{awardable_id_string}/award_emoji", ":id/#{awardable_string}/:#{awardable_id_string}/notes/:note_id/award_emoji" ].each do |endpoint| - desc 'Get a list of project +awardable+ award emoji' do detail 'This feature was introduced in 8.9' success Entities::AwardEmoji diff --git a/lib/gitlab/background_migration/archive_legacy_traces.rb b/lib/gitlab/background_migration/archive_legacy_traces.rb index 3c26982729d..79f38aed9f1 100644 --- a/lib/gitlab/background_migration/archive_legacy_traces.rb +++ b/lib/gitlab/background_migration/archive_legacy_traces.rb @@ -11,7 +11,6 @@ module Gitlab # So we chose a way to use ::Ci::Build directly and we don't change the `archive!` method until 11.1 ::Ci::Build.finished.without_archived_trace .where(id: start_id..stop_id).find_each do |build| - build.trace.archive! rescue => e Rails.logger.error "Failed to archive live trace. id: #{build.id} message: #{e.message}" # rubocop:disable Gitlab/RailsLogger diff --git a/lib/gitlab/import_export/project_tree_restorer.rb b/lib/gitlab/import_export/project_tree_restorer.rb index e274b68a94f..f309f106ec9 100644 --- a/lib/gitlab/import_export/project_tree_restorer.rb +++ b/lib/gitlab/import_export/project_tree_restorer.rb @@ -10,7 +10,7 @@ module Gitlab def initialize(user:, shared:, project:) @path = File.join(shared.export_path, 'project.json') @user = user - @shared = shared + @shared = shared @project = project end diff --git a/lib/gitlab/metrics/subscribers/action_view.rb b/lib/gitlab/metrics/subscribers/action_view.rb index 2ed5878286a..5bd21b8e5d1 100644 --- a/lib/gitlab/metrics/subscribers/action_view.rb +++ b/lib/gitlab/metrics/subscribers/action_view.rb @@ -36,7 +36,7 @@ module Gitlab end def relative_path(path) - path.gsub(%r{^#{Rails.root.to_s}/?}, '') + path.gsub(%r{^#{Rails.root}/?}, '') end def values_for(event) diff --git a/lib/gitlab/pages.rb b/lib/gitlab/pages.rb index 4899b1d3234..7703b086341 100644 --- a/lib/gitlab/pages.rb +++ b/lib/gitlab/pages.rb @@ -4,6 +4,7 @@ module Gitlab class Pages VERSION = File.read(Rails.root.join("GITLAB_PAGES_VERSION")).strip.freeze INTERNAL_API_REQUEST_HEADER = 'Gitlab-Pages-Api-Request'.freeze + MAX_SIZE = 1.terabyte include JwtAuthenticatable diff --git a/lib/gitlab/sherlock/file_sample.rb b/lib/gitlab/sherlock/file_sample.rb index 604b6df12cc..5d10d8c4877 100644 --- a/lib/gitlab/sherlock/file_sample.rb +++ b/lib/gitlab/sherlock/file_sample.rb @@ -18,7 +18,7 @@ module Gitlab end def relative_path - @relative_path ||= @file.gsub(%r{^#{Rails.root.to_s}/?}, '') + @relative_path ||= @file.gsub(%r{^#{Rails.root}/?}, '') end def to_param diff --git a/lib/gitlab/sherlock/line_profiler.rb b/lib/gitlab/sherlock/line_profiler.rb index 209ba784f9c..52d88f074b7 100644 --- a/lib/gitlab/sherlock/line_profiler.rb +++ b/lib/gitlab/sherlock/line_profiler.rb @@ -45,7 +45,7 @@ module Gitlab require 'rblineprof' retval = nil - samples = lineprof(/^#{Rails.root.to_s}/) { retval = yield } + samples = lineprof(/^#{Rails.root}/) { retval = yield } file_samples = aggregate_rblineprof(samples) diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index ec2243345e1..0753b2edb6f 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -206,7 +206,6 @@ module Gitlab .by_type(:JiraService) .includes(:jira_tracker_data) .find_in_batches(batch_size: BATCH_SIZE) do |services| - counts = services.group_by do |service| # TODO: Simplify as part of https://gitlab.com/gitlab-org/gitlab/issues/29404 service_url = service.data_fields&.url || (service.properties && service.properties['url']) diff --git a/lib/tasks/gitlab/lfs/migrate.rake b/lib/tasks/gitlab/lfs/migrate.rake index 4142903d9c3..6f11646c841 100644 --- a/lib/tasks/gitlab/lfs/migrate.rake +++ b/lib/tasks/gitlab/lfs/migrate.rake @@ -9,7 +9,6 @@ namespace :gitlab do LfsObject.with_files_stored_locally .find_each(batch_size: 10) do |lfs_object| - lfs_object.file.migrate!(LfsObjectUploader::Store::REMOTE) logger.info("Transferred LFS object #{lfs_object.oid} of size #{lfs_object.size.to_i.bytes} to object storage") @@ -24,7 +23,6 @@ namespace :gitlab do LfsObject.with_files_stored_remotely .find_each(batch_size: 10) do |lfs_object| - lfs_object.file.migrate!(LfsObjectUploader::Store::LOCAL) logger.info("Transferred LFS object #{lfs_object.oid} of size #{lfs_object.size.to_i.bytes} to local storage") |