From 59b5bb033409901dc8e1fa7fa28c3a0fa38f495a Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 24 Jun 2016 07:27:58 -0700 Subject: Disable the email checking part of the standard Health Check 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. 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. --- CHANGELOG | 1 + config/initializers/health_check.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index fcfd0a21be3..fc76cbe39c9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ v 8.10.0 (unreleased) - Add Sidekiq queue duration to transaction metrics. - Fix MR-auto-close text added to description. !4836 - Fix pagination when sorting by columns with lots of ties (like priority) + - Exclude email check from the standard health check - Implement Subresource Integrity for CSS and JavaScript assets. This prevents malicious assets from loading in the case of a CDN compromise. - Fix user creation with stronger minimum password requirements !4054 (nathan-pmt) diff --git a/config/initializers/health_check.rb b/config/initializers/health_check.rb index 79e2d23ab2e..3b027753334 100644 --- a/config/initializers/health_check.rb +++ b/config/initializers/health_check.rb @@ -1,3 +1,16 @@ +# 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'] end -- cgit v1.2.1 From 4cfb1af0b716501700e0e62ee0e514f498aa699c Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 24 Jun 2016 08:47:08 -0700 Subject: Set the health_check mailer full checks to be the same as the standard checks There was nothing additional in the full checks that we want to run (email, custom) --- config/initializers/health_check.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/health_check.rb b/config/initializers/health_check.rb index 3b027753334..6796407d4e6 100644 --- a/config/initializers/health_check.rb +++ b/config/initializers/health_check.rb @@ -13,4 +13,5 @@ end HealthCheck.setup do |config| config.standard_checks = ['database', 'migrations', 'cache'] + config.full_checks = ['database', 'migrations', 'cache'] end -- cgit v1.2.1