summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-24 16:31:23 +0000
committerRémy Coutable <remy@rymai.me>2016-06-24 16:31:23 +0000
commit5d174ee546d0c59ed30858ae6315a8a466cf668e (patch)
treee245ca119c9637523abce06307a11280e61b1f64 /config
parentdbbc359497e7c3af1e48b8a86d1a64f80ea752d7 (diff)
parent4cfb1af0b716501700e0e62ee0e514f498aa699c (diff)
downloadgitlab-ce-5d174ee546d0c59ed30858ae6315a8a466cf668e.tar.gz
Merge branch 'health-check-disable-email' into 'master'
Disable the email checking part of the standard Health Check ## What does this MR do? In order to fix it we have overwritten the email_configured? method in the health check so that it does not check email status during the standard health check. ## Why was this MR needed? The email check used in the Heath Check doesn't properly make use of enough of the SMTP config options to be able to properly test the STMP connection, and as a result could cause a failure. ## What are the relevant issue numbers? Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17742 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [x] ~~API support added~~ - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4903
Diffstat (limited to 'config')
-rw-r--r--config/initializers/health_check.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/initializers/health_check.rb b/config/initializers/health_check.rb
index 79e2d23ab2e..6796407d4e6 100644
--- a/config/initializers/health_check.rb
+++ b/config/initializers/health_check.rb
@@ -1,3 +1,17 @@
+# Email forcibly included in the standard checks, but the email health check
+# doesn't support the full range of SMTP options, which can result in failures
+# for valid SMTP configurations.
+# Overwrite the HealthCheck's detection of whether email is configured
+# in order to avoid the email check during standard checks
+module HealthCheck
+ class Utils
+ def self.mailer_configured?
+ false
+ end
+ end
+end
+
HealthCheck.setup do |config|
config.standard_checks = ['database', 'migrations', 'cache']
+ config.full_checks = ['database', 'migrations', 'cache']
end