Commit Graph

674 Commits

Author SHA1 Message Date
GitLab Bot 183b715218 Add latest changes from gitlab-org/gitlab@master 2021-09-06 18:11:17 +00:00
GitLab Bot a9ae162270 Add latest changes from gitlab-org/gitlab@master 2021-08-31 12:11:07 +00:00
GitLab Bot 326b4d3216 Add latest changes from gitlab-org/gitlab@master 2021-08-25 09:10:52 +00:00
GitLab Bot 234dc40a12 Add latest changes from gitlab-org/gitlab@master 2021-08-24 15:10:36 +00:00
GitLab Bot b28d414aef Add latest changes from gitlab-org/gitlab@master 2021-08-19 09:10:34 +00:00
GitLab Bot 4d68d8b937 Add latest changes from gitlab-org/gitlab@master 2021-08-11 12:10:59 +00:00
GitLab Bot 24fca38040 Add latest changes from gitlab-org/gitlab@master 2021-08-05 03:10:19 +00:00
GitLab Bot 2dedd78ef5 Add latest changes from gitlab-org/gitlab@master 2021-07-29 12:08:55 +00:00
GitLab Bot fd3d0d4c2c Add latest changes from gitlab-org/gitlab@master 2021-07-29 06:10:15 +00:00
GitLab Bot aeee5b6a21 Add latest changes from gitlab-org/gitlab@master 2021-07-28 09:09:47 +00:00
GitLab Bot ec3483bd18 Add latest changes from gitlab-org/gitlab@master 2021-07-26 09:09:00 +00:00
GitLab Bot 1072f96e34 Add latest changes from gitlab-org/gitlab@master 2021-07-19 12:10:08 +00:00
GitLab Bot 01ef10900a Add latest changes from gitlab-org/gitlab@master 2021-07-15 06:09:39 +00:00
GitLab Bot 8a37720edf Add latest changes from gitlab-org/gitlab@master 2021-06-24 15:07:28 +00:00
GitLab Bot 9fcbd94aaa Add latest changes from gitlab-org/gitlab@master 2021-05-31 18:09:56 +00:00
GitLab Bot 03c84e0de5 Add latest changes from gitlab-org/gitlab@master 2021-05-27 06:10:47 +00:00
GitLab Bot 25db9c1230 Add latest changes from gitlab-org/gitlab@master 2021-05-06 12:10:38 +00:00
GitLab Bot be4b3134a2 Add latest changes from gitlab-org/gitlab@master 2021-05-04 15:10:36 +00:00
GitLab Bot 1769b59b9f Add latest changes from gitlab-org/gitlab@master 2021-04-01 18:13:56 +00:00
GitLab Bot cb840235d7 Add latest changes from gitlab-org/gitlab@master 2021-03-17 15:09:03 +00:00
GitLab Bot 8106ac487c Add latest changes from gitlab-org/gitlab@master 2021-01-14 15:10:46 +00:00
GitLab Bot a2f16969fa Add latest changes from gitlab-org/gitlab@master 2020-12-04 06:09:34 +00:00
GitLab Bot 9ae0f24e76 Add latest changes from gitlab-org/gitlab@master 2020-10-31 00:09:08 +00:00
GitLab Bot 3775eba7c1 Add latest changes from gitlab-org/gitlab@master 2020-10-16 12:09:33 +00:00
GitLab Bot c083f926c5 Add latest changes from gitlab-org/gitlab@master 2020-10-15 21:09:12 +00:00
GitLab Bot 4d922922a9 Add latest changes from gitlab-org/gitlab@master 2020-10-06 15:08:33 +00:00
GitLab Bot 7dc8bd3c16 Add latest changes from gitlab-org/gitlab@master 2020-09-15 21:09:35 +00:00
GitLab Bot 537882ad40 Add latest changes from gitlab-org/gitlab@master 2020-09-10 00:08:32 +00:00
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot 1b26aaa633 Add latest changes from gitlab-org/gitlab@master 2020-07-30 18:09:39 +00:00
GitLab Bot 3ce55b46df Add latest changes from gitlab-org/gitlab@master 2020-07-22 18:09:27 +00:00
GitLab Bot fe29f106cd Add latest changes from gitlab-org/gitlab@master 2020-07-17 09:09:43 +00:00
GitLab Bot 757d2fda7e Add latest changes from gitlab-org/gitlab@master 2020-06-26 21:08:51 +00:00
GitLab Bot 901af2a0dd Add latest changes from gitlab-org/gitlab@master 2020-06-23 18:09:28 +00:00
GitLab Bot 1127990db8 Add latest changes from gitlab-org/gitlab@master 2020-06-22 03:08:17 +00:00
GitLab Bot 95ad46159e Add latest changes from gitlab-org/gitlab@master 2020-03-30 21:08:01 +00:00
GitLab Bot 154b9bae14 Add latest changes from gitlab-org/gitlab@master 2020-03-17 21:09:16 +00:00
GitLab Bot 9345f69894 Add latest changes from gitlab-org/gitlab@master 2020-03-17 03:09:27 +00:00
GitLab Bot 3cd08f4bf9 Add latest changes from gitlab-org/gitlab@master 2020-03-13 00:09:34 +00:00
GitLab Bot 619d0b6922 Add latest changes from gitlab-org/gitlab@master 2020-02-26 18:09:24 +00:00
GitLab Bot cfaf1cca44 Add latest changes from gitlab-org/gitlab@master 2020-02-16 21:08:53 +00:00
GitLab Bot 0d6fa03312 Add latest changes from gitlab-org/gitlab@master 2020-02-06 18:08:54 +00:00
GitLab Bot fa478f1890 Add latest changes from gitlab-org/gitlab@master 2020-02-06 06:08:52 +00:00
GitLab Bot c8f773a859 Add latest changes from gitlab-org/gitlab@master 2020-01-30 21:08:47 +00:00
GitLab Bot 727b1a890c Add latest changes from gitlab-org/gitlab@master 2020-01-16 21:08:24 +00:00
GitLab Bot 29c01c6c91 Add latest changes from gitlab-org/gitlab@master 2019-11-14 03:06:25 +00:00
GitLab Bot 4f4dcd3c5d Add latest changes from gitlab-org/gitlab@master 2019-10-02 15:06:12 +00:00
dineshpanda e908e11776 Avoid calling freeze on already frozen strings in lib/gitlab 2019-09-04 09:52:02 +05:30
Stan Hu 291df05e43 Add Rugged calls to performance bar
This will help diagnose the source of excessive I/O from Rugged
calls. To implement this, we need to obtain the full list of arguments
sent to each request method.
2019-07-23 21:38:05 -07:00
Markus Koller f8cecafb07
Add start_sha to commits API
When passing start_branch on committing from the WebIDE, it's possible
that the branch has changed since editing started, which results in the
change being applied on top of the latest commit in the branch and
overwriting the new changes.

