Commit Graph

93 Commits

Author SHA1 Message Date
GitLab Bot 5e13b3a9e5 Add latest changes from gitlab-org/gitlab@master 2021-11-12 00:10:48 +00:00
GitLab Bot 30b01621d3 Add latest changes from gitlab-org/gitlab@master 2021-09-14 18:12:06 +00:00
GitLab Bot 975eac4992 Add latest changes from gitlab-org/gitlab@master 2021-08-25 12:11:32 +00:00
GitLab Bot da12067d6b Add latest changes from gitlab-org/gitlab@master 2021-08-13 09:09:58 +00:00
GitLab Bot 24fca38040 Add latest changes from gitlab-org/gitlab@master 2021-08-05 03:10:19 +00:00
GitLab Bot f931527bc5 Add latest changes from gitlab-org/gitlab@master 2021-07-29 09:08:46 +00:00
GitLab Bot 1072f96e34 Add latest changes from gitlab-org/gitlab@master 2021-07-19 12:10:08 +00:00
GitLab Bot 659ad26b4e Add latest changes from gitlab-org/gitlab@master 2021-03-25 21:09:13 +00:00
GitLab Bot ef8c47e97e Add latest changes from gitlab-org/gitlab@master 2021-01-20 15:10:29 +00:00
GitLab Bot 2c2b5aeac0 Add latest changes from gitlab-org/gitlab@master 2021-01-05 15:10:02 +00:00
GitLab Bot a2f16969fa Add latest changes from gitlab-org/gitlab@master 2020-12-04 06:09:34 +00:00
GitLab Bot 8d96319c80 Add latest changes from gitlab-org/gitlab@master 2020-07-01 00:09:02 +00:00
GitLab Bot 1e254d9f5a Add latest changes from gitlab-org/gitlab@master 2020-06-30 12:08:57 +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 7105e0c53e Add latest changes from gitlab-org/gitlab@master 2020-06-22 18:08:47 +00:00
GitLab Bot 1127990db8 Add latest changes from gitlab-org/gitlab@master 2020-06-22 03:08:17 +00:00
GitLab Bot 018431c70e Add latest changes from gitlab-org/gitlab@master 2020-06-11 15:08:36 +00:00
GitLab Bot 607646ef52 Add latest changes from gitlab-org/gitlab@master 2020-06-03 12:08:21 +00:00
GitLab Bot 619d0b6922 Add latest changes from gitlab-org/gitlab@master 2020-02-26 18:09:24 +00:00
GitLab Bot 72721699f1 Add latest changes from gitlab-org/gitlab@master 2020-02-18 00:09:20 +00:00
GitLab Bot d466ee5042 Add latest changes from gitlab-org/gitlab@master 2020-02-13 21:08:59 +00:00
GitLab Bot e95a97594a Add latest changes from gitlab-org/gitlab@master 2019-10-25 21:06:20 +00:00
GitLab Bot 6791eefead Add latest changes from gitlab-org/gitlab@master 2019-10-21 09:06:22 +00:00
GitLab Bot 238d22c072 Add latest changes from gitlab-org/gitlab@master 2019-10-17 15:06:17 +00:00
GitLab Bot b35b9ac7e2 Add latest changes from gitlab-org/gitlab@master 2019-09-19 21:06:29 +00:00
GitLab Bot 81f7adf08b Add latest changes from gitlab-org/gitlab@master 2019-09-19 18:06:18 +00:00
Stan Hu 52215e8983 Allow caching of negative FindCommit matches
When FindCommit ref caching is enabled, negative matches would
previously not be cached. However, if a source branch is deleted,
there's no need to keep looking up the same commit. This change caches
the result of a nil commit.
2019-06-25 22:59:24 -07:00
Yoginth 2f6a20ce66 Fix typos in the whole gitlab-ce project 2019-05-20 14:11:44 +00:00
John Cai 2370e5d04a Update list_last_commits_for_tree response path field to path_bytes
Updates the gitaly client to use path_bytes field instead of the
deprecated path field in list_last_commits_for_tree_response.
Also adds a test to guard against non-utf8 path data
2019-04-24 22:17:12 -07:00
Stan Hu db759c5d9c Allow ref name caching CommitService#find_commit
For a given merge request, it's quite common to see duplicate FindCommit
Gitaly requests because the Gitaly CommitService caches the request by
the commit SHA, not by the ref name. However, most of the duplicate
requests use the ref name, so the cache is never actually used in
practice. This leads to unnecessary requests that slow performance.

This commit allows certain callers to bypass the ref name to
OID conversion in the cache. We don't do this by default because it's
possible the tip of the branch changes during the commit, which
would cause the caller to get stale data.

This commit also forces the Ci::Pipeline to use the full ref name
so that caching can work for merge requests.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/57083
2019-03-27 14:46:39 -05: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
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
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
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
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
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Oswaldo Ferreira 965ff14b6f Send max_patch_bytes to Gitaly via Gitaly::CommitDiffRequest
We used to apply this limitation on GitLab when using Rugged. Now that
we've shifted to Gitaly, this parameter needs to be sent via a RPC
request. Currently this value is hardcoded on Gitaly.
2018-09-06 19:18:27 -03:00
Lin Jen-Shin 3bfe306624 Resolve Naming/UncommunicativeMethod 2018-07-09 21:13:08 +08:00
Andrew Newdigate 583635f0c8 Updated Gitaly timeout values 2018-07-05 16:05:24 +00:00
Sean McGivern 2c2422d54e Fix MR diffs created with gitaly_diff_between enabled
When we save merge request diffs to the database, we need to expand the diff
before doing so. That's so that we can expand diffs (within the normal limits)
without hitting the repository, but just by going to the database.

This is done implicitly - diffs are expanded unless we say otherwise. However,
we have another option we can pass, that lets us enforce diff size limits, that
defaults to true.

Prior to this commit:

- The Rugged code path defaulted to setting `expanded: true` and
  `enforce_limits: true`.
- The Gitaly code path defaulted to setting `expanded: false` and
  `enforce_limits: true`.

This was introduced by eb36fa17a6, which
implemented the initial feature. Since then, if the `gitaly_diff_between`
feature flag was enabled, MRs would have diffs that could not be expanded in
some cases, with no fix other than to disable the feature flag and force push to
the MR to refresh the diff in the database.
2018-06-29 14:25:35 +01:00
Jacob Vosmaer f4d6834786 Make Gitaly signature RPC's mandatory 2018-06-27 14:32:09 +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 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
Kim "BKC" Carlbäcker 0db994fedc Fix encoding error in Gitaly::Commit::TreeEntry 2018-05-30 17:33:17 +02:00
Ahmad Sherif 019f5e2469 Add handling for commit/tags with big messages 2018-05-18 20:51:10 +02:00
Rubén Dávila d28b1dfc46 Backport of EE !4989 2018-04-11 22:05:07 -05:00
Ahmad Sherif cd770946c4 Add support for :all option to {count,find}_commits 2018-03-02 14:55:20 +01:00
Ahmad Sherif 03f3350f3f Fetch commit signatures from Gitaly in batches
Closes gitaly#1046
2018-03-01 18:31:31 +01:00