Commit Graph

24 Commits

Author SHA1 Message Date
GitLab Bot a5628d3b6d Add latest changes from gitlab-org/gitlab@master 2021-06-09 06:10:29 +00:00
GitLab Bot de8e5077c3 Add latest changes from gitlab-org/gitlab@master 2021-06-07 12:10:00 +00:00
GitLab Bot 0c2ef1f35c Add latest changes from gitlab-org/gitlab@master 2021-06-07 03:09:56 +00:00
GitLab Bot 90a06a20be Add latest changes from gitlab-org/gitlab@master 2019-11-07 15:06:33 +00:00
GitLab Bot 8e45d25f7d Add latest changes from gitlab-org/gitlab@master 2019-10-16 18:08:01 +00:00
GitLab Bot 31040b5bfe Add latest changes from gitlab-org/gitlab@master 2019-10-07 15:05:59 +00:00
GitLab Bot 1da3754b25 Add latest changes from gitlab-org/gitlab@master 2019-10-03 21:07:29 +00:00
GitLab Bot b38cf7ccdf Add latest changes from gitlab-org/gitlab@master 2019-10-01 00:06:42 +00:00
GitLab Bot 5707f305f4 Add latest changes from gitlab-org/gitlab@master 2019-09-26 12:06:00 +00:00
Zeger-Jan van de Weg 30b4ce940d
Remove Git circuit breaker
Was introduced in the time that GitLab still used NFS, which is not
required anymore in most cases. By removing this, the API it calls will
return empty responses. This interface has to be removed in the next
major release, expected to be 12.0.
2018-10-10 09:08:18 +02:00
gfyoung 73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
Zeger-Jan van de Weg 65840591cd
Gitaly metrics check for read/writeability
Prior to this change, health checks checked for writeability of the NFS
shards. Given we're moving away from that, this patch extends the checks
for Gitaly to check for read and writeability.

Potentially some dashboards will break, as over time these metrics will
no longer appear as Prometheus doesn't get the data anymore.
Observability in the circuit breaker will be reduced, but its not
expected to be turned on and the circuit breaker is being removed soon
too.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1218
2018-06-27 08:56:19 +02:00
blackst0ne 6fef87f17f [Rails5] Force the `protect_from_forgery` callback run first
Since Rails 5.0 the `protect_from_forgery` callback doesn't run first by
default anymore. [1]

Instead it gets inserted into callbacks chain where callbacks get
called in order.

This commit forces the callback to run first.

[1]: 3979403781
2018-06-21 21:44:31 +11:00
Stan Hu 8671261309 Add a gRPC health check to ensure Gitaly is up
This will enable Geo to skip shards that not operational.

Relates to gitlab-org/gitlab-ee#4329
2018-01-24 15:47:27 -08:00
Bob Van Landuyt f1ae1e39ce Move the circuitbreaker check out in a separate process
Moving the check out of the general requests, makes sure we don't have
any slowdown in the regular requests.

To keep the process performing this checks small, the check is still
performed inside a unicorn. But that is called from a process running
on the same server.

Because the checks are now done outside normal request, we can have a
simpler failure strategy:

The check is now performed in the background every
`circuitbreaker_check_interval`. Failures are logged in redis. The
failures are reset when the check succeeds. Per check we will try
`circuitbreaker_access_retries` times within
`circuitbreaker_storage_timeout` seconds.

When the number of failures exceeds
`circuitbreaker_failure_count_threshold`, we will block access to the
storage.

After `failure_reset_time` of no checks, we will clear the stored
failures. This could happen when the process that performs the checks
is not running.
2017-12-08 09:11:39 +01:00
Sean McGivern 25d241ae97 Merge branch '33949-remove-healthcheck-access-token' into 'master'
Remove the need to use health check token by adding ability to whitelist hosts

Closes #33949

See merge request !12612
2017-07-11 08:51:27 +00:00
Paul Charlton cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
Pawel Chojnacki 18521584bd Remove the need to use health check token
in favor of whitelist that will be used to
control the access to monitoring resources
2017-07-05 00:46:11 +02:00
Pawel Chojnacki 770f07cd5c Make login_counter instance variable instead of class one.
+ remove unecessarey require
 + fix small formatiing issues
2017-06-02 19:45:58 +02:00
Pawel Chojnacki 0f4050430d Split metrics from health controller into metrics controller 2017-06-02 19:45:58 +02:00
Kevin Lyda 6b9a091cee Add trailing newline to response.
Prometheus requires a trailing newline in its response.

+ cleanup
2017-06-02 19:45:57 +02:00
Pawel Chojnacki 5bc099c2de Prometheus metrics first pass
metrics wip
2017-06-02 19:45:57 +02:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Paweł Chojnacki c3e43c9ba3 Add /-/readiness /-/liveness and /-/health_metrics endpoints to track application readiness 2017-04-07 10:27:15 +00:00