By passing the start_sha instead we can make sure that the change is
applied on top of the commit which the user started editing from.
2019-07-18 09:19:18 +02:00
Igor 0f46886880 Added submodule links to Submodule type in GraphQL API
This is part of migration of Folder View to Vue
2019-07-17 13:06:19 +00: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
Shinya Maeda 48307fac1e Extend MergeToRefService for creating merge ref from the other ref
Currently, MergeToRefService is specifically designed for
createing merge commits from source branch and target branch of
merge reqeusts. We extend this behavior to source branch and any
target ref paths.
2019-07-05 17:15:10 +07:00
GitalyBot e7b54b9cb8 Fix broken worktree test
The setup was wrong, and due to Gitaly being a bit more strict it had to
match up. The test is now accurate and passing again.
2019-06-25 14:45:51 +00:00
Luke Duncalfe dcf811ba14 CE backport for changes in EE MR 14017
This backports to CE changes to allow the EE model
DesignManagement::Repository to override the #attributes_at method to
provide its own git attributes.

The #attributes_at method was freely available, as it's never called by
anything in the app. It looks like the code that called it got
refactored out of existence in ca66a04f. It was still being called in a
spec
85b29c1c2f/spec/services/files/create_service_spec.rb (L40)
which I've left because with the change in Lfs::FileTransformer in fact
is now again the perfect test!

