Commit Graph

142 Commits

Author SHA1 Message Date
GitLab Bot 7ea46a9866 Add latest changes from gitlab-org/gitlab@master 2021-03-16 21:11:53 +00:00
GitLab Bot 5d756f9966 Add latest changes from gitlab-org/gitlab@master 2021-03-10 03:09:10 +00:00
GitLab Bot 6f2b1c32f3 Add latest changes from gitlab-org/gitlab@master 2021-03-09 15:08:59 +00:00
GitLab Bot c982bb363b Add latest changes from gitlab-org/gitlab@master 2021-02-17 15:09:21 +00:00
GitLab Bot b4e854a900 Add latest changes from gitlab-org/gitlab@master 2021-02-16 15:09:50 +00:00
GitLab Bot 89b770bb38 Add latest changes from gitlab-org/gitlab@master 2021-02-08 18:09:49 +00:00
GitLab Bot 507c0e71cd Add latest changes from gitlab-org/gitlab@master 2021-01-27 12:09:01 +00:00
GitLab Bot 9a14667521 Add latest changes from gitlab-org/gitlab@master 2020-12-22 18:10:05 +00:00
GitLab Bot 8e35232810 Add latest changes from gitlab-org/gitlab@master 2020-09-02 15:10:54 +00:00
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot ed00b1a6a3 Add latest changes from gitlab-org/gitlab@master 2020-07-28 12:09:49 +00:00
GitLab Bot 8d96319c80 Add latest changes from gitlab-org/gitlab@master 2020-07-01 00:09:02 +00:00
GitLab Bot 5abd2b70c8 Add latest changes from gitlab-org/gitlab@master 2020-05-21 00:08:06 +00:00
GitLab Bot 3795b229ab Add latest changes from gitlab-org/gitlab@master 2020-05-01 00:09:59 +00:00
GitLab Bot 2e4d8b3449 Add latest changes from gitlab-org/gitlab@master 2020-04-28 03:09:53 +00:00
GitLab Bot e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot 82fa8a3d1e Add latest changes from gitlab-org/gitlab@master 2020-03-10 09:08:10 +00:00
GitLab Bot d3c29eae5c Add latest changes from gitlab-org/gitlab@master 2020-03-05 21:08:13 +00:00
GitLab Bot 411cc77938 Add latest changes from gitlab-org/gitlab@master 2020-01-24 18:09:00 +00:00
GitLab Bot a5ab3467a7 Add latest changes from gitlab-org/gitlab@master 2020-01-13 15:07:53 +00:00
GitLab Bot fb73ca3398 Add latest changes from gitlab-org/gitlab@master 2019-12-27 15:08:16 +00:00
GitLab Bot 3ad11f24ca Add latest changes from gitlab-org/gitlab@master 2019-12-22 09:07:51 +00:00
GitLab Bot 9763c08170 Add latest changes from gitlab-org/gitlab@master 2019-12-17 03:07:45 +00:00
GitLab Bot d10a462fed Add latest changes from gitlab-org/gitlab@master 2019-12-16 12:07:43 +00:00
GitLab Bot 8cc5f27909 Add latest changes from gitlab-org/gitlab@master 2019-12-13 12:07:41 +00:00
GitLab Bot 175b4fa261 Add latest changes from gitlab-org/gitlab@master 2019-12-11 18:08:10 +00:00
GitLab Bot f7a13c56bf Add latest changes from gitlab-org/gitlab@master 2019-11-01 09:06:47 +00:00
GitLab Bot e95a97594a Add latest changes from gitlab-org/gitlab@master 2019-10-25 21:06:20 +00:00
GitLab Bot f155cc9034 Add latest changes from gitlab-org/gitlab@master 2019-10-16 03:06:12 +00:00
GitLab Bot 4f4dcd3c5d Add latest changes from gitlab-org/gitlab@master 2019-10-02 15:06:12 +00:00
GitLab Bot 81f7adf08b Add latest changes from gitlab-org/gitlab@master 2019-09-19 18:06:18 +00:00
Rémy Coutable b7398bc1fd Merge branch 'fix-peek-on-puma' into 'master'
Fix Peek on Puma

Closes #66528

