Commit Graph

464 Commits

Author SHA1 Message Date
Sean McGivern 3013951c73 Merge branch 'remove-commit-tree' into 'master'
Remove the Commit#tree method

See merge request gitlab-org/gitlab-ce!16236
2018-01-08 11:31:10 +00:00
Sean McGivern d42c0ecc02 Merge branch 'gitaly-fetch-internal-remote' into 'master'
Incorporate RemoteService.FetchInternalRemote Gitaly RPC

Closes gitaly#857

See merge request gitlab-org/gitlab-ce!16140
2018-01-08 10:42:35 +00:00
Stan Hu c2b7147c2f Fix error 500 when viewing commit and merge request diffs
Due to the refactoring in !16082, `Blob#batch` no longer falls back
to a default `blob_size_limit`. Since `Repository#batch_blobs` was using
a default `nil` value, this would cause issues in the `Blob#find_by_rugged`
method.

This fix here is to be consistent and use a non-nil default value in
`Repository#batch_blobs`.

The problem was masked in development and tests because Gitaly is always
enabled by default for all features.

Closes #41735
2018-01-07 04:49:07 -08:00
Alejandro Rodríguez 9ff44c2986 Incorporate RemoteService.FetchInternalRemote Gitaly RPC 2018-01-05 15:45:24 -03:00
Alejandro Rodríguez 0b07be594e Move git operations for multi_action into Gitlab::Git 2018-01-05 15:17:53 -03:00
Lin Jen-Shin (godfat) 33c5630b02 Use --left-right and --max-count for counting diverging commits 2018-01-05 16:52:06 +00:00
Douwe Maan 3bb68efb7a Merge branch 'zj-blob-batch' into 'master'
Reroute batch blobs to single blob RPC

See merge request gitlab-org/gitlab-ce!16082
2018-01-05 10:47:28 +00:00
Sean McGivern 4dd0c55f05 Merge branch 'fix/prepare-rebase-to-be-migrated-to-gitaly' into 'master'
Prepare Gitlab::Git::Repository#rebase for Gitaly migration

See merge request gitlab-org/gitlab-ce!16192
2018-01-05 10:44:24 +00:00
Zeger-Jan van de Weg 6b15784ce7 Fix typos in a code comment 2018-01-05 09:41:05 +00:00
Jacob Vosmaer ac2cb65ab3 Remove the Commit#tree method 2018-01-04 18:00:28 +01:00
Dmitriy Zaporozhets 58a705aaac Merge branch 'ce-gitaly-remote-mirror-prep' into 'master'
[CE] Move git operations for UpdateRemoteMirrorService into Gitlab::Git

See merge request gitlab-org/gitlab-ce!16023
2018-01-04 16:02:22 +00:00
Ahmad Sherif 0ba0f9de08 Prepare Gitlab::Git::Repository#rebase for Gitaly migration 2018-01-04 12:39:45 +01:00
Rémy Coutable 062ea80e64 Merge branch 'feature/add-max-count-to-count-commits-rpc' into 'master'
Add support for max_count option to Git::Repository#count_commits

See merge request gitlab-org/gitlab-ce!16145
2018-01-04 10:58:47 +00:00
Alejandro Rodríguez 996becdcbb Move git operations for UpdateRemoteMirrorService into Gitlab::Git 2018-01-03 23:09:04 -03:00
Alejandro Rodríguez 1c458d17d7 Move delete_remote_branches from Gitlab::Shell to Gitlab::Git::Repository 2018-01-03 23:07:38 -03:00
Alejandro Rodríguez 43308bd826 Move push_remote_branches from Gitlab::Shell to Gitlab::Git::Repository 2018-01-03 23:06:34 -03:00
Robert Speicher 946a3634bc Merge branch 'sh-optimize-commit-stats' into 'master'
Speed up generation of commit stats by using Rugged native methods

See merge request gitlab-org/gitlab-ce!16186
2018-01-03 17:39:24 +00:00
Robert Speicher f7cb21930a Merge branch 'migrate-fork-repo-to-gitaly' into 'master'
Migrate repo forking to Gitaly

Closes gitaly#825

See merge request gitlab-org/gitlab-ce!16018
2018-01-03 17:35:32 +00:00
Grzegorz Bizon 57906a5322 Merge branch 'gitaly-conflict-resolver' into 'master'
Gitaly conflict resolver

Closes gitaly#813

