diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-21 21:08:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-21 21:08:31 +0000 |
commit | e7bc93852d0ce48c490a780b6a1adc6cc36dd342 (patch) | |
tree | b07651f4700e8ec2338298b4d224b6252b505eef /app | |
parent | 34e72e54129090eaae6e045890fcdf8b5ad3f629 (diff) | |
download | gitlab-ce-e7bc93852d0ce48c490a780b6a1adc6cc36dd342.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
31 files changed, 63 insertions, 58 deletions
diff --git a/app/assets/javascripts/commons/bootstrap.js b/app/assets/javascripts/commons/bootstrap.js index e5e1cbb1e62..df0fa1ae88b 100644 --- a/app/assets/javascripts/commons/bootstrap.js +++ b/app/assets/javascripts/commons/bootstrap.js @@ -70,7 +70,12 @@ whitelist.acronym = []; whitelist.blockquote = []; whitelist.del = []; whitelist.ins = []; -whitelist['gl-emoji'] = []; +whitelist['gl-emoji'] = [ + 'data-name', + 'data-unicode-version', + 'data-fallback-src', + 'data-fallback-sprite-class', +]; // Whitelisting SVG tags and attributes whitelist.svg = ['viewBox']; diff --git a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js index 0c521fa29bd..0991f5282a8 100644 --- a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js +++ b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js @@ -1,4 +1,4 @@ -/* eslint-disable func-names, guard-for-in, no-restricted-syntax, no-lonely-if, no-continue */ +/* eslint-disable func-names, no-continue */ /* global CommentsStore */ import $ from 'jquery'; @@ -42,13 +42,13 @@ const JumpToDiscussion = Vue.extend({ }, lastResolvedId() { let lastId; - for (const discussionId in this.discussions) { + Object.keys(this.discussions).forEach(discussionId => { const discussion = this.discussions[discussionId]; if (!discussion.isResolved()) { lastId = discussion.id; } - } + }); return lastId; }, }, @@ -95,12 +95,10 @@ const JumpToDiscussion = Vue.extend({ if (unresolvedDiscussionCount === 1) { hasDiscussionsToJumpTo = false; } - } else { + } else if (unresolvedDiscussionCount === 0) { // If there are no unresolved discussions on the diffs tab at all, // there are no discussions to jump to. - if (unresolvedDiscussionCount === 0) { - hasDiscussionsToJumpTo = false; - } + hasDiscussionsToJumpTo = false; } } else if (activeTab !== 'show') { // If we are on the commits or builds tabs, diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 2018c706b11..3ea4a24f421 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -226,7 +226,7 @@ export default { 'allDashboards', 'environmentsLoading', 'expandedPanel', - 'promVariables', + 'variables', 'isUpdatingStarredValue', ]), ...mapGetters('monitoringDashboard', [ @@ -251,7 +251,7 @@ export default { return !this.environmentsLoading && this.filteredEnvironments.length === 0; }, shouldShowVariablesSection() { - return Object.keys(this.promVariables).length > 0; + return Object.keys(this.variables).length > 0; }, }, watch: { @@ -273,7 +273,7 @@ export default { handler({ group, panel }) { const dashboardPath = this.currentDashboard || this.selectedDashboard?.path; updateHistory({ - url: panelToUrl(dashboardPath, convertVariablesForURL(this.promVariables), group, panel), + url: panelToUrl(dashboardPath, convertVariablesForURL(this.variables), group, panel), title: document.title, }); }, @@ -344,7 +344,7 @@ export default { }, generatePanelUrl(groupKey, panel) { const dashboardPath = this.currentDashboard || this.selectedDashboard?.path; - return panelToUrl(dashboardPath, convertVariablesForURL(this.promVariables), groupKey, panel); + return panelToUrl(dashboardPath, convertVariablesForURL(this.variables), groupKey, panel); }, hideAddMetricModal() { this.$refs.addMetricModal.hide(); diff --git a/app/assets/javascripts/monitoring/components/variables_section.vue b/app/assets/javascripts/monitoring/components/variables_section.vue index e054c9d8e26..1175e3bb461 100644 --- a/app/assets/javascripts/monitoring/components/variables_section.vue +++ b/app/assets/javascripts/monitoring/components/variables_section.vue @@ -2,7 +2,7 @@ import { mapState, mapActions } from 'vuex'; import CustomVariable from './variables/custom_variable.vue'; import TextVariable from './variables/text_variable.vue'; -import { setPromCustomVariablesFromUrl } from '../utils'; +import { setCustomVariablesFromUrl } from '../utils'; export default { components: { @@ -10,12 +10,12 @@ export default { TextVariable, }, computed: { - ...mapState('monitoringDashboard', ['promVariables']), + ...mapState('monitoringDashboard', ['variables']), }, methods: { ...mapActions('monitoringDashboard', ['fetchDashboardData', 'updateVariableValues']), refreshDashboard(variable, value) { - if (this.promVariables[variable].value !== value) { + if (this.variables[variable].value !== value) { const changedVariable = { key: variable, value }; // update the Vuex store this.updateVariableValues(changedVariable); @@ -24,7 +24,7 @@ export default { // mutation respond directly. // This can be further investigate in // https://gitlab.com/gitlab-org/gitlab/-/issues/217713 - setPromCustomVariablesFromUrl(this.promVariables); + setCustomVariablesFromUrl(this.variables); // fetch data this.fetchDashboardData(); } @@ -41,7 +41,7 @@ export default { </script> <template> <div ref="variablesSection" class="d-sm-flex flex-sm-wrap pt-2 pr-1 pb-0 pl-2 variables-section"> - <div v-for="(variable, key) in promVariables" :key="key" class="mb-1 pr-2 d-flex d-sm-block"> + <div v-for="(variable, key) in variables" :key="key" class="mb-1 pr-2 d-flex d-sm-block"> <component :is="variableComponent(variable.type)" class="mb-0 flex-grow-1" diff --git a/app/assets/javascripts/monitoring/stores/actions.js b/app/assets/javascripts/monitoring/stores/actions.js index b057afa2264..fec2aba4575 100644 --- a/app/assets/javascripts/monitoring/stores/actions.js +++ b/app/assets/javascripts/monitoring/stores/actions.js @@ -223,7 +223,7 @@ export const fetchPrometheusMetric = ( queryParams.step = metric.step; } - if (Object.keys(state.promVariables).length > 0) { + if (Object.keys(state.variables).length > 0) { queryParams.variables = getters.getCustomVariablesArray; } diff --git a/app/assets/javascripts/monitoring/stores/getters.js b/app/assets/javascripts/monitoring/stores/getters.js index ae3ff5596e1..f3b1e5a7dde 100644 --- a/app/assets/javascripts/monitoring/stores/getters.js +++ b/app/assets/javascripts/monitoring/stores/getters.js @@ -122,7 +122,7 @@ export const filteredEnvironments = state => */ export const getCustomVariablesArray = state => - flatMap(state.promVariables, (variable, key) => [key, variable.value]); + flatMap(state.variables, (variable, key) => [key, variable.value]); // prevent babel-plugin-rewire from generating an invalid default during karma tests export default () => {}; diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js index f41cf3fc477..36e4014e766 100644 --- a/app/assets/javascripts/monitoring/stores/mutations.js +++ b/app/assets/javascripts/monitoring/stores/mutations.js @@ -189,11 +189,11 @@ export default { state.expandedPanel.panel = panel; }, [types.SET_VARIABLES](state, variables) { - state.promVariables = variables; + state.variables = variables; }, [types.UPDATE_VARIABLE_VALUES](state, updatedVariable) { - Object.assign(state.promVariables[updatedVariable.key], { - ...state.promVariables[updatedVariable.key], + Object.assign(state.variables[updatedVariable.key], { + ...state.variables[updatedVariable.key], value: updatedVariable.value, }); }, diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js index 9ae1da93e5f..9d47a9a2ad7 100644 --- a/app/assets/javascripts/monitoring/stores/state.js +++ b/app/assets/javascripts/monitoring/stores/state.js @@ -34,7 +34,11 @@ export default () => ({ panel: null, }, allDashboards: [], - promVariables: {}, + /** + * User-defined custom variables are passed + * via the dashboard.yml file. + */ + variables: {}, // Other project data annotations: [], diff --git a/app/assets/javascripts/monitoring/utils.js b/app/assets/javascripts/monitoring/utils.js index 1f028ffbcad..95d544bd6d4 100644 --- a/app/assets/javascripts/monitoring/utils.js +++ b/app/assets/javascripts/monitoring/utils.js @@ -151,7 +151,7 @@ export const removePrefixFromLabel = label => /** * Convert parsed template variables to an object - * with just keys and values. Prepare the promVariables + * with just keys and values. Prepare the variables * to be added to the URL. Keys of the object will * have a prefix so that these params can be * differentiated from other URL params. @@ -183,15 +183,15 @@ export const getPromCustomVariablesFromUrl = (search = window.location.search) = }; /** - * Update the URL with promVariables. This usually get triggered when + * Update the URL with variables. This usually get triggered when * the user interacts with the dynamic input elements in the monitoring * dashboard header. * - * @param {Object} promVariables user defined variables + * @param {Object} variables user defined variables */ -export const setPromCustomVariablesFromUrl = promVariables => { +export const setCustomVariablesFromUrl = variables => { // prep the variables to append to URL - const parsedVariables = convertVariablesForURL(promVariables); + const parsedVariables = convertVariablesForURL(variables); // update the URL updateHistory({ url: mergeUrlParams(parsedVariables, window.location.href), @@ -262,7 +262,7 @@ export const expandedPanelPayloadFromUrl = (dashboard, search = window.location. * If no group/panel is set, the dashboard URL is returned. * * @param {?String} dashboard - Dashboard path, used as identifier for a dashboard - * @param {?Object} promVariables - Custom variables that came from the URL + * @param {?Object} variables - Custom variables that came from the URL * @param {?String} group - Group Identifier * @param {?Object} panel - Panel object from the dashboard * @param {?String} url - Base URL including current search params @@ -270,14 +270,14 @@ export const expandedPanelPayloadFromUrl = (dashboard, search = window.location. */ export const panelToUrl = ( dashboard = null, - promVariables, + variables, group, panel, url = window.location.href, ) => { const params = { dashboard, - ...promVariables, + ...variables, }; if (group && panel) { diff --git a/app/models/concerns/cacheable_attributes.rb b/app/models/concerns/cacheable_attributes.rb index d459af23a2f..de176ffde5c 100644 --- a/app/models/concerns/cacheable_attributes.rb +++ b/app/models/concerns/cacheable_attributes.rb @@ -55,7 +55,7 @@ module CacheableAttributes current_without_cache.tap { |current_record| current_record&.cache! } rescue => e if Rails.env.production? - Rails.logger.warn("Cached record for #{name} couldn't be loaded, falling back to uncached record: #{e}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.warn("Cached record for #{name} couldn't be loaded, falling back to uncached record: #{e}") else raise e end diff --git a/app/models/concerns/storage/legacy_namespace.rb b/app/models/concerns/storage/legacy_namespace.rb index da4f2a79895..250889fdf8b 100644 --- a/app/models/concerns/storage/legacy_namespace.rb +++ b/app/models/concerns/storage/legacy_namespace.rb @@ -67,7 +67,7 @@ module Storage unless gitlab_shell.mv_namespace(repository_storage, full_path_before_last_save, full_path) - Rails.logger.error "Exception moving path #{repository_storage} from #{full_path_before_last_save} to #{full_path}" # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("Exception moving path #{repository_storage} from #{full_path_before_last_save} to #{full_path}") # if we cannot move namespace directory we should rollback # db changes in order to prevent out of sync between db and fs diff --git a/app/models/concerns/update_highest_role.rb b/app/models/concerns/update_highest_role.rb index 7efc436c6c8..6432cc794a5 100644 --- a/app/models/concerns/update_highest_role.rb +++ b/app/models/concerns/update_highest_role.rb @@ -29,9 +29,7 @@ module UpdateHighestRole UpdateHighestRoleWorker.perform_in(HIGHEST_ROLE_JOB_DELAY, update_highest_role_attribute) else # use same logging as ExclusiveLeaseGuard - # rubocop:disable Gitlab/RailsLogger - Rails.logger.error('Cannot obtain an exclusive lease. There must be another instance already in execution.') - # rubocop:enable Gitlab/RailsLogger + Gitlab::AppLogger.error('Cannot obtain an exclusive lease. There must be another instance already in execution.') end end end diff --git a/app/models/storage/legacy_project.rb b/app/models/storage/legacy_project.rb index 345172cca76..f643d52587e 100644 --- a/app/models/storage/legacy_project.rb +++ b/app/models/storage/legacy_project.rb @@ -35,7 +35,7 @@ module Storage gitlab_shell.mv_repository(repository_storage, "#{old_full_path}.wiki", "#{new_full_path}.wiki") return true rescue => e - Rails.logger.error "Exception renaming #{old_full_path} -> #{new_full_path}: #{e}" # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("Exception renaming #{old_full_path} -> #{new_full_path}: #{e}") # Returning false does not rollback after_* transaction but gives # us information about failing some of tasks return false diff --git a/app/models/uploads/base.rb b/app/models/uploads/base.rb index 442ed733566..7555c72e101 100644 --- a/app/models/uploads/base.rb +++ b/app/models/uploads/base.rb @@ -7,7 +7,7 @@ module Uploads attr_reader :logger def initialize(logger: nil) - @logger = Rails.logger # rubocop:disable Gitlab/RailsLogger + @logger = Gitlab::AppLogger end def delete_keys_async(keys_to_delete) diff --git a/app/services/concerns/exclusive_lease_guard.rb b/app/services/concerns/exclusive_lease_guard.rb index 0c5ecca3a50..4678d051d29 100644 --- a/app/services/concerns/exclusive_lease_guard.rb +++ b/app/services/concerns/exclusive_lease_guard.rb @@ -58,6 +58,6 @@ module ExclusiveLeaseGuard end def log_error(message, extra_args = {}) - Rails.logger.error(message) # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error(message) end end diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb index 9437eb9eede..1bff70e6c2e 100644 --- a/app/services/groups/destroy_service.rb +++ b/app/services/groups/destroy_service.rb @@ -6,7 +6,7 @@ module Groups def async_execute job_id = GroupDestroyWorker.perform_async(group.id, current_user.id) - Rails.logger.info("User #{current_user.id} scheduled a deletion of group ID #{group.id} with job ID #{job_id}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.info("User #{current_user.id} scheduled a deletion of group ID #{group.id} with job ID #{job_id}") end # rubocop: disable CodeReuse/ActiveRecord diff --git a/app/services/labels/create_service.rb b/app/services/labels/create_service.rb index c032985be42..a5b30e29e55 100644 --- a/app/services/labels/create_service.rb +++ b/app/services/labels/create_service.rb @@ -20,7 +20,7 @@ module Labels label.save label else - Rails.logger.warn("target_params should contain :project or :group or :template, actual value: #{target_params}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.warn("target_params should contain :project or :group or :template, actual value: #{target_params}") end end end diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb index 31097b9151a..8d57a76f7d0 100644 --- a/app/services/merge_requests/merge_service.rb +++ b/app/services/merge_requests/merge_service.rb @@ -121,12 +121,12 @@ module MergeRequests end def handle_merge_error(log_message:, save_message_on_model: false) - Rails.logger.error("MergeService ERROR: #{merge_request_info} - #{log_message}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("MergeService ERROR: #{merge_request_info} - #{log_message}") @merge_request.update(merge_error: log_message) if save_message_on_model end def log_info(message) - @logger ||= Rails.logger # rubocop:disable Gitlab/RailsLogger + @logger ||= Gitlab::AppLogger @logger.info("#{merge_request_info} - #{message}") end diff --git a/app/services/projects/after_import_service.rb b/app/services/projects/after_import_service.rb index ee2dde8aa7f..b09a8e0bece 100644 --- a/app/services/projects/after_import_service.rb +++ b/app/services/projects/after_import_service.rb @@ -22,7 +22,7 @@ module Projects # causing GC to run every time. service.increment! rescue Projects::HousekeepingService::LeaseTaken => e - Rails.logger.info( # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.info( "Could not perform housekeeping for project #{@project.full_path} (#{@project.id}): #{e}") end diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index 8acc83a0d27..8dc54ee4ea0 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -166,7 +166,7 @@ module Projects log_message = message.dup log_message << " Project ID: #{@project.id}" if @project&.id - Rails.logger.error(log_message) # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error(log_message) if @project && @project.persisted? && @project.import_state @project.import_state.mark_as_failed(message) diff --git a/app/services/projects/import_export/export_service.rb b/app/services/projects/import_export/export_service.rb index 86cb4f35206..0c515479cfa 100644 --- a/app/services/projects/import_export/export_service.rb +++ b/app/services/projects/import_export/export_service.rb @@ -115,11 +115,11 @@ module Projects end def notify_success - Rails.logger.info("Import/Export - Project #{project.name} with ID: #{project.id} successfully exported") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.info("Import/Export - Project #{project.name} with ID: #{project.id} successfully exported") end def notify_error - Rails.logger.error("Import/Export - Project #{project.name} with ID: #{project.id} export error - #{shared.errors.join(', ')}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("Import/Export - Project #{project.name} with ID: #{project.id} export error - #{shared.errors.join(', ')}") notification_service.project_not_exported(project, current_user, shared.errors) end diff --git a/app/services/projects/update_statistics_service.rb b/app/services/projects/update_statistics_service.rb index cc6ffa9eafc..a0793cff2df 100644 --- a/app/services/projects/update_statistics_service.rb +++ b/app/services/projects/update_statistics_service.rb @@ -5,7 +5,7 @@ module Projects def execute return unless project - Rails.logger.info("Updating statistics for project #{project.id}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.info("Updating statistics for project #{project.id}") project.statistics.refresh!(only: statistics.map(&:to_sym)) end diff --git a/app/services/spam/akismet_service.rb b/app/services/spam/akismet_service.rb index ab35fb8700f..e11a1dbdd96 100644 --- a/app/services/spam/akismet_service.rb +++ b/app/services/spam/akismet_service.rb @@ -27,7 +27,7 @@ module Spam is_spam, is_blatant = akismet_client.check(options[:ip_address], options[:user_agent], params) is_spam || is_blatant rescue => e - Rails.logger.error("Unable to connect to Akismet: #{e}, skipping check") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("Unable to connect to Akismet: #{e}, skipping check") false end end @@ -67,7 +67,7 @@ module Spam akismet_client.public_send(type, options[:ip_address], options[:user_agent], params) # rubocop:disable GitlabSecurity/PublicSend true rescue => e - Rails.logger.error("Unable to connect to Akismet: #{e}, skipping!") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("Unable to connect to Akismet: #{e}, skipping!") false end end diff --git a/app/services/submit_usage_ping_service.rb b/app/services/submit_usage_ping_service.rb index 3265eb106eb..4bbde3a9648 100644 --- a/app/services/submit_usage_ping_service.rb +++ b/app/services/submit_usage_ping_service.rb @@ -28,7 +28,7 @@ class SubmitUsagePingService true rescue Gitlab::HTTP::Error => e - Rails.logger.info "Unable to contact GitLab, Inc.: #{e}" # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.info("Unable to contact GitLab, Inc.: #{e}") false end diff --git a/app/services/web_hook_service.rb b/app/services/web_hook_service.rb index 178a321e20c..91a26ff45b1 100644 --- a/app/services/web_hook_service.rb +++ b/app/services/web_hook_service.rb @@ -63,7 +63,7 @@ class WebHookService error_message: e.to_s ) - Rails.logger.error("WebHook Error => #{e}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("WebHook Error => #{e}") { status: :error, diff --git a/app/uploaders/file_mover.rb b/app/uploaders/file_mover.rb index 7c7953c8a0e..887cb702acf 100644 --- a/app/uploaders/file_mover.rb +++ b/app/uploaders/file_mover.rb @@ -98,7 +98,7 @@ class FileMover end def revert - Rails.logger.warn("Markdown not updated, file move reverted for #{to_model}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.warn("Markdown not updated, file move reverted for #{to_model}") if temp_file_uploader.file_storage? FileUtils.move(file_path, temp_file_path) diff --git a/app/workers/create_commit_signature_worker.rb b/app/workers/create_commit_signature_worker.rb index a88d2bf7d15..aeb6104a35c 100644 --- a/app/workers/create_commit_signature_worker.rb +++ b/app/workers/create_commit_signature_worker.rb @@ -37,7 +37,7 @@ class CreateCommitSignatureWorker commits.each do |commit| commit&.signature rescue => e - Rails.logger.error("Failed to create signature for commit #{commit.id}. Error: #{e.message}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("Failed to create signature for commit #{commit.id}. Error: #{e.message}") end end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/workers/delete_user_worker.rb b/app/workers/delete_user_worker.rb index d3b87c133d3..2f2bf500730 100644 --- a/app/workers/delete_user_worker.rb +++ b/app/workers/delete_user_worker.rb @@ -11,6 +11,6 @@ class DeleteUserWorker # rubocop:disable Scalability/IdempotentWorker Users::DestroyService.new(current_user).execute(delete_user, options.symbolize_keys) rescue Gitlab::Access::AccessDeniedError => e - Rails.logger.warn("User could not be destroyed: #{e}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.warn("User could not be destroyed: #{e}") end end diff --git a/app/workers/email_receiver_worker.rb b/app/workers/email_receiver_worker.rb index fcb88982c0b..9ceab9bb878 100644 --- a/app/workers/email_receiver_worker.rb +++ b/app/workers/email_receiver_worker.rb @@ -20,7 +20,7 @@ class EmailReceiverWorker # rubocop:disable Scalability/IdempotentWorker private def handle_failure(raw, error) - Rails.logger.warn("Email can not be processed: #{error}\n\n#{raw}") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.warn("Email can not be processed: #{error}\n\n#{raw}") return unless raw.present? diff --git a/app/workers/expire_build_instance_artifacts_worker.rb b/app/workers/expire_build_instance_artifacts_worker.rb index 48fd086f88f..e6cd60a3e47 100644 --- a/app/workers/expire_build_instance_artifacts_worker.rb +++ b/app/workers/expire_build_instance_artifacts_worker.rb @@ -14,7 +14,7 @@ class ExpireBuildInstanceArtifactsWorker # rubocop:disable Scalability/Idempoten return unless build&.project && !build.project.pending_delete - Rails.logger.info "Removing artifacts for build #{build.id}..." # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.info("Removing artifacts for build #{build.id}...") build.erase_erasable_artifacts! end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/workers/new_note_worker.rb b/app/workers/new_note_worker.rb index 8ead87a9230..ee1d2237001 100644 --- a/app/workers/new_note_worker.rb +++ b/app/workers/new_note_worker.rb @@ -16,7 +16,7 @@ class NewNoteWorker # rubocop:disable Scalability/IdempotentWorker NotificationService.new.new_note(note) unless skip_notification?(note) Notes::PostProcessService.new(note).execute else - Rails.logger.error("NewNoteWorker: couldn't find note with ID=#{note_id}, skipping job") # rubocop:disable Gitlab/RailsLogger + Gitlab::AppLogger.error("NewNoteWorker: couldn't find note with ID=#{note_id}, skipping job") end end |