See merge request gitlab-org/gitlab-ce!32213
2019-09-02 08:43:21 +00:00
Andrew Newdigate e369dee8a5 Rename Labkit::Tracing::GRPCInterceptor to GRPC::ClientInterceptor
The original name has been deprecated
2019-08-28 16:29:17 +00:00
Sean McGivern f9c456bd0c Make performance bar enabled checks consistent
Previously, we called the `peek_enabled?` method like so:

    prepend_before_action :set_peek_request_id, if: :peek_enabled?

Now we don't have a `set_peek_request_id` method, so we don't need that
line. However, the `peek_enabled?` part had a side-effect: it would also
populate the request store cache for whether the performance bar was
enabled for the current request or not.

This commit makes that side-effect explicit, and replaces all uses of
`peek_enabled?` with the more explicit
`Gitlab::PerformanceBar.enabled_for_request?`. There is one spec that
still sets `SafeRequestStore[:peek_enabled]` directly, because it is
contrasting behaviour with and without a request store enabled.

The upshot is:

1. We still set the value in one place. We make it more explicit that
   that's what we're doing.
2. Reading that value uses a consistent method so it's easier to find in
   future.
2019-08-28 17:25:02 +01:00
John Cai ebbd2aeb5f Handle when server info doesn't have the storage in question 2019-08-23 08:42:00 -07:00
Stan Hu a74396dcc5 Add Gitaly and Rugged call timing in Sidekiq logs
This will help identify Sidekiq jobs that invoke excessive number of
filesystem access.

The timing data is stored in `RequestStore`, but this is only active
within the middleware and is not directly accessible to the Sidekiq
logger. However, it is possible for the middleware to modify the job
hash to pass this data along to the logger.
2019-08-09 01:08:32 -07:00
Stan Hu 3b76d2982f Fix exception handling in Gitaly autodetection
In SELinux, the file cannot be written, and `Errno::EACCES`, not
`Errno::ACCESS` is thrown.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65328
2019-07-30 07:03:45 -07:00
Stan Hu ec5ceae623 Fix Gitaly auto-detection caching
If `GitalyClient#can_use_disk?` returned `false`, it was never cached
properly and led to excessive number of Gitaly calls. Instead of using
`cached_value.present?`, we need to check `cached_value.nil?`.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64802
2019-07-19 10:03:41 -07:00
Stan Hu ddf2dcf7fd Merge branch 'jc-wrap-rugged-calls-with-disk-access' into 'master'
Wrap rugged calls with access disk block

See merge request gitlab-org/gitlab-ce!30592
2019-07-17 22:23:20 +00:00
John Cai 8765d53737 Wrap rugged calls with access disk block
Whenever we use the rugged implementation, we are going straight to disk
so we want to bypass the disk access check.
2019-07-16 13:54:01 -07:00
John Cai c77d7837bb Remove catfile cache feature flag 2019-07-15 11:32:56 -07:00
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00:00
John Cai 5305d5267d Disabling can_use_disk? temporarily 2019-07-09 11:14:57 -07:00
Dmitriy Zaporozhets 7c7b8f32a7 Merge branch 'jc-detect-nfs-for-rugged' into 'master'
Use Rugged if we detect storage is NFS and we can access the disk

See merge request gitlab-org/gitlab-ce!29725
2019-07-08 13:35:43 +00:00
John Cai 8152e1aa4a Use Rugged if we detect storage is NFS and we can access the disk
Add a module we use as a singleton to determine whether or not rails is
able to access the disk
2019-07-05 10:31:47 -07:00
Zeger-Jan van de Weg 031e91beeb
Remove high cardinality Prometheus metric
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.
2019-07-05 14:40:13 +02:00
Zeger-Jan van de Weg 4dfaaf40b9
Turn on Cat-File cache by default
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`:
0dcb5c579e/config.toml.example (L27)

Closes: https://gitlab.com/gitlab-org/gitaly/issues/1712
2019-06-18 13:33:43 +02:00
Zeger-Jan van de Weg 968674e417
Move Gitaly feature flag logic to Feature::Gitaly
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.
2019-06-18 13:18:18 +02:00
Zeger-Jan van de Weg b8372598e9 Remove delta island feature flag
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.
2019-06-03 08:12:13 +00:00
Jacob Vosmaer 5dc68854f8 Register "gitaly_delta_islands" feature flag 2019-05-07 15:18:08 +00:00