Commit Graph

719 Commits

Author SHA1 Message Date
Zeger-Jan van de Weg d65db552af
Migrate compare_source_branch to use only Gitaly
Initially expected this to be a full blown migration, but that wasn't
the case as we could fetch to a reference that would be deleted after
the instanciation of the Diff object.

This is a racy RPC, as #delete_refs is called and garbage collections
runs right than, the commit can't be found later.

Closes https://gitlab.com/gitlab-org/gitaly/issues/771
2018-06-12 12:48:09 +02:00
Jacob Vosmaer (GitLab) ea8dc10772 Don't use Gitlab::Utils.nlbr in Gitlab::Git 2018-06-11 10:42:09 +00:00
Jacob Vosmaer (GitLab) ab40c7e3c8 Move gitaly_blame, gitaly_count_commits, gitaly_commit_count to opt-out 2018-06-11 10:39:23 +00:00
Jacob Vosmaer 2120391441 Remove Gitlab::Popen dependency from lib/gitlab/git 2018-06-08 11:16:21 +02:00
Rubén Dávila c5d4f10b80 Pass the --in-commit-order arg to `git-rev-list`
@jamedjo has found a good improvement in the performance of the LFS
integrity check by passing this arg
2018-06-07 12:09:45 -05:00
Francisco Javier López ea2bd9cb4f Add git filter flag only if it is supported 2018-06-07 15:49:01 +00:00
Francisco Javier López 86d39016a2
Moving rev-list lfs options to Lfschanges 2018-06-06 21:55:32 +02:00
Francisco Javier López e8f49b4bee Support LFS objects when creating a project by import 2018-06-06 16:42:18 +00:00
Jacob Vosmaer e7ef91339e Simplify server feature flags 2018-06-06 11:20:41 +02:00
Zeger-Jan van de Weg f131757fc8 Set Gitaly Server feature flags from Rails
Gitaly itself hold very little state, other than the data on disk. This
limits the interfaces to set feature flags. Gitaly now has the ability
to interpret the request metadata to check for feature flags.
https://gitlab.com/gitlab-org/gitaly/merge_requests/704
This allows clients control on the Gitaly server, and given that Rails
has an internal chatops interface to set these values this was chosen as
solution.

Known limitation right now, is that this package doesn't support the opt
out that other Gitaly features do.
2018-06-06 11:20:41 +02:00
Nick Thomas 65dbead796
Fix repository archive generation when hashed storage is enabled 2018-06-05 20:44:07 +01:00
Jacob Vosmaer (GitLab) a0808df0b6 Find and mark more Git disk access locations 2018-06-05 15:51:14 +00:00
Jacob Vosmaer (GitLab) 3a4ecfd0c9 Prevent Gitaly WriteConfig log noise 2018-06-05 12:55:41 +00:00
Jacob Vosmaer (GitLab) edb9db37ed Add "deny disk access" Gitaly feature (tripswitch) 2018-06-01 11:56:29 +00:00
Douwe Maan d6d7abb1d0 Merge branch 'gitaly-repo-squash-in-progress-opt-out' into 'master'
Make Repo#squash_in_progress Opt-Out

See merge request gitlab-org/gitlab-ce!19088
2018-05-23 09:52:11 +00:00
Douwe Maan 91f3930cc1 Merge branch 'gitaly-wiki-get-formatted-data-opt-out' into 'master'
Move Wiki::GetFormattedData to OptOut

See merge request gitlab-org/gitlab-ce!19091
2018-05-23 09:51:37 +00:00
Douwe Maan 68b5cd71e0 Merge branch 'gitaly-import-project-opt-out' into 'master'
Move ImportProject to OptOut in Gitaly

See merge request gitlab-org/gitlab-ce!19090
2018-05-23 09:50:54 +00:00
Kim Carlbäcker f0ef31a114 Move Repository#info_attributes to OptOut in gitaly 2018-05-22 16:05:02 +00:00
Kim Carlbäcker cb2a541027 Move Wiki::GetFormattedData to OptOut 2018-05-22 15:58:36 +00:00
Kim Carlbäcker 2a781f7f5b Move ImportProject to OptOut in Gitaly 2018-05-22 15:52:54 +00:00
Kim Carlbäcker 536b32c8fa Make Repo#squash_in_progress Opt-Out 2018-05-22 15:44:42 +00:00
Grzegorz Bizon b113330fab Merge branch 'zj-workhorse-archive-mandatory' into 'master'
Move git archives downloading to Gitaly

See merge request gitlab-org/gitlab-ce!18990
2018-05-21 07:08:58 +00:00
Grzegorz Bizon ad9e00917f Merge branch 'xeodon/gitlab-ce-fix/45743-master-fix-gitaly-delete-refs' into 'master'
Fix error when deleting an empty list of refs

Closes #45743

See merge request gitlab-org/gitlab-ce!19053
2018-05-19 05:42:16 +00:00
Sergey Sinev 100c687cbc Fix error when deleting an empty list of refs
Closes #45743
2018-05-18 20:47:46 -07:00
Stan Hu 95dacabe4b Merge branch '46498-do-not-modify-strings' into 'master'
Resolve "Blob#batch can't handle frozen string paths"

Closes #46498

See merge request gitlab-org/gitlab-ce!19039
2018-05-19 00:03:49 +00:00
Robert Speicher 076ab2e8e0 Merge branch 'fix/handle-large-commit-tag-message' into 'master'
Add handling for commit/tags with big messages

See merge request gitlab-org/gitlab-ce!17892
2018-05-18 19:28:25 +00:00
Ahmad Sherif 019f5e2469 Add handling for commit/tags with big messages 2018-05-18 20:51:10 +02:00
Robert Speicher ee59fdf566 Merge branch 'gitaly-1182-search-by-content-name' into 'master'
Migrate Repo#search_by_{content,name}  to Gitaly

