Verify or fix usages of ActiveRecord::Base in Geo features
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.
Specifically, we have a number of offenses from Geo code. To resolve this, 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.
-
ee/lib/gitlab/geo/database_tasks.rb
-
ee/lib/gitlab/geo/geo_tasks.rb
-
ee/lib/gitlab/geo/health_check.rb
-
ee/lib/gitlab/geo/log_cursor/daemon.rb
-
ee/lib/system_check/geo/geo_database_configured_check.rb
Edited by Simon Tomlinson