See EE MR
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14017

And these comment threads
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178002089
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178049984
2019-06-19 17:51:57 +00:00
Patrick Bajao 40fd0b9e40 Add client code to call GetObjectDirectorySize RPC
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13460
2019-06-05 20:58:46 +08:00
Zeger-Jan van de Weg 951afba624
Remove hook directory requirement from Shell
It used to be the case that GitLab created symlinks for each repository
to one copy of the Git hooks, so these ran when required. This changed
to set the hooks dynamically on Gitaly when invoking Git.

The side effect is that we didn't need all these symlinks anymore, which
Gitaly doesn't create anymore either. Now that means that the tests in
GitLab-Rails should test for it either.

Related: https://gitlab.com/gitlab-org/gitaly/issues/1392#note_175619926
2019-05-30 20:04:08 +02:00
John Cai f86797b5a9 Omit max-count for diverging_commit_counts behind feature flag
We want to optimize the query for the CountDivergingCommits rpc by
removing the --max-count argument now that we have commit graphs
enabled for all repositories during housekeeping. However, we want to
test this first behind a feature flag.
2019-05-14 12:13:19 -05:00
John Cai 0e033b3124 Add client methods for DisconnectGitAlternates rpc
DisconnectGitAlternates is a Gitaly RPC that will delete a repository's
objects/info/alternates file. This commit adds client support for that
RPC.
2019-05-03 15:59:28 -07:00
Luke Duncalfe 49cb4b3dfc Add support for two-step Gitaly Rebase RPC
The new two-step Gitaly `Rebase` RPC yields the rebase commit SHA to the
client before proceeding with the rebase.

This avoids an issue where the rebase commit SHA was returned when the
RPC had fully completed, and in some cases this would be after the Rails
`post_receive` worker services had already run. In these situations,
the merge request did not yet have its rebase_commit_sha attribute set
introducing the possibility for bugs (such as previous approvals being
reset).

https://gitlab.com/gitlab-org/gitlab-ee/issues/5966
2019-05-02 17:30:07 +00:00
Bob Van Landuyt 33cf8edae1 Port changes for design management to CE
This ports the changes from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10462/
to CE
2019-04-29 08:28:43 +02:00
Oswaldo Ferreira 976d373ac1 Make use of local ref if it is reachable 2019-04-19 16:01:49 -03:00
Stan Hu 54d64ec9f6 Remove source_branch_name commit check
This should already be done in Gitlab::Git:Compare.
2019-04-18 22:01:51 -03:00
Stan Hu 26653eb035 Don't create a temp reference for branch comparisons within project
A temp reference is only needed to fetch a branch from another project,
as in the case for forked repositories. For branch comparisons within
the same project, we can just use the existing branch names to do the
comparison.

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/38689#note_126107862
2019-04-18 22:01:51 -03:00
Nick Thomas 2845e8d973
Revert "Revert "Merge branch '24704-download-repository-path' into 'master'""
This reverts commit 171818df0a.
2019-04-16 15:16:23 +01:00
Rémy Coutable 51119395e6 Merge branch 'revert-24704-download-repository-path' into 'master'
Revert "Merge branch '24704-download-repository-path' into 'master'"

See merge request gitlab-org/gitlab-ce!27249
2019-04-11 10:01:52 +00:00
Patrick Bajao 171818df0a Revert "Merge branch '24704-download-repository-path' into 'master'"
This reverts commit 6c75bd015c, reversing
changes made to 1be7f5aaa3.
2019-04-11 15:49:53 +08:00
John Cai 674b926ef4 Guard against nil dereferenced_target 2019-04-10 11:39:36 -07:00
Patrick Bajao 6766a0a144 Download a folder from repository
Add `GetArchiveRequest` to git-archive params.

