continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1235226 - in /continuum/trunk: continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/ continuum-co...
Date Tue, 24 Jan 2012 12:45:59 GMT
Author: ctan
Date: Tue Jan 24 12:45:59 2012
New Revision: 1235226

URL: http://svn.apache.org/viewvc?rev=1235226&view=rev
Log:
[CONTINUUM-2673] fixed error message when rollback failed and display it in the page

Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=1235226&r1=1235225&r2=1235226&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
Tue Jan 24 12:45:59 2012
@@ -458,7 +458,7 @@ public class ContinuumBuildAgentServiceI
         }
         catch ( ContinuumReleaseException e )
         {
-            throw new ContinuumBuildAgentException( "Unable to rollback release " + releaseId,
e );
+            throw new ContinuumBuildAgentException( e );
         }
     }
 

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java?rev=1235226&r1=1235225&r2=1235226&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
Tue Jan 24 12:45:59 2012
@@ -281,6 +281,11 @@ public class DefaultBuildAgentReleaseMan
         }
 
         releaseManager.getPreparedReleases().remove( releaseId );
+
+        if ( StringUtils.isNotBlank( listener.getError() ) )
+        {
+            throw new ContinuumReleaseException( "Failed to rollback release: " + listener.getError()
);
+        }
     }
 
     private Project getProject( Map<String, Object> context )

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java?rev=1235226&r1=1235225&r2=1235226&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
Tue Jan 24 12:45:59 2012
@@ -508,8 +508,9 @@ public class DefaultDistributedReleaseMa
             {
                 SlaveBuildAgentTransportService client = createSlaveBuildAgentTransportClientConnection(
buildAgentUrl );
                 client.releaseRollback( releaseId, projectId );
+                return;
             }
-
+            
             // call reload in case we disable the build agent
             distributedBuildManager.reload();
 
@@ -524,7 +525,7 @@ public class DefaultDistributedReleaseMa
         catch ( Exception e )
         {
             log.error( "Unable to rollback release " + releaseId, e );
-            throw new ContinuumReleaseException( "Unable to rollback release " + releaseId,
e );
+            throw new ContinuumReleaseException( e );
         }
     }
 

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java?rev=1235226&r1=1235225&r2=1235226&view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
(original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
Tue Jan 24 12:45:59 2012
@@ -441,7 +441,7 @@ public class SlaveBuildAgentTransportCli
         catch ( Exception e )
         {
             log.error( "Failed to rollback release. releaseId=" + releaseId + ", projectId="
+ projectId + " from build agent " + buildAgentUrl, e );
-            throw new Exception( "Failed to rollback release. releaseId=" + releaseId + ",
projectId=" + projectId + " from build agent " + buildAgentUrl, e );
+            throw (Exception) e.getCause().getCause().getCause().getCause();
         }
 
         return result;

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java?rev=1235226&r1=1235225&r2=1235226&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseRollbackAction.java
Tue Jan 24 12:45:59 2012
@@ -76,12 +76,9 @@ public class ReleaseRollbackAction
             {
                 releaseManager.releaseRollback( releaseId, projectId );
             }
-            catch ( BuildAgentConfigurationException e )
+            catch ( Exception e )
             {
-                List<Object> args = new ArrayList<Object>();
-                args.add( e.getMessage() );
-
-                addActionError( getText( "releaseRollback.error", args ) );
+                addActionError( e.getMessage() );
                 return ERROR;
             }
         }

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=1235226&r1=1235225&r2=1235226&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Tue Jan 24 12:45:59 2012
@@ -756,6 +756,7 @@ releasePerformFromScm.buildEnvironment.l
 releasePerformFromScm.page.title=Continuum - Perform Project Release
 releasePerformFromScm.section.title=Perform Project Release
 releasePerformFromScm.parameters.section.title=Release Perform Parameters
+releaseRollback.error=Failed to rollback release: {0}
 
 # ----------------------------------------------------------------------
 # Page: User



Mime
View raw message