Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
aa8b5e94
Commit
aa8b5e94
authored
Jan 26, 2022
by
Matt Kasa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix use of ActiveRecord::Base in RepositoryCheck
Relates to
https://gitlab.com/gitlab-org/gitlab/-/issues/350651
parent
b1072b3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
.rubocop_todo/database/multiple_databases.yml
.rubocop_todo/database/multiple_databases.yml
+0
-1
lib/system_check/orphans/repository_check.rb
lib/system_check/orphans/repository_check.rb
+2
-2
No files found.
.rubocop_todo/database/multiple_databases.yml
View file @
aa8b5e94
...
@@ -25,7 +25,6 @@ Database/MultipleDatabases:
...
@@ -25,7 +25,6 @@ Database/MultipleDatabases:
-
lib/gitlab/import_export/group/relation_tree_restorer.rb
-
lib/gitlab/import_export/group/relation_tree_restorer.rb
-
lib/gitlab/legacy_github_import/importer.rb
-
lib/gitlab/legacy_github_import/importer.rb
-
lib/gitlab/seeder.rb
-
lib/gitlab/seeder.rb
-
lib/system_check/orphans/repository_check.rb
-
spec/db/schema_spec.rb
-
spec/db/schema_spec.rb
-
spec/initializers/database_config_spec.rb
-
spec/initializers/database_config_spec.rb
-
spec/lib/backup/manager_spec.rb
-
spec/lib/backup/manager_spec.rb
...
...
lib/system_check/orphans/repository_check.rb
View file @
aa8b5e94
...
@@ -57,8 +57,8 @@ module SystemCheck
...
@@ -57,8 +57,8 @@ module SystemCheck
WHERE (p.repository_storage LIKE ?)
WHERE (p.repository_storage LIKE ?)
"
"
query
=
ActiveRecord
::
Base
.
send
(
:sanitize_sql_array
,
[
sql
,
storage_name
])
# rubocop:disable GitlabSecurity/PublicSend
query
=
::
Project
.
sanitize_sql_array
([
sql
,
storage_name
])
ActiveRecord
::
Base
.
connection
.
select_all
(
query
).
rows
.
try
(
:flatten!
)
||
[]
::
Project
.
connection
.
select_all
(
query
).
rows
.
try
(
:flatten!
)
||
[]
end
end
def
fetch_disk_namespaces
(
storage_path
)
def
fetch_disk_namespaces
(
storage_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment