Commit Graph

110 Commits

Author SHA1 Message Date
GitLab Bot f9c23393a5 Add latest changes from gitlab-org/gitlab@master 2023-06-23 15:08:18 +00:00
GitLab Bot 571b02efc9 Add latest changes from gitlab-org/gitlab@master 2023-05-08 12:13:55 +00:00
GitLab Bot 4a7ca716f6 Add latest changes from gitlab-org/gitlab@master 2023-02-23 12:11:53 +00:00
GitLab Bot 4d0bc99be4 Add latest changes from gitlab-org/gitlab@master 2021-10-25 21:12:12 +00:00
GitLab Bot 975eac4992 Add latest changes from gitlab-org/gitlab@master 2021-08-25 12:11:32 +00:00
GitLab Bot b70394d26f Add latest changes from gitlab-org/gitlab@master 2021-08-20 12:09:31 +00:00
GitLab Bot da12067d6b Add latest changes from gitlab-org/gitlab@master 2021-08-13 09:09:58 +00:00
GitLab Bot e5e0589e09 Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
GitLab Bot 6d18e2830d Add latest changes from gitlab-org/gitlab@master 2021-04-05 18:09:15 +00:00
GitLab Bot b90d8b54a4 Add latest changes from gitlab-org/gitlab@master 2021-03-09 12:08:52 +00:00
GitLab Bot ef8c47e97e Add latest changes from gitlab-org/gitlab@master 2021-01-20 15:10:29 +00:00
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot 757d2fda7e Add latest changes from gitlab-org/gitlab@master 2020-06-26 21:08:51 +00:00
GitLab Bot 0211553b0c Add latest changes from gitlab-org/gitlab@master 2020-06-10 12:08:58 +00:00
GitLab Bot 927df95cc4 Add latest changes from gitlab-org/gitlab@master 2020-05-15 12:08:28 +00:00
GitLab Bot 0d0cddc9ce Add latest changes from gitlab-org/gitlab@master 2020-03-31 12:08:09 +00:00
GitLab Bot d466ee5042 Add latest changes from gitlab-org/gitlab@master 2020-02-13 21:08:59 +00:00
GitLab Bot c158fa8d69 Add latest changes from gitlab-org/gitlab@master 2020-01-16 12:08:32 +00:00
GitLab Bot 08ed6a867b Add latest changes from gitlab-org/gitlab@master 2020-01-16 03:08:47 +00:00
GitLab Bot ab7cf450ba Add latest changes from gitlab-org/gitlab@master 2019-12-03 18:06:49 +00:00
GitLab Bot 6791eefead Add latest changes from gitlab-org/gitlab@master 2019-10-21 09:06:22 +00:00
Sean McGivern 2ce68fd3a5 Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'
Enrich commits with full data in CommitCollection

Closes #58805

See merge request gitlab-org/gitlab-ce!26445
2019-03-26 09:22:14 +00:00
Luke Duncalfe 38bf176c3c Enrich commits with full data in CommitCollection
Allow incomplete commit records to load their full data from gitaly.

Commits can be based on a Hash of data retrieved from PostgreSQL, and
this data can be intentionally incomplete in order to save space.

A new method #gitaly? has been added to Gitlab::Git::Commit, which
returns true if the underlying data source of the Commit is a
Gitaly::GitCommit.

CommitCollection now has a method #enrich which replaces non-gitaly
commits in place with commits from gitaly.

CommitCollection#without_merge_commits has been updated to call this
method, as in order to determine a merge commit we need to have parent
data.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58805
2019-03-22 10:26:15 +13:00
Sean McGivern a97ec84f05 Revert "Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'"
This reverts merge request !26144
2019-03-21 10:33:29 +00:00
Sean McGivern 1efa960444 Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'
Enrich commits with full data in CommitCollection

Closes #58805