Modifies `Git::Repository#archive_metadata` to append `path`
to `ArchivePrefix` so it'll not hit the cache of repository archive
when it already exists.
2019-04-02 22:07:16 +08:00
Yorick Peterse 31fb547f6c
Backport Gitaly dynamic timeouts from EE
EE added the ability to set timeouts when handling blobs. Since there's
no particular reason for this to be EE specific we can just backport
this to CE.
2019-03-12 11:10:40 +01:00
Douwe Maan d655ed379f Merge branch 'sh-rugged-commit-is-ancestor' into 'master'
Bring back Rugged implementation of CommitIsAncestor

See merge request gitlab-org/gitlab-ce!25702
2019-03-07 11:36:12 +00:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
Patrick Bajao de5aef3bbd Accept force option on commit via API
When `force` is set to `true` and `start_branch` is set, the
branch will be ovewritten with the new commit based on the
`HEAD` of the `start_branch`.

This commit includes changes to update the `gitaly-proto` gem.
2019-03-06 10:44:59 +00:00
Stan Hu 9d294467bd Bring back Rugged implementation of CommitIsAncestor
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20095.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged is more performant than Gitaly. This merge request introduces
the feature flag `rugged_commit_is_ancestor` to activate the Rugged
path.

Part of four Rugged changes identified in
https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
2019-03-04 12:21:31 -08:00
Stan Hu fb6a4e21d4 Bring back Rugged implementation of find_commit
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20339.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged is more performant than Gitaly. This merge request introduces
the feature flag `rugged_find_commit` to activate Rugged paths.

There are also Rake tasks `gitlab:features:enable_rugged` and
`gitlab:features:disable_rugged` to enable/disable these feature
flags altogether.

Part of four Rugged changes identified in
https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
2019-03-01 08:45:51 -08:00
Oswaldo Ferreira 1ad699677f Support merge to ref for merge-commit and squash
Adds the ground work for writing into
the merge ref refs/merge-requests/:iid/merge the
merge result between source and target branches of
a MR, without further side-effects such as
mailing, MR updates and target branch changes.
2019-02-25 10:40:58 -03:00
John Cai 1f2f38f59a Add client support for count diverging commits
Adds the client call for the gitaly rpc CountDivergingCommits

fixing signature

simplifying commit logic

adding test for max-count

refactoring tests
2019-02-06 22:25:37 -08: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 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
Nick Thomas 067dc6540c
Validate bundle files before unpacking them 2019-01-10 21:33:36 +00:00
Zeger-Jan van de Weg 896c0bdbfb
Allow public forks to be deduplicated
When a project is forked, the new repository used to be a deep copy of everything
stored on disk by leveraging `git clone`. This works well, and makes isolation
between repository easy. However, the clone is at the start 100% the same as the
origin repository. And in the case of the objects in the object directory, this
is almost always going to be a lot of duplication.

Object Pools are a way to create a third repository that essentially only exists
for its 'objects' subdirectory. This third repository's object directory will be
set as alternate location for objects. This means that in the case an object is
missing in the local repository, git will look in another location. This other
location is the object pool repository.

When Git performs garbage collection, it's smart enough to check the
alternate location. When objects are duplicated, it will allow git to
throw one copy away. This copy is on the local repository, where to pool
remains as is.

These pools have an origin location, which for now will always be a
repository that itself is not a fork. When the root of a fork network is
forked by a user, the fork still clones the full repository. Async, the
pool repository will be created.

Either one of these processes can be done earlier than the other. To
handle this race condition, the Join ObjectPool operation is
idempotent. Given its idempotent, we can schedule it twice, with the
same effect.