See merge request gitlab-org/gitlab-ce!18750
2018-05-18 18:28:32 +00:00
Nick Thomas 8bacfbd1cc Merge branch 'zj-calculate-checksum-mandator' into 'master'
Calculating repository checksums executed by Gitaly

Closes gitaly#1105 and #46293

See merge request gitlab-org/gitlab-ce!18907
2018-05-18 15:53:35 +00:00
Nick Thomas 73903ae884
Fix a RuntimeError: cannot modify frozen string 2018-05-18 15:19:58 +01:00
Zeger-Jan van de Weg 18a8eb96b3
Calculating repository checksums executed by Gitaly
OPT_OUT status has been removed, and alternative implementation removed.
Also checks if the repository exists before executing the checksum RPC
to guard against NotFound errors.

Closes gitlab-org/gitaly#1105
2018-05-18 16:07:29 +02:00
Kim "BKC" Carlbäcker 61a5994db6 Migrate RepositoryService#SearchFilesBy{Content,Name} 2018-05-18 12:51:28 +02:00
Grzegorz Bizon 48877dfc7e Merge branch 'zj-workhorse-commit-patch-diff' into 'master'
Workhorse to send raw diff and patch for commits

Closes gitaly#1196

See merge request gitlab-org/gitlab-ce!18974
2018-05-17 08:12:33 +00:00
Zeger-Jan van de Weg 94b209b32c
Move git archives downloading to Gitaly 2018-05-17 09:31:50 +02:00
Douwe Maan f05ff2d93d Merge branch 'zj-add-branch-mandatory' into 'master'
Move Gitlab::Git::Repository#add_branch to mandatory

Closes gitaly#540

See merge request gitlab-org/gitlab-ce!18939
2018-05-16 11:15:15 +00:00
Zeger-Jan van de Weg dfdd881510
Workhorse to send raw diff and patch for commits
Prior to this change, this was done through unicorn. In theory this
could time out. Workhorse has been sending these raw patches and diffs
for a long time and is stable in doing so.

Added bonus is the fact that `Commit#to_patch` can be removed.

`Commit#to_diff` too, which closes
https://gitlab.com/gitlab-org/gitaly/issues/324

Closes https://gitlab.com/gitlab-org/gitaly/issues/1196
2018-05-16 11:52:43 +02:00
Zeger-Jan van de Weg 7fc185ab25
Ref contains oid check done by Gitaly
These two endpoints are in opt-out, and no one noticed. Has been running
on .com for 4 months now and considered stable.

Closes https://gitlab.com/gitlab-org/gitaly/issues/884
2018-05-14 15:55:27 +02:00
Zeger-Jan van de Weg e012485a99
Move Gitlab::Git::Repository#add_branch to mandatory
Prior to this change, a feature flag could be used to disable this
feature. Now all requests go through Gitaly's OperationService.

Closes https://gitlab.com/gitlab-org/gitaly/issues/540

When vendoring `Gitlab::Git` again in Gitaly, this implemenation will be
gone, but this is readded there through:
https://gitlab.com/gitlab-org/gitaly/merge_requests/717
2018-05-14 12:18:23 +02:00
Robert Speicher 40683268b2 Merge branch 'rd-remove-duplicate-method' into 'master'
Remove duplicate method

See merge request gitlab-org/gitlab-ce!18886
2018-05-11 18:15:44 +00:00
Zeger-Jan van de Weg 4cf3a6094a
Wiki Find Page to opt_out
Closes https://gitlab.com/gitlab-org/gitaly/issues/894
2018-05-11 09:30:08 +02:00
Rubén Dávila 0a0d4912f5 Remove duplicate method 2018-05-10 15:25:17 -05:00
Douwe Maan 05a6e2b866 Merge branch 'backport-rd-5566-improve-performance-of-repository-size-limit-check' into 'master'
Backport some changes from gitlab-ee!5476

See merge request gitlab-org/gitlab-ce!18760
2018-05-10 09:29:55 +00:00
Rubén Dávila 5b584a0fd2 Backport some changes from gitlab-ee!5476
The lib/gitlab/git/repository.rb needs to have the same content between
gitlab-ce and gitlab-ee in order to have Gitaly working fine.
2018-05-09 13:20:28 -05:00
Robert Speicher ce793073d7 Merge branch 'zj-remove-rugged-call' into 'master'
Remove rugged call in blame controller

See merge request gitlab-org/gitlab-ce!18817
2018-05-09 16:07:21 +00:00
Zeger-Jan van de Weg 4f15460d2c
Remove rugged call in blame controller
Fetching commits through #lookup uses rugged, and this is phased out.

Also adds a short circuit in the `feature_enabled?` Gitaly method to
allow Gitaly to be used when objects are set up with `let` before an
example is run.
2018-05-08 17:18:31 +02:00
Douglas Barbosa Alexandre 17258b37c8
Raise InvalidRepository error for non-valid git repositories 2018-05-07 14:22:16 -03:00
Zeger-Jan van de Weg 713c7fa9a5
Client implementation GetRawChanges
Part of https://gitlab.com/gitlab-org/gitaly/issues/1138
2018-05-07 15:37:49 +02:00
Kim Carlbäcker 8cbabe43be Update repository.rb 2018-05-04 11:27:08 +00:00
Kim Carlbäcker 3fe555a751 Add note about rebase/squash duplication in Gitaly 2018-05-04 10:45:20 +00:00
Douwe Maan 639cf5617f Merge branch 'zj-fork-opt-out' into 'master'
Forking repositories is handled by Gitaly by default

See merge request gitlab-org/gitlab-ce!18679
2018-05-03 08:12:04 +00:00