See merge request gitlab-org/gitlab-ce!15755
2018-01-03 08:39:16 +00:00
Stan Hu 25a868753b Speed up generation of commit stats by using Rugged native methods
The previous implementation iterated across the entire patch set
to determine the number of lines added, deleted, and changed. Rugged
has a native method `Rugged::Diff#stat` that does this already,
which appears to be a little faster and require less RAM than doing
this ourselves.

Improves performance in #41524
2018-01-02 23:48:19 -08:00
Alejandro Rodríguez 65e3a1e9e9 Simplify conflict resolution interface and code
- Add a Gitlab::Git::Conflict::Resolution class to encapsulate
resolution data
- Simplify conflict file collection assembly
2018-01-02 16:22:02 -03:00
Ahmad Sherif 4b5b43383a Migrate repo forking to Gitaly
Closes gitaly#825
2018-01-02 17:20:01 +01:00
Zeger-Jan van de Weg 59e50e33b3
Reroute batch blobs to single blob RPC
Given the priorities shifted for the Gitaly team, this endpoint does not
get a dedicated endpoint yet. To make it work in a cloud native
environment the request needs to go to Gitaly, not rugged. This is
achieved by rerouting to the generic TreeEntry endpoint.
2018-01-02 10:00:24 +01:00
Stan Hu 0ea75205df Merge branch 'gitaly-opt-out' into 'master'
Unmark Gitaly features as OPT_OUT until the gRPC proxy issue is fixed

Closes #38333

See merge request gitlab-org/gitlab-ce!16155
2017-12-28 16:37:55 +00:00
Alejandro Rodríguez 7ed28b9069 Unmark Gitaly features as OPT_OUT until the gRPC proxy issue is fixed 2017-12-28 12:09:34 -03:00
Alejandro Rodríguez 04b987563a Fix feature flags for Gitaly's RemoteService RPCs 2017-12-27 20:14:36 +00:00
Alejandro Rodríguez 0aa87bbe13 Incorporate ConflictsService.ResolveConflicts Gitaly RPC 2017-12-27 15:14:25 -03:00
Alejandro Rodríguez 351f205c05 Incorporate ConflictsService.ListConflictFiles Gitaly RPC 2017-12-27 15:12:30 -03:00
Ahmad Sherif 13932b0b12 Add support for max_count option to Git::Repository#count_commits 2017-12-27 14:16:24 +01:00
Dmitriy Zaporozhets 87bae6d42f Merge branch 'gitaly-remotes' into 'master'
Incorporate Gitaly's RemoteService RPCs

Closes gitaly#852

See merge request gitlab-org/gitlab-ce!16060
2017-12-25 10:43:04 +00:00
Alejandro Rodríguez 2694355bb6 Incorporate Gitaly's RemoteService RPCs 2017-12-22 20:30:08 -03:00
Alejandro Rodríguez 7354c9f75d Remove unused method `remote_exists?` 2017-12-22 20:30:07 -03:00
Rémy Coutable a2d39b8010 Use gitlab-styles
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-12-22 08:34:44 -06:00
Kim Carlbäcker 28fba5ed99 Revert "Merge branch 'repo-write-ref-client-prep' into 'master'"
This reverts merge request !15712
2017-12-20 18:29:52 +00:00
Zeger-Jan van de Weg c6edae3887
Load commit in batches for pipelines#index
Uses `list_commits_by_oid` on the CommitService, to request the needed
commits for pipelines. These commits are needed to display the user that
created the commit and the commit title.

This includes fixes for tests failing that depended on the commit
being `nil`. However, now these are batch loaded, this doesn't happen
anymore and the commits are an instance of BatchLoader.
2017-12-19 10:05:40 +01:00
Robert Speicher b540b98764 Merge branch 'no-ivar-in-modules' into 'master'
Add cop to make sure we don't use ivar in a module

See merge request gitlab-org/gitlab-ce!12800
2017-12-15 19:56:15 +00:00
Sean McGivern 9c12cb5375 Merge branch 'gitaly-conflicts-prep' into 'master'
Simplify conflict resolver interface

See merge request gitlab-org/gitlab-ce!15897
2017-12-15 10:59:21 +00:00
Douwe Maan 44f0b2c4be Merge branch '41016-import-gitlab-shell-projects' into 'master'
Import gitlab-shell gitlab_projects.rb as at v5.10.2

Closes #41016