To accommodate the holding of state two migrations have been added.
1. Added a state column to the pool_repositories column. This column is
managed by the state machine, allowing for hooks on transitions.
2. pool_repositories now has a source_project_id. This column in
convenient to have for multiple reasons: it has a unique index allowing
the database to handle race conditions when creating a new record. Also,
it's nice to know who the host is. As that's a short link to the fork
networks root.

Object pools are only available for public project, which use hashed
storage and when forking from the root of the fork network. (That is,
the project being forked from itself isn't a fork)

In this commit message I use both ObjectPool and Pool repositories,
which are alike, but different from each other. ObjectPool refers to
whatever is on the disk stored and managed by Gitaly. PoolRepository is
the record in the database.
2018-12-07 19:18:37 +01:00
Bob Van Landuyt 67f2faa72d Don't specify `shell` for Gitaly write-ref
Use shelling out to git to write refs instead of rugged, hoping to
avoid creating invalid refs.

To update HEAD we switched to using `git symbolic-ref`.
2018-11-26 16:44:26 +01:00
Douwe Maan 4b7e9eaacd
Treat Repository instances with the same disk path as the same hash key 2018-11-26 11:15:18 +01:00
Sean McGivern 2bc4a17dec Merge branch 'revert-fd6e3781' into 'master'
Revert "Merge branch 'revert-e2aa2177' into 'master'"

Closes #54267

See merge request gitlab-org/gitlab-ce!23237
2018-11-22 09:50:34 +00:00
Takuya Noguchi e902f462c2 Eliminate duplicated words
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
2018-11-22 01:01:23 +09:00
Zeger-Jan van de Weg 16346eb5b9 Revert "Merge branch 'revert-e2aa2177' into 'master'"
This reverts merge request !23229
2018-11-20 12:29:56 +00:00
Sean McGivern 2742b871fe Revert "Merge branch 'zj-improve-gitaly-pb' into 'master'"
This reverts merge request !23140
2018-11-20 10:36:52 +00:00
Zeger-Jan van de Weg 35239a6aec
Show what RPC is called in the performance bar
Now only the data was shown of the service, which is not valueable at
times given some of those expose a lot of RPCs.
2018-11-16 12:16:25 +01:00
Stan Hu 6494467a19 Merge branch 'frozen-string-lib-gitlab-even-more' into 'master'
Enable even more frozen string in lib/gitlab

See merge request gitlab-org/gitlab-ce!22959
2018-11-15 19:50:53 +00:00
Oswaldo Ferreira 039df0267e Avoid Gitaly RPC errors when fetching diff stats 2018-11-14 17:33:30 -02:00
gfyoung ebf98f27c4 Enable even more frozen string in lib/gitlab
Enables frozen string for the following:

* lib/gitlab/fogbugz_import/**/*.rb
* lib/gitlab/gfm/**/*.rb
* lib/gitlab/git/**/*.rb
* lib/gitlab/gitaly_client/**/*.rb
* lib/gitlab/gitlab_import/**/*.rb
* lib/gitlab/google_code_import/**/*.rb
* lib/gitlab/gpg/**/*.rb
* lib/gitlab/grape_logging/**/*.rb
* lib/gitlab/graphql/**/*.rb
* lib/gitlab/graphs/**/*.rb
* lib/gitlab/hashed_storage/**/*.rb
* lib/gitlab/health_checks/**/*.rb

Partially address gitlab-org/gitlab-ce#47424.
2018-11-13 11:42:15 -08:00
Francisco Javier López 28cbb2acfe
Add submodule update API endpoint
This new endpoint allow users to update a submodule's reference.

The MR involves adding a new operation RPC operation in gitaly-proto
(see gitlab-org/gitaly-proto!233) and change Gitaly to use this
new version (see gitlab-org/gitaly!936).

See gitlab-org/gitlab-ce!20949
2018-11-07 14:03:30 +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
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
Bob Van Landuyt 71d71afb3a Allow getting the merge base of multiple revisions
As we now support getting the merge base for multiple revisions in
gitaly, we can provide this functionality in our API
2018-10-12 11:41:22 +02: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
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
Tiago Botelho a583f137dd Removes N+1 gitaly rpc call to fetch the last commit for path
Implements list_last_commits_for_tree to communicate with the
ListLastCommitsForTree Gitaly RPC

Bumps the Gitaly server version

Bumps the Gitaly-Proto gem version
2018-10-01 13:29:47 +01:00
Oswaldo Ferreira 5dce096cf8 Use standalone diff stats RPC on every comparison view 2018-09-19 12:26:28 +00:00
Douwe Maan a2a00a5e6d Merge branch '51564-fix-commit-email-usage' into 'master'
Respect the user commit email in more places

Closes #51564

See merge request gitlab-org/gitlab-ce!21773
2018-09-18 12:07:52 +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 f54cada7b7
Remove Gitlab::Git::Repository#user_to_committer 2018-09-17 14:44:24 +01:00
Alejandro Rodríguez d3c5b07962 Remove Rugged and shell code from Gitlab::Git 2018-09-12 12:32:32 -03:00
Douglas Barbosa Alexandre 460badd8cc
Add Gitlab::Git::Repository#find_remote_root_ref 2018-09-06 16:01:48 -03:00
Zeger-Jan van de Weg 295e582142
Remove feature flags for UserUpdateBranch
This has been tested on .com. So far no errors have been seen.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1310
Closes https://gitlab.com/gitlab-org/gitaly/issues/1246
2018-08-16 10:24:26 +02:00
Zeger-Jan van de Weg 5ddc9ad0b9
Remove feature gate for ListNewCommits
Introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20087,
this has been tested on .com now, and is stable.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1286
Closes https://gitlab.com/gitlab-org/gitaly/issues/1233
2018-08-14 10:34:15 +02:00
Rubén Dávila 6688a719c4 Backport of gitlab-org/gitlab-ee!6848 2018-08-08 16:18:37 -05:00
Rubén Dávila 5c748a0bd9 Backport some changes from gitlab-org/gitlab-ee!6767 2018-08-07 06:13:48 -05:00
Alejandro Rodríguez 01de2b5df8 Refactor gitlab:import:repos task to remove direct disk access 2018-07-31 16:28:44 -04:00
Jacob Vosmaer (GitLab) 3f0e6d9205 More Gitaly cleanup: fetch_ref, allow disk access blocks 2018-07-27 08:43:19 +00:00
Zeger-Jan van de Weg ad73953772
Make repository cleanup mandatory 2018-07-24 13:25:27 +02:00
Jacob Vosmaer (GitLab) 4147a2dbbd Annotate Gitlab::Git::Repository#fetch_ref 2018-07-24 06:33:55 +00:00
Alejandro Rodríguez d4c3a9ab41 Remove unused rugged code that is currently on Gitaly 2018-07-20 14:47:50 -04:00
Sean McGivern 256e7a6396 Merge branch 'zj-gitaly-migrate-old-migrations' into 'master'
Gitaly migrate old DB migrations

Closes gitaly#1106

See merge request gitlab-org/gitlab-ce!20708
2018-07-20 10:21:05 +00:00
Alejandro Rodríguez fa1ea656f7 Migrate add_remote, remove_remote, fetch_internal_remote to gitaly 2018-07-19 15:07:37 -04:00
Zeger-Jan van de Weg cfbb256b8b
MigrateProcessCommitWorkerJobs to use Gitaly
This old migration used Rugged to find a commit, while Gitaly is the
prefered way now. By migrating this to Gitaly, Gitaly is now a required
running component for this migration.

Part of https://gitlab.com/gitlab-org/gitaly/issues/1106
2018-07-19 13:34:10 +02: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) 830940f422 Migrate merge base, merged branches, write ref 2018-07-17 09:00:32 +00:00
Jacob Vosmaer (GitLab) 37eca76583 Remove Repository#lookup and unreachable rugged code 2018-07-16 10:34:31 +00:00
Jacob Vosmaer 9d93a61a70 Fix find_branch call sites 2018-07-12 18:06:31 +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
Rémy Coutable 7358211ece Merge branch '49057-fix-repository-typo' into 'master'
Fix a typo in Gitlab::Git::Repository

