continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1150084 - in /continuum/trunk: continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/ continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/ continuum-webapp/src/main/j...
Date Sat, 23 Jul 2011 11:22:41 GMT
Author: ctan
Date: Sat Jul 23 11:22:40 2011
New Revision: 1150084

URL: http://svn.apache.org/viewvc?rev=1150084&view=rev
Log:
[CONTINUUM-2131] show error message in UI if unable to ping build agent

Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java?rev=1150084&r1=1150083&r2=1150084&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentManager.java
Sat Jul 23 11:22:40 2011
@@ -235,7 +235,7 @@ public class DefaultBuildAgentManager
         catch ( Exception e )
         {
             log.error( "Unable to ping master " + continuumServerUrl, e );
-            throw new ContinuumException( "Unable to ping master " + continuumServerUrl,
e );
+            throw new ContinuumException( "Unable to ping master " + continuumServerUrl +
" from build agent", e );
         }
     }
 }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java?rev=1150084&r1=1150083&r2=1150084&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
Sat Jul 23 11:22:40 2011
@@ -210,8 +210,9 @@ public class DefaultDistributedBuildMana
                     catch ( Exception e )
                     {
                         agent.setEnabled( false );
-                        log.debug( "unable to ping build agent '{}': {}", agent.getUrl(),
+                        log.error( "unable to ping build agent '{}': {}", agent.getUrl(),
                             ContinuumUtils.throwableToString( e ) );
+                        throw new ContinuumException( e.getMessage() );
                     }
                 }
                 else if ( !agent.isEnabled() && overallDistributedBuildQueues.containsKey(
agent.getUrl() ) )

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?rev=1150084&r1=1150083&r2=1150084&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
Sat Jul 23 11:22:40 2011
@@ -205,7 +205,15 @@ public class BuildAgentAction
             }
         }
 
-        getContinuum().getDistributedBuildManager().reload();
+        try
+        {
+            getContinuum().getDistributedBuildManager().reload();
+        }
+        catch( ContinuumException e )
+        {
+            addActionError( e.getMessage() );
+            return INPUT;
+        }
         event.log();
 
         return SUCCESS;



Mime
View raw message