Oswaldo Ferreira
039df0267e
Avoid Gitaly RPC errors when fetching diff stats
2018-11-14 17:33:30 -02:00
Bob Van Landuyt
6fbdc5ed52
Apply patches when creating MR via email
...
This allows users to add patches as attachments to merge request
created via email.
When an email to create a merge request is sent, all the attachments
ending in `.patch` will be applied to the branch specified in the
subject of the email. If the branch did not exist, it will be created
from the HEAD of the repository.
When the patches could not be applied, the error message will be
replied to the user.
The patches can have a maximum combined size of 2MB for now.
2018-11-07 16:27:55 +01: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
Achilleas Pipinellis
7f47e13218
Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'
...
Fix typos in comments and specs
See merge request gitlab-org/gitlab-ce!22683
2018-11-01 10:34:23 +00:00
George Tsiolis
733ae94921
Fix typos in comments and specs
2018-11-01 08:59:20 +02:00
Douwe Maan
571e651b21
Merge branch 'add-language-param-to-highlight' into 'master'
...
Add language param to highlight
See merge request gitlab-org/gitlab-ce!21584
2018-10-30 20:44:03 +00:00
Bob Van Landuyt
81f5955eb6
Move Repository#wrapped_gitaly_errors into concern
...
Having this in a concern allows us to reuse it for different single
purpose classes that call out to git without going through the
repository every time.
2018-10-30 15:53:46 +01:00
Mark Chao
6f03784857
Add spec for Gitlab::Git::Repository#attributes
...
seed_helper changed because testing requires attributes file in repo,
but repo was not a real git repo but instead faked.
2018-10-30 15:44:55 +08:00
Tiago Botelho
084a8b6101
Adds tracing messages for slow git pushes
...
Whenever a git push takes more than 50 seconds the user
will receive a trace from each check performed along with
their timings
2018-10-25 10:10:45 +01:00
Nick Thomas
c5bff77ea4
Remove a dependency on gitlab-gollum-lib
...
Inlining this code allows us to remove a dependency on gitlab_grit in
gitlab-ce. We can't stop maintaining gitlab_grit yet, since gitaly-ruby
still depends on this gem, but it moves us a step closer.
2018-10-16 12:53:30 +01:00
Zeger-Jan van de Weg
399056ed78
Remove dependencies on Linguist
...
This saves about 128 MB of baseline RAM usage per Unicorn and
Sidekiq process (!).
Linguist wasn't detecting languages anymore from CE/EE since
9ae8b57467 . However, Linguist::BlobHelper
was still being depended on by BlobLike and others.
This removes the Linguist gem, given it isn't required anymore.
EscapeUtils were pulled in as dependency, but given Banzai depends on
it, it is now added explicitly.
Previously, Linguist was used to detect the best ACE mode. Instead,
we rely on ACE to guess the best mode based on the file extension.
2018-10-12 17:17:30 -07:00
Zeger-Jan van de Weg
30b4ce940d
Remove Git circuit breaker
...
Was introduced in the time that GitLab still used NFS, which is not
required anymore in most cases. By removing this, the API it calls will
return empty responses. This interface has to be removed in the next
major release, expected to be 12.0.
2018-10-10 09:08:18 +02:00
Kamil Trzciński
84c4e920cd
Merge branch 'master' into 'feature/gb/pipeline-only-except-with-modified-paths'
...
# Conflicts:
# app/models/ci/pipeline.rb
2018-10-04 16:52:48 +00:00
Alejandro Rodríguez
a99bf447a2
Remove Gitlab::Git::Repository#rugged and Gollum code
...
Cleanup code, and refactor tests that still use Rugged. After this, there should
be no Rugged code that access the instance's repositories on non-test
environments. There is still some rugged code for other tasks like the
repository import task, but since it doesn't access any repository storage path
it can stay.
2018-10-02 16:34:28 -03:00
Grzegorz Bizon
1c4187e38e
Treat nil git push revisons as a blank Git SHA value
2018-10-02 13:01:55 +02:00
Grzegorz Bizon
9bad9b0a68
Improve specs for git push class
...
This helps to prevent problems with off-by-one commmit problem in
`Gitlab::Git::Push#modified_paths`.
2018-09-28 15:38:36 +02:00
Grzegorz Bizon
419d8cc7a2
Calculate modified paths of a git push operation
2018-09-28 15:13:04 +02:00
Grzegorz Bizon
4abba28944
Add specs for extracted git push class
2018-09-28 14:46:22 +02:00
Michael Kozono
a54a5d9f39
Use `Gitlab::SafeRequestStore` in more places
...
Even if it doesn’t save lines of code, since people will tend to use
code they’ve seen. And `SafeRequestStore` is safer since you
don’t have to remember to check `RequestStore.active?`.
2018-09-24 12:11:27 -07:00
Oswaldo Ferreira
5dce096cf8
Use standalone diff stats RPC on every comparison view
2018-09-19 12:26:28 +00:00
Douwe Maan
bff85a4b1c
Merge branch 'osw-gitaly-diff-stats-client' into 'master'
...
Add Gitaly diff stats RPC client
See merge request gitlab-org/gitlab-ce!21732
2018-09-17 16:29:42 +00:00
Oswaldo Ferreira
c9d6c02f15
Add Gitaly diff stats RPC client
...
This adds a basic interface to fetch diff statistics given two SHAs.
It's a requirement for #49399 #20282 and #19232 .
2018-09-17 12:27:01 -03:00
Nick Thomas
fc0194b589
Resolve "Add functionality to change what email address online actions commit using"
2018-09-14 09:52:09 +00:00
Douglas Barbosa Alexandre
5d8e41fd35
Update Gitlay server version to 0.121.0
2018-09-13 15:36:14 -03:00
Alejandro Rodríguez
d3c5b07962
Remove Rugged and shell code from Gitlab::Git
2018-09-12 12:32:32 -03:00
Douglas Barbosa Alexandre
42c061781a
Encode remote root ref
2018-09-07 08:45:37 -03:00
Douglas Barbosa Alexandre
460badd8cc
Add Gitlab::Git::Repository#find_remote_root_ref
2018-09-06 16:01:48 -03:00
Michael Kozono
51dc249f44
Fix typo
2018-08-18 00:18:58 -07:00
Bob Van Landuyt
7466df872c
Get the `merge-base` of 2 refs trough the API
...
This adds an endpoint to get the common ancestor of 2 refs from the API.
2018-08-13 11:58:54 +02:00
Alejandro Rodríguez
01de2b5df8
Refactor gitlab:import:repos task to remove direct disk access
2018-07-31 16:28:44 -04:00
Stan Hu
c8ff6b7c73
Use limit parameter to retrieve Wikis from Gitaly
...
Without this parameter, every load of a Wiki page will load all the Wiki pages
in the repository for the sidebar. This is a significant performance penalty
that can significant slow the display of all Wiki pages.
Relates to #40101
2018-07-24 15:36:31 -07:00
Alejandro Rodríguez
fa1ea656f7
Migrate add_remote, remove_remote, fetch_internal_remote to gitaly
2018-07-19 15:07:37 -04:00
Alejandro Rodríguez
68b1e5a97c
Incorporate Gitaly's RefService.FindAllRemoteBranches RPC
2018-07-18 16:48:47 -04:00
Zeger-Jan van de Weg
9348efc6ba
Client implementation for Repository#new_commits
...
After trying to remove the whole method in
8f69014af2902d8d53fe931268bec60f6858f160, this is a more gentle
approach to the method. :)
Prior to this change, new commit detection wasn't implemented in Gitaly,
this was done through: https://gitlab.com/gitlab-org/gitaly/merge_requests/779
As the new implemented got moved around a bit, the whole RevList class
got removed.
Part of https://gitlab.com/gitlab-org/gitaly/issues/1233
2018-07-18 14:46:27 +02:00
Jacob Vosmaer (GitLab)
5c651daa97
Remove unreachable Git code
2018-07-18 11:12:57 +00:00
Jacob Vosmaer (GitLab)
37eca76583
Remove Repository#lookup and unreachable rugged code
2018-07-16 10:34:31 +00:00
Yorick Peterse
9451c80ac9
Merge branch 'sh-fix-stderr-pipe-consumption' into 'master'
...
Avoid process deadlock in popen by consuming input pipes
Closes gitlab-ee#6895
See merge request gitlab-org/gitlab-ce!20600
2018-07-13 13:14:34 +00:00
Stan Hu
fd392cd725
Avoid process deadlock in popen by consuming input pipes
...
A process that spews a lot of output to stderr or stdout could stall out
due to the pipe buffer being full. As described in https://bugs.ruby-lang.org/issues/9082 ,
we can use the trick used in Ruby's capture3 function to read the pipes in separate
threads.
Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6895
2018-07-12 16:21:30 -07:00
Jacob Vosmaer
40ed88b784
whitespace
2018-07-12 15:35:24 +02:00
Jacob Vosmaer
d1d7144b96
Make more ref RPC's mandatory
2018-07-12 15:12:00 +02:00
Jacob Vosmaer (GitLab)
62ffad0802
Remove Repository#path memoization
2018-07-12 09:49:25 +00:00
Jacob Vosmaer
723f74d49d
Remove last flags from Blob and Workhorse
2018-07-11 12:59:15 +02:00
Jacob Vosmaer
a4e75e7a83
Use Gitaly for fetches and creating bundles
2018-07-09 12:50:17 +02:00
Jacob Vosmaer (GitLab)
3082b7d1c2
Make blob and other RPC's mandatory
2018-07-09 10:02:02 +00:00
Jacob Vosmaer
ff112ce641
Add Repository#set_config and #delete_config
2018-07-06 12:06:54 +02:00
Jacob Vosmaer
201802f723
Remove more feature flags
2018-07-03 17:39:08 +02:00
Jacob Vosmaer (GitLab)
15aadc665f
Make OperationService RPC's mandatory
2018-07-03 09:12:03 +00:00
Douwe Maan
e28896ce0d
Merge branch 'zj-find-all-commits' into 'master'
...
FindAllCommits mandatory
Closes gitaly#326
See merge request gitlab-org/gitlab-ce!20242
2018-06-28 13:11:00 +00:00
Douwe Maan
37b1922237
Merge branch 'zj-commits-between-mandatory' into 'master'
...
Commits between in Gitaly only
Closes gitaly#315
See merge request gitlab-org/gitlab-ce!20239
2018-06-28 13:10:07 +00:00
Zeger-Jan van de Weg
ec78d29a6e
FindAllCommits mandatory
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/326
2018-06-28 13:42:10 +02:00
Zeger-Jan van de Weg
f369da063f
Commits between in Gitaly only
...
Prior to this change, most the commits counted were done through Gitaly.
This removes the last point where this wasn't the case.
This makes the `rugged_count_commits` method obsolete, with its tests.
Closes https://gitlab.com/gitlab-org/gitaly/issues/315
2018-06-28 12:09:20 +02:00
Jacob Vosmaer
f4d6834786
Make Gitaly signature RPC's mandatory
2018-06-27 14:32:09 +02:00
Douwe Maan
77fe416681
Merge branch 'zj-create-from-bundle-mandatory' into 'master'
...
Moves CreateFromBundle RPC to mandatory
Closes gitaly#944
See merge request gitlab-org/gitlab-ce!20144
2018-06-25 15:29:57 +00:00
Douwe Maan
246ce5b5f9
Merge branch 'zj-write-config' into 'master'
...
Write Config is mandatory
Closes gitaly#879
See merge request gitlab-org/gitlab-ce!20146
2018-06-25 15:27:41 +00:00
Zeger-Jan van de Weg
29b4d657be
Moves another RPC to mandatory
...
This specific one isn't used on most machines, therefor low risk.
Closes https://gitlab.com/gitlab-org/gitaly/issues/944
2018-06-25 15:55:22 +02:00
Zeger-Jan van de Weg
0855478726
Write Config is mandatory
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/879
2018-06-25 15:08:20 +02:00
Zeger-Jan van de Weg
e91b2b5dff
Gitaly tree entry is mandatory
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/310
2018-06-25 13:48:28 +02:00
Zeger-Jan van de Weg
2ac672280b
Raw changes calculation is Gitaly only now
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/1138
2018-06-21 10:12:51 +02:00
Douwe Maan
c67d8c2478
Merge branch 'zj-lfs-pointers' into 'master'
...
LFS changes are detected by Gitaly
Closes gitaly#935
See merge request gitlab-org/gitlab-ce!19995
2018-06-20 08:29:47 +00:00
Douwe Maan
c0f0ccf222
Merge branch 'zj-force-push-opt-out' into 'master'
...
Force push is handled by Gitaly now
Closes gitaly#348
See merge request gitlab-org/gitlab-ce!19992
2018-06-19 14:19:18 +00:00
Zeger-Jan van de Weg
64cda7746c
LFS changes are detected by Gitaly
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/935
2018-06-19 15:59:27 +02:00
Zeger-Jan van de Weg
c2cdefd441
Force push is handled by Gitaly now
...
Closes gitlab-org/gitaly#348
2018-06-19 15:35:17 +02:00
Douwe Maan
b0fadeee83
Merge branch 'zj-counting-commits' into 'master'
...
Counting commits is done by Gitaly
Closes gitaly#382
See merge request gitlab-org/gitlab-ce!19983
2018-06-19 12:45:49 +00:00
Douwe Maan
f70c581d1f
Merge branch 'zj-linguist-gitaly-mandatory' into 'master'
...
Move language detection to mandatory
Closes gitaly#732 and gitaly#360
See merge request gitlab-org/gitlab-ce!19985
2018-06-19 09:56:45 +00:00
Zeger-Jan van de Weg
c24e39ab88
Counting commits is done by Gitaly
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/382
2018-06-19 10:37:51 +02:00
Zeger-Jan van de Weg
da8419a1ba
License detection happens soley through Gitaly now
...
Migration: https://gitlab.com/gitlab-org/gitaly/issues/1026
Conflicts:
lib/gitlab/git/repository.rb
2018-06-19 09:35:15 +02:00
Zeger-Jan van de Weg
9ae8b57467
Move language detection to mandatory
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/732
Closes https://gitlab.com/gitlab-org/gitaly/issues/360
2018-06-19 09:29:54 +02:00
Jacob Vosmaer (GitLab)
14000a561b
Make Gitaly wiki RPC's mandatory
2018-06-18 08:19:11 +00:00
Sean McGivern
beba4a1d1c
Merge branch 'zj-mandatory-batch' into 'master'
...
Move Gitaly RPCs to mandatory
Closes gitaly#217, gitaly#389, gitaly#390, gitaly#220, gitaly#376, and gitaly#354
See merge request gitlab-org/gitlab-ce!19759
2018-06-14 12:16:05 +00:00
Zeger-Jan van de Weg
3ed4a1b3aa
HasLocalBranches check is done by Gitaly only
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/217
2018-06-14 10:31:24 +02:00
Zeger-Jan van de Weg
89ab32c6b2
Branches are fully migrated to Gitaly
...
Closes: https://gitlab.com/gitlab-org/gitaly/issues/389
2018-06-14 10:25:28 +02:00
Zeger-Jan van de Weg
4fc4600747
Default branch detection happens through Gitaly
...
Migration: https://gitlab.com/gitlab-org/gitaly/issues/220
2018-06-14 09:56:16 +02:00
Zeger-Jan van de Weg
f195a7436d
RawBlame only called through Gitaly
...
Closes https://gitlab.com/gitlab-org/gitaly/issues/376
2018-06-13 16:44:59 +02:00
Zeger-Jan van de Weg
e4a9b0771a
ListCommitByOid isn't called with an empty batch
...
Batching commits for performance improvements, might lead to empty
batches being used. This isn't the case yet, but to guard against this
in future cases, a guard clause is added.
2018-06-13 15:23:34 +02:00
Douwe Maan
8b0d2283d7
Merge branch 'gitaly-disk-access-3' into 'master'
...
Find and mark more Git disk access locations, part 2
See merge request gitlab-org/gitlab-ce!19437
2018-06-12 13:32:46 +00:00
Jacob Vosmaer
f376347f24
Find and mark more Git disk access locations, part 2
2018-06-12 14:33:37 +02:00
Francisco Javier López
ab93f7cc79
Bumping gitlab-gollum-lib and gitlab-gollum-rugged_adapter
2018-06-12 12:31:10 +00:00
Jacob Vosmaer (GitLab)
ea8dc10772
Don't use Gitlab::Utils.nlbr in Gitlab::Git
2018-06-11 10:42:09 +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
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
Kim "BKC" Carlbäcker
0db994fedc
Fix encoding error in Gitaly::Commit::TreeEntry
2018-05-30 17:33:17 +02: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
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
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
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
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
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
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
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
Douwe Maan
9cf4e47341
Merge branch 'security-45689-fix-archive-cache-bug' into 'security-10-7'
...
Serve archive requests with the correct file in all cases (10.7)
See merge request gitlab/gitlabhq!2376
2018-04-30 15:00:14 -05:00