See merge request gitlab-org/gitlab-ce!20520
2018-07-10 13:32:20 +00:00
Douwe Maan 937d916b5f Merge branch 'gitaly-mandatory-20180709-jv' into 'master'
Use Gitaly for fetches and creating bundles

Closes gitaly#387, gitaly#874, gitaly#750, and gitaly#665

See merge request gitlab-org/gitlab-ce!20490
2018-07-10 10:22:05 +00:00
Lin Jen-Shin 1f28f4567b Fix a typo? gitaly_operation{-s-}_client 2018-07-10 16:52:34 +08:00
Sean McGivern 2a4039cf66 Merge branch 'update-rubocop' 2018-07-09 17:23:30 +01:00
Robert Speicher 2cedb243ee Merge branch 'gitaly-update-branch' into 'master'
Use Gitaly's OperationService.UserUpdateBranch RPC

Closes gitaly#1252

See merge request gitlab-org/gitlab-ce!20231
2018-07-09 16:12:18 +00:00
Lin Jen-Shin 9286f5b934 Use stable gitlab-styles and eliminate offenses 2018-07-09 21:13:08 +08:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08: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
Douwe Maan 090f4d9e9f Merge branch 'gitaly-mandatory-20180706-jv' into 'master'
Remove gitaly_list_commits_by_oid, gitaly_commit_deltas, gitaly_create_repository flags