See merge request gitlab-org/gitlab-ce!26144
2019-03-21 08:42:33 +00:00
Nick Thomas 9266901e50 Merge branch 'ce-avoid_es_loading_commits' into 'master'
Backport of avoid_es_loading_commits

See merge request gitlab-org/gitlab-ce!26301
2019-03-20 13:10:41 +00:00
Mario de la Ossa e886151669
Backport of avoid_es_loading_commits 2019-03-19 13:24:23 -06:00
Luke Duncalfe 8ef0a9d5ca Enrich commits with full data in CommitCollection
Allow incomplete commit records to load their full data from gitaly.

Commits can be based on a Hash of data retrieved from PostgreSQL, and
this data can be intentionally incomplete in order to save space.

A new method #gitaly? has been added to Gitlab::Git::Commit, which
returns true if the underlying data source of the Commit is a
Gitaly::GitCommit.

CommitCollection now has a method #enrich which replaces non-gitaly
commits in place with commits from gitaly.

CommitCollection#without_merge_commits has been updated to call this
method, as in order to determine a merge commit we need to have parent
data.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58805
2019-03-18 13:03:23 +13:00
Stan Hu 4ee08fd1f7 Add back Rugged support for retrieving a commit tree entry
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20176/diffs.

We discovered another N+1 that hits Gitaly `TreeEntry` via the
`RelativeLinkFilter`:
https://gitlab.com/gitlab-org/gitlab-ce/issues/58657. When a blob is
loaded with many relative links, `TreeEntry` is called for each link to
scan the URI type.

There are multiple paths that hit Gitaly `TreeEntry`, and
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25706 did not
cover all cases. This commit covers another common use case.

For users using Gitaly on top of NFS, accessing the Git data directly
via Rugged may be faster than going through than Gitaly. This merge
request introduces the feature flag `rugged_commit_tree_entry` to
activate the Rugged method.
2019-03-08 16:01:59 -08: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
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
Douwe Maan 5f0e4040ce
Batch load only data from same repository when lazy object is accessed
By specifying `key`, we get a different lazy batch loader for each
repository, which means that accessing a lazy object from one repository
will only result in that repository's objects being fetched, not those
of other repositories, saving us some unnecessary Gitaly lookups.
2018-11-26 11:15:18 +01: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
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
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
Jacob Vosmaer (GitLab) 5c651daa97 Remove unreachable Git code 2018-07-18 11:12:57 +00:00
Jacob Vosmaer c770d2f96e Make more things mandatory 2018-07-06 14:44:54 +02:00
Jacob Vosmaer 9f8326995c Partially rever "Revert "Merge branch 'gitaly-mandatory-20180703-jv' into 'master'""
This partially reverts commit 64dfe2cba1.
2018-07-06 11:43:01 +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
Jacob Vosmaer (GitLab) 78708b1932 Make more Gitaly features mandatory 2018-07-04 07:39:59 +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
Douwe Maan e38db19659 Merge branch 'gitaly-mandatory-20180627-jv-2' into 'master'
Make Gitaly signature RPC's mandatory

Closes gitaly#745, gitaly#1044, and gitaly#876

See merge request gitlab-org/gitlab-ce!20212
2018-06-28 07:45:31 +00:00
Jacob Vosmaer f4d6834786 Make Gitaly signature RPC's mandatory 2018-06-27 14:32:09 +02:00
Jacob Vosmaer be5e6d586f Make search and message RPC's mandatory 2018-06-27 13:46:51 +02:00
Jacob Vosmaer 33c950f293 Client-side fix for Gitaly TreeEntry bug 2018-06-26 14:12:08 +02:00
Zeger-Jan van de Weg 417a21a123
Raw diffs are served from Gitaly
Closes https://gitlab.com/gitlab-org/gitaly/issues/222
2018-06-22 13:40:38 +02:00
Jacob Vosmaer e7ef91339e Simplify server feature flags 2018-06-06 11:20:41 +02:00