Commit Graph

91 Commits

Author SHA1 Message Date
GitLab Bot e5e0589e09 Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
GitLab Bot 0eaa82ad61 Add latest changes from gitlab-org/gitlab@master 2020-09-11 12:08:50 +00:00
GitLab Bot c6b3ec3f56 Add latest changes from gitlab-org/gitlab@master 2020-04-07 15:09:30 +00:00
GitLab Bot 154b9bae14 Add latest changes from gitlab-org/gitlab@master 2020-03-17 21:09:16 +00:00
GitLab Bot cbfe03ae04 Add latest changes from gitlab-org/gitlab@master 2020-03-16 12:09:12 +00:00
GitLab Bot cd52759ee3 Add latest changes from gitlab-org/gitlab@master 2020-03-12 12:09:17 +00:00
GitLab Bot 22e9af3c8b Add latest changes from gitlab-org/gitlab@master 2020-01-27 12:08:35 +00:00
GitLab Bot d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot 8cc5f27909 Add latest changes from gitlab-org/gitlab@master 2019-12-13 12:07:41 +00:00
GitLab Bot b3e4ec8e8a Add latest changes from gitlab-org/gitlab@master 2019-10-23 09:06:03 +00:00
GitLab Bot 3744bcc0d1 Add latest changes from gitlab-org/gitlab@master 2019-10-09 09:06:19 +00:00
GitLab Bot 1da3754b25 Add latest changes from gitlab-org/gitlab@master 2019-10-03 21:07:29 +00:00
GitLab Bot 4f4dcd3c5d Add latest changes from gitlab-org/gitlab@master 2019-10-02 15:06:12 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Patrick Bajao c08191e0d5 Remove the fallback path from gitlab-ce 2019-08-29 16:33:04 +08:00
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00:00
Patrick Bajao 26dadbc9c4 Integrate Gitlab::Keys with Gitlab::Shell
In this commit, some methods that aren't being used
are removed from `Gitlab::Shell`. They are the ff:
- `#remove_keys_not_found_in_db`
- `#batch_read_key_ids`
- `#list_key_ids`

The corresponding methods in `Gitlab::Keys` have been
removed as well.
2019-03-19 11:16:21 +00:00
Jacob Vosmaer 078f11a6b9 Prepare test suite for switch to Gitaly-embedded Git hooks 2019-02-27 10:58:21 +00:00
Zeger-Jan van de Weg c00a1ec093 Only allow 30 RPCs per test case to Gitaly
Prior to this change, 35 Gitaly RPCs were allowed. But recently there's
been a renewed interest in performance. By lowering the number of
calls new N + 1's will pop up.

Later commits will add blocks to ignore the raised errors, followed by
an issue for each to be fixed.
2019-02-22 14:51:27 +00:00
Stan Hu f929411c6d Rename gl_project_name -> gl_project_path
Upgrade gitaly-proto to 1.10.0 to have this field.
2019-02-05 21:33:10 -08:00
Stan Hu 322402aada Add more tests and comments around Wiki formatting 2019-02-05 21:33:10 -08:00
Stan Hu b103f61450 Add convenience methods for creating project and Wiki repositories
This makes it easier to access other project arguments in the future.
2019-02-05 21:33:10 -08:00
Stan Hu 1af22dbe5c Add comment to explain why gl_repository is blank
During creation of a repository, gl_repository may not be known because
that depends on a yet-to-be assigned project ID in the database
(e.g. project-1234), so for now it is blank.
2019-02-05 21:33:10 -08:00
Stan Hu 59a7d67fb9 Rename name -> disk_path in create_repository
With hashed storage, the project name may not necessarily be the project
name, so rename the variable to make it clear.
2019-02-05 21:33:09 -08:00
Stan Hu a9ab6dbc63 Refactor use of Shell.import_repository for Wikis
The previous behavior would pass in a list of parameters
to Shell, but we can improve this by using the WikiFormatter
and Project models to give us the same information.
2019-02-05 21:33:09 -08:00
Stan Hu 6bac612dc4 Clean up Shell.fork_repository
Use project models instead of a list of parameters.
2019-02-05 21:33:09 -08:00
Stan Hu 82b6e5378a Send project name with Gitaly repository requests
When hashed storage is in use, it's helpful to have the project
name associated with the request.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1394
2019-02-05 21:33:09 -08:00
Valery Sizov 6670f838b5 Track Sentry error when namespace cannot be moved
Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8926
2019-01-04 20:49:01 +02:00
Nick Thomas 668e5d63fa
Stop Repository#fetch_remote from using Gitlab::Shell
This indirection doesn't provide any value, so remove it
2018-11-06 12:42:00 +00:00
gfyoung c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Robert Speicher c7d1eef671 Merge branch 'rubocop-code-reuse' into 'master'
Add RuboCop cops to enforce code reusing rules

