From 25a7266d15dc9d6881687cec63f314b7e321594b Mon Sep 17 00:00:00 2001 From: Aviv Eyal Date: Wed, 31 Aug 2016 21:35:57 +0000 Subject: [PATCH] Correctly calculate "any_failed" Summary: See T10746. Test Plan: Fail one of several builds, run `./bin/harbormaster update`, see that Build Status is Failed. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, O14 ATC Monitoring, yelirekim Maniphest Tasks: T10746 Differential Revision: https://secure.phabricator.com/D16480 --- .../harbormaster/engine/HarbormasterBuildEngine.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/applications/harbormaster/engine/HarbormasterBuildEngine.php b/src/applications/harbormaster/engine/HarbormasterBuildEngine.php index 4cece6a69d..893f8fc546 100644 --- a/src/applications/harbormaster/engine/HarbormasterBuildEngine.php +++ b/src/applications/harbormaster/engine/HarbormasterBuildEngine.php @@ -446,11 +446,14 @@ final class HarbormasterBuildEngine extends Phobject { if ($build->getBuildStatus() != HarbormasterBuildStatus::STATUS_PASSED) { $all_pass = false; } - $any_fail = in_array($build->getBuildStatus(), array( + if (in_array($build->getBuildStatus(), array( HarbormasterBuildStatus::STATUS_FAILED, HarbormasterBuildStatus::STATUS_ERROR, HarbormasterBuildStatus::STATUS_DEADLOCKED, - )); + ))) { + + $any_fail = true; + } } if ($any_fail) {