Fix remaining code offenses using ActiveRecord::Base methods
We need to fix instances of using connection (or other incompatible methods) directly on ActiveRecord::Base to support multiple databases. Using the wrong DB connection when executing DB queries can lead to application failures or data corruption.
We have a number of these offenses in a rubocop todo file.
We have some scattered offenses which may be best for the database team to handle. We should ensure all of these files have been checked and offenses removed. If for some reason the offense should remain ignored, add a comment to to the todo file stating it has been checked.
-
lib/gitlab/current_settings.rb
-
lib/gitlab/health_checks/db_check.rb
-
lib/gitlab/seeder.rb
-
lib/system_check/orphans/repository_check.rb
Edited by Matt Kasa