See merge request gitlab-org/gitlab-ce!15853
2017-12-15 09:54:42 +00:00
Lin Jen-Shin 59ac184fcf Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
* upstream/master: (671 commits)
  Make rubocop happy
  Use guard clause
  Improve language
  Prettify
  Use temp branch
  Pass info about who started the job and which job triggered it
  Docs: add indexes for monitoring and performance monitoring
  clearer-documentation-on-inline-diffs
  Add docs for commit diff discussion in merge requests
  sorting for tags api
  Clear BatchLoader after each spec to prevent holding onto records longer than necessary
  Include project in BatchLoader key to prevent returning blobs for the wrong project
  moved lfs_blob_ids method into ExtractsPath module
  Converted JS modules into exported modules
  spec fixes
  Bump gitlab-shell version to 5.10.3
  Clear caches before updating MR diffs
  Use new Ruby version 2.4 in GitLab QA images
  moved lfs blob fetch from extractspath file
  Update GitLab QA dependencies
  ...
2017-12-15 17:14:26 +08:00
Alejandro Rodríguez 240945f87e Simplify conflict resolver interface
This does two things:
- Pass commit oids instead of `Gitlab::Git::Commit`s. We only need the
former.
- Depend on only the target repository for conflict listing. For
conflict resolution, treat one repository as a remote one so that we can
implement it as such in Gitaly.
2017-12-14 16:02:50 -03:00
Robert Speicher ee9ad1b1f6 Merge branch 'feature/migrate-merge-base-to-gitaly' into 'master'
Migrate Gitlab::Git::Repository#merge_base_commit to Gitaly

Closes gitaly#808

See merge request gitlab-org/gitlab-ce!15770
2017-12-14 18:58:38 +00:00
Nick Thomas 4b785df27b
Import gitlab_projects.rb from gitlab-shell
By importing this Ruby code into gitlab-rails (and gitaly-ruby), we avoid
200ms of startup time for each gitlab_projects subprocess we are eliminating.

By not having a gitlab_projects subprocess between gitlab-rails / sidekiq and
any git subprocesses (e.g. for fork_project, fetch_remote, etc, calls), we can
also manage these git processes more cleanly, and avoid sending SIGKILL to them
2017-12-14 16:00:04 +00:00
Ahmad Sherif 835a5db376 Migrate Gitlab::Git::Repository#merge_base_commit to Gitaly
Closes gitaly#808
2017-12-13 17:40:19 +01:00
Robert Speicher b655a4a790 Merge branch 'repo-write-ref-client-prep' into 'master'
Move Repository#write_ref to Git::Repository#write_ref

Closes gitaly#793

See merge request gitlab-org/gitlab-ce!15712
2017-12-12 16:36:58 +00:00
Kim "BKC" Carlbäcker dad4c0b645 Move Repository#write_ref to Git::Repository#write_ref 2017-12-12 16:05:38 +01:00
Robert Speicher 6930fa3102 Merge branch 'gitaly-mirroring-prep' into 'master'
Gitaly mirroring migration prep

Closes gitaly#816

See merge request gitlab-org/gitlab-ce!15775
2017-12-11 20:50:07 +00:00
Bob Van Landuyt d4d06bded1 Keep track of storage check timings 2017-12-11 13:18:39 +01:00
Bob Van Landuyt f1ae1e39ce Move the circuitbreaker check out in a separate process
Moving the check out of the general requests, makes sure we don't have
any slowdown in the regular requests.

To keep the process performing this checks small, the check is still
performed inside a unicorn. But that is called from a process running
on the same server.

Because the checks are now done outside normal request, we can have a
simpler failure strategy:

The check is now performed in the background every
`circuitbreaker_check_interval`. Failures are logged in redis. The
failures are reset when the check succeeds. Per check we will try
`circuitbreaker_access_retries` times within
`circuitbreaker_storage_timeout` seconds.

When the number of failures exceeds
`circuitbreaker_failure_count_threshold`, we will block access to the
storage.

After `failure_reset_time` of no checks, we will clear the stored
failures. This could happen when the process that performs the checks
is not running.
2017-12-08 09:11:39 +01:00
Kim Carlbäcker 41b0c0e9be Migrate Git::Repository#fsck to Gitaly 2017-12-08 00:27:11 +00:00
Douwe Maan 9dffd0ab6b Merge branch 'dm-commit-diff-discussions-in-mr-context' into 'master'
Allow commenting on individual commits inside an MR

Closes #31847

See merge request gitlab-org/gitlab-ce!12148
2017-12-07 16:49:04 +00:00