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
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.1
    • Component/s: None
    • Labels:
      None

      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

        Mark John Kenedy L. Magallanes created issue -
        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.
        Mark John Kenedy L. Magallanes made changes -
        Field Original Value New Value
        Attachment CONTINUUM-2600.patch [ 52981 ]
        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
        Mark John Kenedy L. Magallanes made changes -
        Attachment %0ACONTINUUM-2600-NEW.patch [ 53022 ]
        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.
        Maria Odea Ching made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.4.1 (Beta) [ 15104 ]
        Assignee Maria Odea Ching [ oching ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:36:01 UTC 2015 [ 1428222961749 ]
        Mark Thomas made changes -
        Workflow jira [ 12711243 ] Default workflow, editable Closed status [ 12740706 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:12:18 UTC 2015 [ 1428268338676 ]
        Mark Thomas made changes -
        Workflow jira [ 12948110 ] Default workflow, editable Closed status [ 12983537 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        3d 28m 1 Maria Odea Ching 06/Jan/11 04:04

          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:

              Development