Commit Graph

68 Commits

Author SHA1 Message Date
GitLab Bot 4d68d8b937 Add latest changes from gitlab-org/gitlab@master 2021-08-11 12:10:59 +00:00
GitLab Bot 25db9c1230 Add latest changes from gitlab-org/gitlab@master 2021-05-06 12:10:38 +00:00
GitLab Bot ed00b1a6a3 Add latest changes from gitlab-org/gitlab@master 2020-07-28 12:09:49 +00:00
GitLab Bot 3ce55b46df Add latest changes from gitlab-org/gitlab@master 2020-07-22 18:09:27 +00:00
GitLab Bot 209bd8cf1f Add latest changes from gitlab-org/gitlab@master 2020-04-09 15:09:29 +00:00
GitLab Bot 951616a26a Add latest changes from gitlab-org/gitlab@master 2020-02-25 18:09:02 +00:00
GitLab Bot 8c4198cbe6 Add latest changes from gitlab-org/gitlab@master 2020-02-20 12:08:51 +00:00
GitLab Bot cd3e2c7b93 Add latest changes from gitlab-org/gitlab@master 2020-02-19 12:09:13 +00:00
GitLab Bot 93d7441cc9 Add latest changes from gitlab-org/gitlab@master 2020-02-18 21:09:11 +00:00
GitLab Bot 4720b569f0 Add latest changes from gitlab-org/gitlab@master 2020-02-18 09:09:24 +00:00
GitLab Bot 0e9eea40b6 Add latest changes from gitlab-org/gitlab@master 2020-02-11 21:08:44 +00:00
GitLab Bot 0c6bc5443a Add latest changes from gitlab-org/gitlab@master 2020-02-07 21:08:39 +00:00
Stan Hu 9d3e413aa7 Bring back Rugged implementation of TreeEntry
This brings back some of the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20099/diffs

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_tree_entry` to activate the Rugged method.

Part of four Rugged changes identified in
https://gitlab.com/gitlab-org/gitlab-ce/issues/57317.
2019-03-07 04:33:57 -08:00
Francisco Javier López 5a3e6fdff9
Fixing image lfs bug and also displaying text lfs
This commit, introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23812,
fixes a problem creating a displaying image diff notes when the image
is stored in LFS. The main problem was that `Gitlab::Diff::File` was
returning an invalid valid in `text?` for this kind of files.

It also fixes a rendering problem with other LFS files, like text
ones. They LFS pointer shouldn't be shown when LFS is enabled
for the project, but they were.
2018-12-27 16:51:07 +01: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
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
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
Jacob Vosmaer 723f74d49d Remove last flags from Blob and Workhorse 2018-07-11 12:59:15 +02:00
Jacob Vosmaer (GitLab) 3082b7d1c2 Make blob and other RPC's mandatory 2018-07-09 10:02:02 +00: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
Nick Thomas 73903ae884
Fix a RuntimeError: cannot modify frozen string 2018-05-18 15:19:58 +01: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
Alejandro Rodríguez 0a4ee10eda Fix n+1 issue by not reloading fully loaded blobs 2018-03-05 11:14:43 -03:00
Ahmad Sherif dabc703a29 Migrate Git::Blob.batch to Gitaly
Closes gitaly#985
2018-02-08 00:26:45 +01:00
Takuya Noguchi 2b6307f6ad Enable RuboCop Style/RegexpLiteral 2018-02-01 02:06:07 +09:00
Ahmad Sherif 07b0beb004 Fix .batch_lfs_pointers accepting a lazy enumerator 2018-01-25 14:11:27 +01:00
Ahmad Sherif 29fa930baf Migrate .batch_lfs_pointers to Gitaly
Closes gitaly#921
2018-01-24 19:02:51 +01:00
Stan Hu b9c537487f Fix Error 500 when repository has no avatar
Closes #42249
2018-01-20 21:00:39 -08:00
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
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
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
Zeger-Jan van de Weg 60056d67a0
Add link to gitaly converation
This endpoint still has to be migrated, and this comment makes sure
everyone knows we are aware of this one.

[ci skip]
2017-11-30 17:05:55 +01:00
Zeger-Jan van de Weg f9565e3039
Batchload blobs for diff generation
After installing a new gem, batch-loader, a construct can be used to
queue data to be fetched in bulk. The gem was also introduced in both
gitlab-org/gitlab-ce!14680 and gitlab-org/gitlab-ce!14846, but those mrs
are not merged yet.

For the generation of diffs, both the old blob and the new blob need to
be loaded. This for every file in the diff, too. Now we collect all
these so we do 1 fetch. Three `.allow_n_plus_1_calls` have been removed,
which I expect to be valid, but this needs to be confirmed by a full CI
run.

Possibly closes:
- https://gitlab.com/gitlab-org/gitlab-ce/issues/37445
- https://gitlab.com/gitlab-org/gitlab-ce/issues/37599
- https://gitlab.com/gitlab-org/gitlab-ce/issues/37431
2017-11-21 13:53:26 +01:00
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
James Edwards-Jones fb3f9c6e50 Detect changes to LFS pointers for pruning and integrity check
Gitlab::Git::Blob.batch_lfs_metadata can be used to check for LFS pointers. It uses a lazy enumorator and filters by blob size
2017-11-01 16:41:05 +00:00
Stan Hu 794b4c5579 Ensure that Blob.raw returns always returns a valid blob object
In gitlab-org/gitlab-ee!2976, we saw that a given OID could point
to a commit, which would cause the delta size check to fail.
Gitaly already returns nil if the OID isn't a blob, so this change
makes the Rugged implementation consistent.
2017-09-21 14:49:51 -04:00
micael.bergeron a6af5522d7 renames ambiguous methods and add spec 2017-09-06 09:01:53 -04:00
micael.bergeron dbaed90c8d fix refactoring error with Blob.binary?
remove some lint
2017-09-06 09:01:53 -04:00
micael.bergeron c9aa793215 revert to using a simple representation 2017-09-06 09:01:53 -04:00
Rémy Coutable fcce6c3168 Merge branch 'rs-more-public-send-whitelists' into 'master'
Whitelist or fix additional `Gitlab/PublicSend` cop violations

See merge request !13467
2017-08-16 11:25:26 +00:00
Robert Speicher 4edfad9678 Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
Robert Speicher 260c8da060 Whitelist or fix additional `Gitlab/PublicSend` cop violations
An upcoming update to rubocop-gitlab-security added additional
violations.
2017-08-14 12:14:11 -04:00
Jacob Vosmaer 29a1c5a126 Rename 'limit' to 'blob_size_limit' 2017-08-07 16:26:50 +02:00
Jacob Vosmaer 5e20e448ce Add Gitlab::Git::Blob.batch method 2017-08-01 13:49:57 +02:00
Andrew Newdigate a89f18bf2c Renamed Gitaly services 2017-07-18 07:59:36 +00:00
Jacob Vosmaer 47c844bf34 Add Gitaly notes and annotations to Gitlab::Git 2017-07-12 17:06:31 +02:00