Continuum
  1. Continuum
  2. CONTINUUM-2600

Include in webservice to also return platform of buildagent when retrieving a buildagent or list of buildagents

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.1
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      2

      Description

      Right now there is no current way on getting the platform of the build agent adding an additional field "platform" to the model of the buildagentconfiguration used in the webservice in getting buildagent/buildagents would be very useful for making platform specific jobs. The platform of the buildagent can be retrieve through it's webservice that is done in this issue http://jira.codehaus.org/browse/CONTINUUM-2597.

      1. %0ACONTINUUM-2600-NEW.patch
        7 kB
        Mark John Kenedy L. Magallanes
      2. CONTINUUM-2600.patch
        4 kB
        Mark John Kenedy L. Magallanes

        Activity

        Hide
        Mark John Kenedy L. Magallanes added a comment -

        attaching patch for issue.

        thanks.

        Show
        Mark John Kenedy L. Magallanes added a comment - attaching patch for issue. thanks.
        Hide
        Maria Odea Ching added a comment -

        Hi Mark, please see comments below:

        Index: continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
        ===================================================================
        — continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (revision 1054517)
        +++ continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (working copy)
        @@ -2201,9 +2201,21 @@

        private BuildAgentConfiguration populateBuildAgent( org.apache.continuum.configuration.BuildAgentConfiguration buildAgent )
        {

        • return (BuildAgentConfiguration) mapper.map( buildAgent, BuildAgentConfiguration.class );
          + BuildAgentConfiguration buildAgentConfiguration =
          + (BuildAgentConfiguration) mapper.map( buildAgent, BuildAgentConfiguration.class );
          + try
          +
          Unknown macro: { + buildAgentConfiguration.setPlatform( distributedBuildManager.getbuildAgentPlatform( buildAgentConfiguration.getUrl() ) ); + return buildAgentConfiguration; + }

          + catch ( ContinuumException e )
          +

          Unknown macro: { + buildAgentConfiguration.setPlatform( "" ); + return buildAgentConfiguration; + }

          }

        • Can you log the error/exception being swallowed when getting the build agent's platform?

        Index: continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
        ===================================================================
        — continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (revision 1054517)
        +++ continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (working copy)
        @@ -48,6 +48,9 @@

        List<Installation> getAvailableInstallations( String buildAgentUrl )
        throws ContinuumException;
        +
        + String getbuildAgentPlatform( String buildAgentUrl )
        + throws ContinuumException;

        • Can you make the method name camel-cased (e.g. getBuildAgentPlatform(...) )?
        • Can you also provide unit tests for new method you added for the distributed build manager?

        Thanks!

        Show
        Maria Odea Ching added a comment - Hi Mark, please see comments below: Index: continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java =================================================================== — continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (revision 1054517) +++ continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (working copy) @@ -2201,9 +2201,21 @@ private BuildAgentConfiguration populateBuildAgent( org.apache.continuum.configuration.BuildAgentConfiguration buildAgent ) { return (BuildAgentConfiguration) mapper.map( buildAgent, BuildAgentConfiguration.class ); + BuildAgentConfiguration buildAgentConfiguration = + (BuildAgentConfiguration) mapper.map( buildAgent, BuildAgentConfiguration.class ); + try + Unknown macro: { + buildAgentConfiguration.setPlatform( distributedBuildManager.getbuildAgentPlatform( buildAgentConfiguration.getUrl() ) ); + return buildAgentConfiguration; + } + catch ( ContinuumException e ) + Unknown macro: { + buildAgentConfiguration.setPlatform( "" ); + return buildAgentConfiguration; + } } Can you log the error/exception being swallowed when getting the build agent's platform? Index: continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java =================================================================== — continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (revision 1054517) +++ continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (working copy) @@ -48,6 +48,9 @@ List<Installation> getAvailableInstallations( String buildAgentUrl ) throws ContinuumException; + + String getbuildAgentPlatform( String buildAgentUrl ) + throws ContinuumException; Can you make the method name camel-cased (e.g. getBuildAgentPlatform(...) )? Can you also provide unit tests for new method you added for the distributed build manager? Thanks!
        Hide
        Mark John Kenedy L. Magallanes added a comment -

        applied comments and uploading updated patch

        thanks

        Show
        Mark John Kenedy L. Magallanes added a comment - applied comments and uploading updated patch thanks
        Hide
        Maria Odea Ching added a comment -

        Thanks Mark! Patch applied to Continuum trunk in -r1055810.

        Maybe we can also display the build agent's platform from Continuum? Just read-only though, since it is auto-discovered.

        Show
        Maria Odea Ching added a comment - Thanks Mark! Patch applied to Continuum trunk in -r1055810. Maybe we can also display the build agent's platform from Continuum? Just read-only though, since it is auto-discovered.

          People

          • Assignee:
            Maria Odea Ching
            Reporter:
            Mark John Kenedy L. Magallanes
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: