restdeployitxl-deploy

XL-Deploy: How to retrieve information about an Exection Plan Step?


In TaskBlockService there is a GET call retrieves information about a step given /tasks/v2/{taskid}/step/{stepPath}.

Question How to specify the value for the stepPath ?


Solution

  • First, lets see what blocks do we have inside a given task.

    Lets suppose, b9f5b44c-1754-4689-9129-e79376268d21 is the Task ID. Below is the REST call. Change localhost:4516 to your own XLD Host:Port.

    http://localhost:4516/deployit/tasks/v2/b9f5b44c-1754-4689-9129-e79376268d21/

    It will return details about this very task. I am only pasting the relevant part i.e. list of blocks within this task.

    <block id="0" state="FAILED" description="" hasSteps="true" root="true">
            <block id="0_1" state="FAILED" description="Deploy" hasSteps="true" phase="true">
                <block id="0_1_1" state="FAILED" description="Deploy MySQL 1.0 on MySQL" hasSteps="true"/></block>
            <block id="0_2" state="PENDING" description="" hasSteps="true" phase="true">
                <block id="0_2_1" state="PENDING" description="Register changes for MySQL" hasSteps="true"/></block>
        </block>
    

    Block ID 0 means parent block. Inside it, we can see there are multiple child blocks viz. 0_1 & 0_2. And within these child blocks, there are 2 steps viz. 0_1_1 & 0_1_2.

    So, in order to see details about these steps, prefix step/0_1_1_1 to above REST call.

    Please note above that I specified 0_1_1_1 which is a stepPath inside 0_1_1. It gives output similar to below.

    <step failures="0" state="DONE">
        <description>Run 01-CreateTable.sql on MySQLClient</description>
        <startDate>2017-04-26T05:26:30.044+0000</startDate>
        <completionDate>2017-04-26T05:26:32.568+0000</completionDate>
        <log>Uploading artifact [/tmp/ot-20170426T072630452.1/Archive.zip]
     </step>
    

    Similarly, If I replace step/0_1_1_1 with step/0_1_1_2 in above REST call, I can see details of other stepPath i.e. 0_1_1_2.

    <step failures="1" state="FAILED">
        <description>Run 02-CreateUser.sql on MySQLClient</description>
        <startDate>2017-04-26T05:26:32.618+0000</startDate>
        <completionDate>2017-04-26T05:26:34.424+0000</completionDate>
        <log>Uploading artifact [/tmp/ot-20170426T072632621.1/Archive.zip]
    </step>
    

    I hope, this clarifies how to specify value for stepPath in XL Deploy.