See merge request gitlab-org/gitlab-ce!21391
2018-09-13 14:53:05 +00:00
Alejandro Rodríguez d3c5b07962 Remove Rugged and shell code from Gitlab::Git 2018-09-12 12:32:32 -03: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
Jacob Vosmaer a4e75e7a83 Use Gitaly for fetches and creating bundles 2018-07-09 12:50:17 +02:00
Jacob Vosmaer c770d2f96e Make more things mandatory 2018-07-06 14:44:54 +02:00
Zeger-Jan van de Weg 1dc0332726
Move forking to Gitaly
Closes https://gitlab.com/gitlab-org/gitaly/issues/817

Closes https://gitlab.com/gitlab-org/gitaly/issues/1236
2018-06-19 13:30:54 +02:00
Jacob Vosmaer f376347f24 Find and mark more Git disk access locations, part 2 2018-06-12 14:33:37 +02:00
Zeger-Jan van de Weg 12be728b17
Remove old GitLab Shell implementation
Moves the calls to Gitaly, no matter what the feature flag values are.
2018-05-02 11:54:43 +02:00
Zeger-Jan van de Weg ec4423665c
Gitlab::Shell works on shard name, not path
Direct disk access is done through Gitaly now, so the legacy path was
deprecated. This path was used in Gitlab::Shell however. This required
the refactoring in this commit.

Added is the removal of direct path access on the project model, as that
lookup wasn't needed anymore is most cases.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
2018-04-25 13:36:22 +02:00
🙈 jacopo beschi 🙉 c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
Ahmad Sherif ddfc661f79 Use shard name in Git::GitlabProjects instead of shard path
Closes gitaly#1110
2018-04-03 16:22:13 +02:00
Sean McGivern bb9d360c0a Merge branch 'mark-legacy-git-access' into 'master'
Route path lookups through legacy_disk_path

See merge request gitlab-org/gitlab-ce!17743
2018-03-23 10:20:45 +00:00
Jacob Vosmaer 008a6a6ce6 Route path lookups through legacy_disk_path 2018-03-21 18:18:32 +01:00
Zeger-Jan van de Weg 7d02292a44
Set Gitlab::Shell#create_repository as OPT_OUT
On .com repositories are created through Gitaly for a while now. For
customers this is not the case unless these have chosen to do so through
feature flags. By moving this to opt out, everyone will be using this.

This move is part of the migration issue
https://gitlab.com/gitlab-org/gitaly/issues/593

The bigger impact this commit will have is that tests that use a
repository through `FactoryBot.create(:project, :repository)` will now
use Gitaly to do so. As tests run on the same disk, or at least machine,
this will most probably slow them down.
2018-03-14 10:59:40 +01:00
Zeger-Jan van de Weg 77f0906e4c
Change Gitlab::Shell#add_namespace to #create_namespace
Prior to this change, this method was called add_namespace, which broke
the CRUD convention and made it harder to grep for what I was looking
for. Given the change was a find and replace kind of fix, this was
changed without opening an issue and on another feature branch.

If more dynamic calls are made to add_namespace, these could've been
missed which might lead to incorrect bahaviour. However, going through
the commit log it seems thats not the case.
2018-03-14 09:56:22 +01:00
Stan Hu e9fad3e501 Make --prune a configurable parameter in fetching a git remote
By default, --prune is added to the command-line of a `git fetch` operation,
but for repositories with many references this can take a long time to run. We
shouldn't need to run --prune the first time we fetch a new repository.
2018-03-06 00:10:04 -08:00
Sean McGivern 2d3867d096 Merge branch 'zj-namespace-gitaly-opt-out' into 'master'
Move Namespace to Gitaly using OPT-OUT

See merge request gitlab-org/gitlab-ce!15910
2018-02-08 10:57:42 +00:00
Douwe Maan ed2c9797e1 Merge branch 'zj-migrate-gitlab-project-rm-mv' into 'master'
Migrate GitlabProject (re)move project endpoints

Closes gitaly#873

See merge request gitlab-org/gitlab-ce!16249
2018-01-10 10:09:57 +00:00
Zeger-Jan van de Weg 58e17bf3b0
Migrate GitlabProject (re)move project endpoints
Migration is done through a small refactoring, which makes us call
endpoins which are performing the same actions for namespaces.
Tests are added to ensure only the project is removed that should be
removed.

Closes gitlab-org/gitaly#873
2018-01-09 19:23:18 +01:00
Douwe Maan 2e4a1b3b78 Merge branch 'jej/backport-authorized-keys-to-ce' into 'master'
Backport authorized_keys

Closes gitlab-ee#3953

See merge request gitlab-org/gitlab-ce!16014
2018-01-09 11:21:23 +00:00