Closes gitaly#593, gitaly#566, and gitaly#670

See merge request gitlab-org/gitlab-ce!20432
2018-07-09 09:59:51 +00:00
Grzegorz Bizon 1a78483b49 Merge branch 'gitaly-diff-mandatory' into 'master'
Make all Gitaly diff flags mandatory

Closes gitaly#528 and gitaly#222

See merge request gitlab-org/gitlab-ce!20424
2018-07-09 09:42:30 +00:00
Alejandro Rodríguez 4a4338fcc6 Use Gitaly's OperationService.UserUpdateBranch RPC 2018-07-08 23:27:20 -04:00
Jacob Vosmaer c770d2f96e Make more things mandatory 2018-07-06 14:44:54 +02:00
Jacob Vosmaer ff112ce641 Add Repository#set_config and #delete_config 2018-07-06 12:06:54 +02:00
Jacob Vosmaer b012abee8b Make all Gitaly diff flags mandatory 2018-07-06 12:01:15 +02:00
Jacob Vosmaer (GitLab) 64dfe2cba1 Revert "Merge branch 'gitaly-mandatory-20180703-jv' into 'master'"
This reverts merge request !20339
2018-07-05 10:22:04 +00:00
Sean McGivern 7a355f6856 Merge branch 'gitaly-mandatory-20180703-jv-2' into 'master'
Remove more Gitaly feature flags

Closes gitaly#329, gitaly#320, gitaly#323, and gitaly#328

See merge request gitlab-org/gitlab-ce!20343
2018-07-04 10:39:59 +00:00
Jacob Vosmaer (GitLab) 78708b1932 Make more Gitaly features mandatory 2018-07-04 07:39:59 +00: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 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 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 be5e6d586f Make search and message RPC's mandatory 2018-06-27 13:46:51 +02:00
Alejandro Rodríguez c6ff7bfaec Move git calls for `Repository#update_branch` inside Gitlab::Git
This prepares this code for migration to Gitaly.
2018-06-25 19:49:55 -04: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 fe03ff90c2 Merge branch 'zj-is-anchestor' into 'master'
Ancestor check is Gitaly only now

Closes gitaly#789 and gitaly#308

See merge request gitlab-org/gitlab-ce!20095
2018-06-25 15:28:19 +00:00