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

UCM build fails when using multiple vobs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • clearcase-plugin
    • None
    • Platform: All, OS: Linux

    Description

      When gathering changes using lshistory, the build fails if the specified stream
      does not exist. This happens if the stream is new and no changes has been made.
      What is worse, however, is that it also requires that changes has been made in
      that particular stream for all vobs listed in the load rules. In our setup we
      use a specific vob for external dependencies such as boost or some other third
      party library. Changes to this vob are not very frequent, so it typically does
      not contain tags for all streams using it.

      Patching UcmChangeLogAction.getChanges as follows solves the issue for me. This
      version will return ok successful in at least one view path (perhaps it always
      should return ok, so that it works for newly created streams?). Note, the patch
      also contain code for my reported issue 3096.

      @Override
      public List<UcmActivity> getChanges(Date time, String viewName, String[]
      branchNames, String[] viewPaths) th
      rows IOException, InterruptedException {
      // TH: Patched since this command must allow paths that do not contain
      // the specified branch name (happens, for instance, if changes has
      // been made only in one of several vobs
      List<UcmActivity> history = new ArrayList<UcmActivity>();
      boolean ok = false;
      IOException exception = null;
      for(String path : viewPaths) {
      try {
      // TH: Added the view name as part of the path (as the current
      directory
      // is the workspace root and the view will be checked out in a
      // directory with the name of the view)
      String fullpath = viewName + File.separator + path;
      BufferedReader reader = new BufferedReader(
      cleartool.lshistory(historyHandler.getFormat() + COMMENT
      + LINEEND, time, viewName, bran
      chNames[0],
      new String[]

      {fullpath}

      ));
      history.addAll(parseHistory(reader,viewName));
      reader.close();
      ok = true; // At least one path was successful
      } catch(IOException e)

      { exception = e; }

      }
      if(ok || exception == null)

      { return history; }

      else

      { // No path was successful, throwing the last one throw exception; }

      }

      Attachments

        Issue Links

          Activity

            sunfire sunfire added a comment -

            Sounds like ts related to the issue 1719,
            https://hudson.dev.java.net/issues/show_bug.cgi?id=1719. I'll apply the patch,
            hopefully someone can verify that it works.

            sunfire sunfire added a comment - Sounds like ts related to the issue 1719, https://hudson.dev.java.net/issues/show_bug.cgi?id=1719 . I'll apply the patch, hopefully someone can verify that it works.

            Code changed in hudson
            User: : sunfire
            Path:
            trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ucm/UcmChangeLogAction.java
            trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ucm/UcmChangeLogActionTest.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=15562
            Log:
            JENKINS-3097

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : sunfire Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ucm/UcmChangeLogAction.java trunk/hudson/plugins/clearcase/src/test/java/hudson/plugins/clearcase/ucm/UcmChangeLogActionTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=15562 Log: JENKINS-3097
            sunfire sunfire added a comment -
                • Issue 3096 has been marked as a duplicate of this issue. ***
            sunfire sunfire added a comment - Issue 3096 has been marked as a duplicate of this issue. ***
            sunfire sunfire added a comment -

            I've commited a "patch". If someone could verify that it fixes the issue AND
            doesn't break existing installation it will be released shortly

            sunfire sunfire added a comment - I've commited a "patch". If someone could verify that it fixes the issue AND doesn't break existing installation it will be released shortly
            sunfire sunfire added a comment -

            -

            sunfire sunfire added a comment - -
            sunfire sunfire added a comment -

            CLOSING

            sunfire sunfire added a comment - CLOSING

            People

              sunfire sunfire
              torbjornhulten torbjornhulten
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: