From bebb02c800db748e073094c7ea63ce939f038203 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 10 Jul 2014 16:38:41 -0400 Subject: [PATCH 1/3] Make sure all scope applies occur outside of the main digest loop --- static/js/app.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 73e2208b1..c43b42201 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -432,9 +432,11 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading // If an error occurred, report it and done. if (ping < 0) { cached['pings'] = [-1]; - $scope.$apply(function() { - callback(-1, false, -1); - }); + setTimeout(function() { + $scope.$apply(function() { + callback(-1, false, -1); + }); + }, 0); return; } @@ -447,9 +449,11 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading } // Report the average ping. - $scope.$apply(function() { - callback(Math.floor(sum / cached['pings'].length), true, cached['pings'].length); - }); + setTimeout(function() { + $scope.$apply(function() { + callback(Math.floor(sum / cached['pings'].length), true, cached['pings'].length); + }); + }, 0); // Schedule another check if we've done less than three. if (cached['pings'].length < 3) { @@ -486,9 +490,11 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading pingService.pingUrl = function($scope, url, callback) { if (pingCache[url]) { cached = pingCache[url]; - $scope.$apply(function() { - callback(cached.result, cached.success); - }); + setTimeout(function() { + $scope.$apply(function() { + callback(cached.result, cached.success); + }); + }, 0); return; } From 8ada6f0d5081d9378d6c7933912d532455c7ca95 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 11 Jul 2014 12:05:33 -0400 Subject: [PATCH 2/3] Make test logs also not hit redis for the actual log data unless the flag is specified --- test/testlogs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/testlogs.py b/test/testlogs.py index 8ea09e58e..4310b92c3 100644 --- a/test/testlogs.py +++ b/test/testlogs.py @@ -180,6 +180,8 @@ class TestBuildLogs(RedisBuildLogs): def get_log_entries(self, build_id, start_index): if build_id == self.test_build_id: return (len(self._logs), self._logs[start_index:]) + elif not self.allow_delegate: + return None else: return super(TestBuildLogs, self).get_log_entries(build_id, start_index) From 8b3659fefa0c37c2b7736aaa4da6bb644f72d5dd Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 11 Jul 2014 12:05:52 -0400 Subject: [PATCH 3/3] Dockerfile build worker should not report inner JobException's twice --- workers/dockerfilebuild.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/workers/dockerfilebuild.py b/workers/dockerfilebuild.py index 858a13863..dbb8d0aa0 100644 --- a/workers/dockerfilebuild.py +++ b/workers/dockerfilebuild.py @@ -545,6 +545,10 @@ class DockerfileBuildWorker(Worker): # Need a separate handler for this so it doesn't get caught by catch all below raise exc + except JobException as exc: + # Need a separate handler for this so it doesn't get caught by catch all below + raise exc + except Exception as exc: sentry.client.captureException() log_appender('error', build_logs.PHASE)