Fix BackgroundMigration/FeatureCategory cop violations on old (silenced) background migration files
Why this MR?
!106147 (merged) introduces BackgroundMigration/FeatureCategory cop to ensure the presence of feature_category in all background migrations and it has been silenced for all existing files.
We should address those excluded files.
Proposed solutions
-
feature_category
can be set to :database for all the existing background migrations. - But people might refer to old migrations and keep setting :database, which is not our intention. To avoid this, we can set appropriate feature_category for each migrations - but this might require some initial cross team collaboration work.
Excluded files
-
'lib/gitlab/background_migration/backfill_cluster_agents_has_vulnerabilities.rb' -
'lib/gitlab/background_migration/backfill_environment_tiers.rb' -
'lib/gitlab/background_migration/backfill_epic_cache_counts.rb' -
'lib/gitlab/background_migration/backfill_group_features.rb' -
'lib/gitlab/background_migration/backfill_imported_issue_search_data.rb' -
'lib/gitlab/background_migration/backfill_internal_on_notes.rb' -
'lib/gitlab/background_migration/backfill_namespace_details.rb' -
'lib/gitlab/background_migration/backfill_namespace_id_of_vulnerability_reads.rb' -
'lib/gitlab/background_migration/backfill_project_feature_package_registry_access_level.rb' -
'lib/gitlab/background_migration/backfill_project_import_level.rb' -
'lib/gitlab/background_migration/backfill_project_member_namespace_id.rb' -
'lib/gitlab/background_migration/backfill_project_namespace_details.rb' -
'lib/gitlab/background_migration/backfill_project_namespace_on_issues.rb' -
'lib/gitlab/background_migration/backfill_project_statistics_container_repository_size.rb' -
'lib/gitlab/background_migration/backfill_project_statistics_storage_size_without_uploads_size.rb' -
'lib/gitlab/background_migration/backfill_user_details_fields.rb' -
'lib/gitlab/background_migration/backfill_vulnerability_reads_cluster_agent.rb' -
'lib/gitlab/background_migration/backfill_work_item_type_id_for_issues.rb' -
'lib/gitlab/background_migration/cleanup_orphaned_routes.rb' -
'lib/gitlab/background_migration/copy_column_using_background_migration_job.rb' -
'lib/gitlab/background_migration/delete_approval_rules_with_vulnerability.rb' -
'lib/gitlab/background_migration/delete_invalid_epic_issues.rb' -
'lib/gitlab/background_migration/delete_orphaned_operational_vulnerabilities.rb' -
'lib/gitlab/background_migration/delete_orphans_approval_merge_request_rules.rb' -
'lib/gitlab/background_migration/delete_orphans_approval_project_rules.rb' -
'lib/gitlab/background_migration/destroy_invalid_group_members.rb' -
'lib/gitlab/background_migration/destroy_invalid_members.rb' -
'lib/gitlab/background_migration/destroy_invalid_project_members.rb' -
'lib/gitlab/background_migration/disable_legacy_open_source_licence_for_recent_public_projects.rb' -
'lib/gitlab/background_migration/disable_legacy_open_source_license_for_inactive_public_projects.rb' -
'lib/gitlab/background_migration/disable_legacy_open_source_license_for_no_issues_no_repo_projects.rb' -
'lib/gitlab/background_migration/disable_legacy_open_source_license_for_one_member_no_repo_projects.rb' -
'lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_five_mb.rb' -
'lib/gitlab/background_migration/disable_legacy_open_source_license_for_projects_less_than_one_mb.rb' -
'lib/gitlab/background_migration/expire_o_auth_tokens.rb' -
'lib/gitlab/background_migration/fix_approval_project_rules_without_protected_branches.rb' -
'lib/gitlab/background_migration/fix_security_scan_statuses.rb' -
'lib/gitlab/background_migration/migrate_shared_vulnerability_scanners.rb' -
'lib/gitlab/background_migration/migrate_vulnerabilities_feedback_to_vulnerabilities_state_transition.rb' -
'lib/gitlab/background_migration/populate_approval_merge_request_rules_with_security_orchestration.rb' -
'lib/gitlab/background_migration/populate_approval_project_rules_with_security_orchestration.rb' -
'lib/gitlab/background_migration/populate_operation_visibility_permissions_from_operations.rb' -
'lib/gitlab/background_migration/populate_projects_star_count.rb' -
'lib/gitlab/background_migration/prune_stale_project_export_jobs.rb' -
'lib/gitlab/background_migration/recount_epic_cache_counts.rb' -
'lib/gitlab/background_migration/remove_backfilled_job_artifacts_expire_at.rb' -
'lib/gitlab/background_migration/remove_self_managed_wiki_notes.rb' -
'lib/gitlab/background_migration/rename_task_system_note_to_checklist_item.rb' -
'lib/gitlab/background_migration/reset_duplicate_ci_runners_token_encrypted_values.rb' -
'lib/gitlab/background_migration/reset_duplicate_ci_runners_token_values.rb' -
'lib/gitlab/background_migration/reset_status_on_container_repositories.rb' -
'lib/gitlab/background_migration/sanitize_confidential_todos.rb' -
'lib/gitlab/background_migration/set_correct_vulnerability_state.rb' -
'lib/gitlab/background_migration/set_legacy_open_source_license_available_for_non_public_projects.rb' -
'lib/gitlab/background_migration/update_ci_pipeline_artifacts_unknown_locked_status.rb' -
'lib/gitlab/background_migration/update_delayed_project_removal_to_null_for_user_namespaces.rb' -
'lib/gitlab/background_migration/update_jira_tracker_data_deployment_type_based_on_url.rb'
Edited by Prabakaran Murugesan