summaryrefslogtreecommitdiff
path: root/lib/gitlab/gitaly_client.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add a rubocop for Rails.logger54102-add-rubocop-for-rails-loggerMayra Cabrera2019-07-101-1/+1
| | | | | | Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
* Disabling can_use_disk? temporarilyJohn Cai2019-07-091-11/+12
|
* Merge branch 'jc-detect-nfs-for-rugged' into 'master'Dmitriy Zaporozhets2019-07-081-0/+40
|\ | | | | | | | | Use Rugged if we detect storage is NFS and we can access the disk See merge request gitlab-org/gitlab-ce!29725
| * Use Rugged if we detect storage is NFS and we can access the diskjc-detect-nfs-for-ruggedJohn Cai2019-07-051-0/+40
| | | | | | | | | | Add a module we use as a singleton to determine whether or not rails is able to access the disk
* | Remove high cardinality Prometheus metriczj-praefect-config-gitlab-ymlZeger-Jan van de Weg2019-07-051-9/+0
|/ | | | | | | | | The metric was used to correlate Gitaly requests to the Rails controller and action combination. However, Kibana provides better observability in this specific metric, and can handle hig cardinality much better. There's no dashboard in Grafana that currently depends on this metric being exposed.
* Turn on Cat-File cache by defaultZeger-Jan van de Weg2019-06-181-1/+0
| | | | | | | | | | | | | | | | The feature flag has been introduced an was turned off by default, now the it will default to be turned on. That change would still allow users to turn this feature off by leveraging the Rails console by running: `Feature.disable("gitaly_catfile-cache")` Another option is to manage the number of items the LRU cache will contain, by updating the `config.toml` for Gitaly. This would be the `catfile_cache_size`: https://gitlab.com/gitlab-org/gitaly/blob/0dcb5c579e63754f557aef91a4fa7a00e5b8b127/config.toml.example#L27 Closes: https://gitlab.com/gitlab-org/gitaly/issues/1712
* Move Gitaly feature flag logic to Feature::GitalyZeger-Jan van de Weg2019-06-181-18/+3
| | | | | | | The GitalyClient held a lot of logic which was all very tightly coupled. In this instance the feature logic was extracted to make it do just a little less and create a bit more focus in the GitalyClient's responsibilies.
* Remove delta island feature flagZeger-Jan van de Weg2019-06-031-1/+1
| | | | | | Delta islands were implemented last released in: https://gitlab.com/gitlab-org/gitaly/merge_requests/1110. It's been enabled on production and works as expected.
* Register "gitaly_delta_islands" feature flagJacob Vosmaer2019-05-071-1/+2
|
* Run rubocop -a on CE filessh-upgrade-rubocop-0.68.0-ceStan Hu2019-05-051-1/+1
|
* Add gitaly session id & catfile-cache feature flagJohn Cai2019-04-291-1/+7
|
* Migrate correlation and tracing code to LabKitan-use-labkitAndrew Newdigate2019-04-181-3/+3
| | | | | | | | | | | | | | | This change is a fairly straightforward refactor to extract the tracing and correlation-id code from the gitlab rails codebase into the new LabKit-Ruby project. The corresponding import into LabKit-Ruby was in https://gitlab.com/gitlab-org/labkit-ruby/merge_requests/1 The code itself remains very similar for now. Extracting it allows us to reuse it in other projects, such as Gitaly-Ruby. This will give us the advantages of correlation-ids and distributed tracing in that project too.
* Add backtrace to Gitaly performance barStan Hu2019-04-171-4/+9
| | | | | | | | This adds the backtrace to a table to show exactly where the Gitaly call was made to make it easier to understand where the call originated. This change also collapses the details in the same row to improve the usability when there is a backtrace.
* Merge branch 'jc-remove-find-all-tags-ff' into 'master'Douglas Barbosa Alexandre2019-04-011-1/+1
|\ | | | | | | | | Remove find all tags feature flag See merge request gitlab-org/gitlab-ce!26746
| * Remove find all tags feature flagjc-remove-find-all-tags-ffJohn Cai2019-03-281-1/+1
| |
* | Merge branch 'sh-fix-gitaly-find-commit-caching' into 'master'Kamil Trzciński2019-03-291-0/+20
|\ \ | |/ |/| | | | | | | | | Allow ref name caching CommitService#find_commit Closes #57083 See merge request gitlab-org/gitlab-ce!26248
| * Guard against nested allows with ref name cachingsh-fix-gitaly-find-commit-cachingStan Hu2019-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This avoids the case: ``` allow_ref_name_caching do allow_ref_name_caching do # using-feature end end ```
| * Allow ref name caching CommitService#find_commitStan Hu2019-03-271-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Log Gitaly RPC duration to api_json.log and production_json.logStan Hu2019-03-271-6/+12
|/ | | | | | | This makes it easier to debug Gitaly performance issues in the field. This commit also makes the tracking of query time thread-safe via RequestStore.
* Run rubocop -aNick Thomas2019-03-131-7/+5
|
* Add feature flag to enforce gitaly request limitsMark Lapierre2019-03-111-2/+14
| | | | | | | | We typically don't want to enforce request limits in production However, we have some production-like test environments, i.e., ones where `Rails.env.production?` returns `true`. We do want to be able to check if the limit is being exceeded while testing in those environments.
* Merge branch 'jc-feature-flag-find-all-tags' into 'master'Lin Jen-Shin2019-03-071-2/+4
|\ | | | | | | | | Add feature flag for FindAllTags See merge request gitlab-org/gitlab-ce!25615
| * Check that feature database and table exists for gitaly featuresjc-feature-flag-find-all-tagsJohn Cai2019-03-061-1/+3
| |
| * Add feature flag for FindAllTagsJohn Cai2019-03-051-1/+1
| |
* | Adds the Rubocop ReturnNil copAndrew Newdigate2019-03-061-3/+3
|/ | | | | This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points
* Revert "Restart Unicorn and Sidekiq when GRPC throws 14:Endpoint read failed"Nick Thomas2019-02-281-23/+0
| | | | This reverts commit 006753110a462e62f549cdf3c410e73eed068dbf.
* Only allow 30 RPCs per test case to GitalyZeger-Jan van de Weg2019-02-221-1/+1
| | | | | | | | | Prior to this change, 35 Gitaly RPCs were allowed. But recently there's been a renewed interest in performance. By lowering the number of calls new N + 1's will pop up. Later commits will add blocks to ignore the raised errors, followed by an issue for each to be fixed.
* Merge branch 'elasticsearch-via-gitaly-ee' into 'master'Nick Thomas2019-01-251-1/+5
|\ | | | | | | | | Add connection_data method to Gitaly client See merge request gitlab-org/gitlab-ce!24669
| * Add connection_data method to Gitaly clientValery Sizov2019-01-251-1/+5
| | | | | | | | Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7434
* | Adds inter-service OpenTracing propagationAndrew Newdigate2019-01-221-1/+8
|/ | | | | | | | | | | | | | This change allows the GitLab rails and sidekiq components to receive tracing spans from upstream services such as Workhorse and pass these spans on to downstream services including Gitaly and Sidekiq. This change will also emit traces for incoming and outgoing requests using the propagated trace information. This will allow operators and engineers to view traces across the Workhorse, GitLab Rails, Sidekiq and Gitaly components. Additional intra-service instrumentation will be added in future changes.
* Log certificate loading errors into sentryAhmad Hassan2018-12-201-4/+8
|
* Followups on reviewAhmad Hassan2018-12-191-17/+13
|
* Deduplicate certificatesAhmad Hassan2018-12-171-3/+13
|
* Merge remote-tracking branch 'origin/master' into support-gitaly-tlsAhmad Hassan2018-12-111-121/+16
|\
| * Rename the correlation field from `correlation_id` to `x-gitlab-correlation-id`Andrew Newdigate2018-12-071-1/+1
| |
| * Revert "Prefer to use correlation-id in logs"Kamil Trzciński2018-12-061-1/+1
| | | | | | | | This reverts commit 3560b11922fd180eea5cafd0e763e0e601c5c4ee.
| * Prefer to use correlation-id in logsKamil Trzciński2018-12-061-1/+1
| | | | | | | | This changes `correlation_id` to be `correlation-id` when passed via jobs
| * Log and pass correlation-id between Unicorn, Sidekiq and GitalyKamil Trzciński2018-12-061-0/+1
| | | | | | | | | | | | | | | | The Correlation ID is taken or generated from received X-Request-ID. Then it is being passed to all executed services (sidekiq workers or gitaly calls). The Correlation ID is logged in all structured logs as `correlation_id`.
| * Fix bug where ID is not setrevert-fd6e3781Zeger-Jan van de Weg2018-11-201-5/+4
| | | | | | | | | | On HEAD~ we remove the ID from the class, which created a bug. Given we don't need the ID anymore, it has been removed and simplified.
| * Revert "Merge branch 'revert-e2aa2177' into 'master'"Zeger-Jan van de Weg2018-11-201-115/+10
| | | | | | This reverts merge request !23229
| * Revert "Merge branch 'zj-improve-gitaly-pb' into 'master'"revert-e2aa2177Sean McGivern2018-11-201-10/+115
| | | | | | This reverts merge request !23140
| * Merge branch 'zj-improve-gitaly-pb' into 'master'Sean McGivern2018-11-201-115/+10
| |\ | | | | | | | | | | | | Show what RPC is called in the performance bar See merge request gitlab-org/gitlab-ce!23140
| | * Show what RPC is called in the performance barZeger-Jan van de Weg2018-11-161-115/+10
| | | | | | | | | | | | | | | Now only the data was shown of the service, which is not valueable at times given some of those expose a lot of RPCs.
| * | Fix typos in libGeorge Tsiolis2018-11-151-1/+1
| |/
* | Rename load_certs and include default cert fileAhmad Hassan2018-12-111-3/+8
| |
* | Manually load the certificatesAhmad Hassan2018-11-271-1/+7
| |
* | Add more specsAhmad Hassan2018-10-311-5/+1
| |
* | Support tls communication in gitalyAhmad Hassan2018-10-301-4/+17
|/
* Enable frozen string for lib/gitlab/*.rbgfyoung2018-10-221-1/+3
|
* Revert "Merge branch 'feature/git-v2-flag' into 'master'"James Lopez2018-10-051-1/+1
| | | This reverts merge request !21520