Class: Gitlab::BackgroundMigration::SanitizeConfidentialTodos

Inherits:
BatchedMigrationJob show all
Defined in:
lib/gitlab/background_migration/sanitize_confidential_todos.rb

Overview

Iterates through confidential notes and removes any its todos if user can not read the note

Warning: This migration is not properly isolated. The reason for this is that we need to check permission for notes and it would be difficult to extract all related logic. Details in gitlab.com/gitlab-org/gitlab/-/merge_requests/87908#note_952459215

Constant Summary

Constants inherited from BatchedMigrationJob

BatchedMigrationJob::DEFAULT_FEATURE_CATEGORY

Constants included from Database::DynamicModelHelpers

Database::DynamicModelHelpers::BATCH_SIZE

Instance Method Summary collapse

Methods inherited from BatchedMigrationJob

#batch_metrics, feature_category, #filter_batch, generic_instance, #initialize, job_arguments, job_arguments_count, operation_name, scope_to

Methods included from Database::DynamicModelHelpers

#define_batchable_model, #each_batch, #each_batch_range

Constructor Details

This class inherits a constructor from Gitlab::BackgroundMigration::BatchedMigrationJob

Instance Method Details

#performObject



16
17
18
19
20
21
# File 'lib/gitlab/background_migration/sanitize_confidential_todos.rb', line 16

def perform
  # no-op: this BG migration is left here only for compatibility reasons,
  # but it's not scheduled from any migration anymore.
  # It was a temporary migration which used not-isolated code.
  # https://gitlab.com/gitlab-org/gitlab/-/issues/382557
end