Commit Graph

5 Commits

Author SHA1 Message Date
gfyoung e166e5747c Enable some frozen string in lib/gitlab
Enable frozen string for the following files:

* lib/gitlab/auth/**/*.rb
* lib/gitlab/badge/**/*.rb
* lib/gitlab/bare_repository_import/**/*.rb
* lib/gitlab/bitbucket_import/**/*.rb
* lib/gitlab/bitbucket_server_import/**/*.rb
* lib/gitlab/cache/**/*.rb
* lib/gitlab/checks/**/*.rb

Partially addresses #47424.
2018-10-13 02:31:31 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Stan Hu 4f9068dfc0 Eliminate N+1 queries in LFS file locks checks during a push
This significantly improves performance when a user pushes many references.

project.path_locks.any? doesn't cache the output and runs `SELECT 1 AS one
FROM "path_locks" WHERE project_id = N` each time. When there are thousands
of refs being pushed, this can time out the unicorn worker.

CE port for https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6159.
2018-06-18 16:42:20 -07:00
James Edwards-Jones d4dfa342c1 Avoid slow File Lock checks when not used
Also avoid double commit lookup during file lock check by reusing
memoized commits.
2018-02-19 10:01:25 +00:00
Rubén Dávila bed9483211 Backport of LFS File Locking API 2018-02-07 09:04:00 -05:00