Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1719

newly created development stream cannot be built

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: clearcase-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:
      Show 5 results

      Description

      I don't know if this is somehting we should just document, or if we should try
      to fix it.

      Steps:
      1.Join project and create a new development stream using ClearCase Remote Client
      2.Setup a hudson job monitoring the new delvopment stream
      3. Build

      expected result:

      • Project is built

      actual result

      • Build fails because lshistory fails (when building the changelog). The reason
        lshistory fails is that it complains the branch does not exist.

      The underlying reason is that the branch apprently is first created when the
      first change happens on the stream, and so if it is a brand new stream with no
      changes the branch hasn't been created.

        Attachments

        1. HUDSON-1719
          1.0 kB
        2. HUDSON-1719-2
          3 kB
        3. mylyn-context.zip
          14 kB
        4. mylyn-context.zip
          36 kB

          Activity

          lynggaard lynggaard created issue -
          Hide
          redsolo redsolo added a comment -

          Is there anyway of creating the branch? Force the creation of the branch?
          Is there a command to list all branches (did not find one on the ipnom.com)
          Does the lshistory command return with a specific error code?

          I would expect the mkview command to fail as the branch does not exist? Or is
          the stream created but not the branch?

          Could you attach a console log showing the error?

          Show
          redsolo redsolo added a comment - Is there anyway of creating the branch? Force the creation of the branch? Is there a command to list all branches (did not find one on the ipnom.com) Does the lshistory command return with a specific error code? I would expect the mkview command to fail as the branch does not exist? Or is the stream created but not the branch? Could you attach a console log showing the error?
          Hide
          lynggaard lynggaard added a comment -

          The manual approach to creating the branch is to make a single change to some
          file on the stream.

          mkview command is successfull so I guess the stream is there

          ciuser_Usi_Release_2_0_3_Dev_Hudson_Auto] $ /usr/atria/bin/cleartool lshistory
          -r -since 19-may.09:02:43 -fmt '\"%Nd\" \"%En\" \"%Vn\" \"%[activity]p\" \"%e\"
          \"%o\" \n' -branch brtype:Shared_Development_2_0_3 -nco vobs/projects/Server
          cleartool: Error: Branch type not found: "Shared_Development_2_0_3".
          FATAL: UCM ClearCase failed. exit code=1
          FATAL: cleartool did not return the expected exit code. Command line="lshistory
          -r -since 19-may.09:02:43 -fmt \"%Nd\" \"%En\" \"%Vn\" \"%[activity]p\" \"%e\"
          \"%o\" \n -branch brtype:Shared_Development_2_0_3 -nco vobs/projects/Server",
          actual exit code=1
          java.io.IOException: cleartool did not return the expected exit code. Command
          line="lshistory -r -since 19-may.09:02:43 -fmt \"%Nd\" \"%En\" \"%Vn\"
          \"%[activity]p\" \"%e\" \"%o\" \n -branch brtype:Shared_Development_2_0_3 -nco
          vobs/projects/Usi_Server", actual exit code=1
          at
          hudson.plugins.clearcase.HudsonClearToolLauncher.run(HudsonClearToolLauncher.java:72)
          at hudson.plugins.clearcase.ClearToolExec.lshistory(ClearToolExec.java:54)
          at
          hudson.plugins.clearcase.ucm.UcmChangeLogAction.getChanges(UcmChangeLogAction.java:55)
          at
          hudson.plugins.clearcase.AbstractClearCaseScm.checkout(AbstractClearCaseScm.java:145)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:564)
          at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:244)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:218)
          at hudson.model.Run.run(Run.java:749)
          at hudson.model.Build.run(Build.java:102)
          at hudson.model.ResourceController.execute(ResourceController.java:70)
          at hudson.model.Executor.run(Executor.java:71)

          Show
          lynggaard lynggaard added a comment - The manual approach to creating the branch is to make a single change to some file on the stream. mkview command is successfull so I guess the stream is there ciuser_Usi_Release_2_0_3_Dev_Hudson_Auto] $ /usr/atria/bin/cleartool lshistory -r -since 19-may.09:02:43 -fmt '\"%Nd\" \"%En\" \"%Vn\" \"% [activity] p\" \"%e\" \"%o\" \n' -branch brtype:Shared_Development_2_0_3 -nco vobs/projects/Server cleartool: Error: Branch type not found: "Shared_Development_2_0_3". FATAL: UCM ClearCase failed. exit code=1 FATAL: cleartool did not return the expected exit code. Command line="lshistory -r -since 19-may.09:02:43 -fmt \"%Nd\" \"%En\" \"%Vn\" \"% [activity] p\" \"%e\" \"%o\" \n -branch brtype:Shared_Development_2_0_3 -nco vobs/projects/Server", actual exit code=1 java.io.IOException: cleartool did not return the expected exit code. Command line="lshistory -r -since 19-may.09:02:43 -fmt \"%Nd\" \"%En\" \"%Vn\" \"% [activity] p\" \"%e\" \"%o\" \n -branch brtype:Shared_Development_2_0_3 -nco vobs/projects/Usi_Server", actual exit code=1 at hudson.plugins.clearcase.HudsonClearToolLauncher.run(HudsonClearToolLauncher.java:72) at hudson.plugins.clearcase.ClearToolExec.lshistory(ClearToolExec.java:54) at hudson.plugins.clearcase.ucm.UcmChangeLogAction.getChanges(UcmChangeLogAction.java:55) at hudson.plugins.clearcase.AbstractClearCaseScm.checkout(AbstractClearCaseScm.java:145) at hudson.model.AbstractProject.checkout(AbstractProject.java:564) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:244) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:218) at hudson.model.Run.run(Run.java:749) at hudson.model.Build.run(Build.java:102) at hudson.model.ResourceController.execute(ResourceController.java:70) at hudson.model.Executor.run(Executor.java:71)
          Hide
          sunfire sunfire added a comment -

          Re-assigning

          Show
          sunfire sunfire added a comment - Re-assigning
          Hide
          dhauslad dhauslad added a comment -

          We're also observing this problem at my company. We have major (X), minor (X.Y), and service (X.Y.Z) releases of our systems. At the inception of each of these releases, we branch the code. Since several minor releases are in active maintenance, we have several service releases annually. We're seeing that our first builds often fail with the above error until a delivery is made.

          My Clearcase admin tells me it's perfectly natural for cleartool to return the above error before any delivery has been made. He states:

          When the stream is created, a branch type is created for the stream, before any changes are done in the stream. The branch type is created in the Project VOB. When a checkout is made in the integration stream, as happens during a delivery, the branch type is copied from the PVOB into the component VOB. The HUDSON code is querying the component VOB for the branch type before the branch type has been copied into the component VOB. Thus the error that you are getting.

          Is there any way that this condition could be detected and worked around?

          Show
          dhauslad dhauslad added a comment - We're also observing this problem at my company. We have major (X), minor (X.Y), and service (X.Y.Z) releases of our systems. At the inception of each of these releases, we branch the code. Since several minor releases are in active maintenance, we have several service releases annually. We're seeing that our first builds often fail with the above error until a delivery is made. My Clearcase admin tells me it's perfectly natural for cleartool to return the above error before any delivery has been made. He states: When the stream is created, a branch type is created for the stream, before any changes are done in the stream. The branch type is created in the Project VOB. When a checkout is made in the integration stream, as happens during a delivery, the branch type is copied from the PVOB into the component VOB. The HUDSON code is querying the component VOB for the branch type before the branch type has been copied into the component VOB. Thus the error that you are getting. Is there any way that this condition could be detected and worked around?
          Hide
          vlatombe Vincent Latombe added a comment -

          Taking this issue.

          I think the clearcase error about the branch not existing should be ignored in this case. There is nothing to report in the change log in this case, and it shouldn't prevent a build

          Show
          vlatombe Vincent Latombe added a comment - Taking this issue. I think the clearcase error about the branch not existing should be ignored in this case. There is nothing to report in the change log in this case, and it shouldn't prevent a build
          vlatombe Vincent Latombe made changes -
          Field Original Value New Value
          Assignee sunfire [ sunfire ] vlatombe [ vlatombe ]
          Hide
          vlatombe Vincent Latombe added a comment -

          Patch proposal. I just catch the lshistory call and expect error messages from clearcase to be caught by the caller. So far, to handle change log, these errors are ignored

          Show
          vlatombe Vincent Latombe added a comment - Patch proposal. I just catch the lshistory call and expect error messages from clearcase to be caught by the caller. So far, to handle change log, these errors are ignored
          vlatombe Vincent Latombe made changes -
          Attachment JENKINS-1719 [ 19394 ]
          vlatombe Vincent Latombe made changes -
          Attachment mylyn-context.zip [ 19395 ]
          Hide
          vlatombe Vincent Latombe added a comment -

          Updated patch with a unit test in case cleartool throws an IOException

          Show
          vlatombe Vincent Latombe added a comment - Updated patch with a unit test in case cleartool throws an IOException
          vlatombe Vincent Latombe made changes -
          Attachment JENKINS-1719-2 [ 19396 ]
          vlatombe Vincent Latombe made changes -
          Attachment mylyn-context.zip [ 19397 ]
          vlatombe Vincent Latombe made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : vlatombe
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolExec.java
          trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearToolExecTest.java
          http://jenkins-ci.org/commit/31425
          Log:
          [Fixed JENKINS-1719] newly created development stream cannot be built

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : vlatombe Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolExec.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ClearToolExecTest.java http://jenkins-ci.org/commit/31425 Log: [Fixed JENKINS-1719] newly created development stream cannot be built
          Hide
          vlatombe Vincent Latombe added a comment -

          Committed in trunk. Will be available in 1.2.1

          Show
          vlatombe Vincent Latombe added a comment - Committed in trunk. Will be available in 1.2.1
          vlatombe Vincent Latombe made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          vlatombe Vincent Latombe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              vlatombe Vincent Latombe
              Reporter:
              lynggaard lynggaard
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: