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

lshistory don't work on hudson node (Locale problem)

    XMLWordPrintable

Details

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

    Description

      My master is a Windows 2k3 in French.
      My node is a Linux in US.

      When Husdon try to make lshistory on the node :
      [ICS-SCORPIO-ADPCM32K-5] $ cleartool lshistory -r -since
      8-juil.-09.12:24:34utc+0000 -fmt '\"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\" \"%o\"
      \"%[activity]p\" \n%c\n' -branch brtype:SCORPIO_1.0_dev -nco vobs/scorpio/adpcm32k
      cleartool: Error: Invalid date/time format: "8-juil.-09.12:24:34utc+0000".
      <date-time> = <date>.<time> | <date> | <time> | "now" | "none"
      <date> = d[d]<month>[[yy]yy] | <day-of-week> | "today" | "yesterday"
      <time> = h[h]:m[m][:s[s]][UTC[+|-][h[h][:mm]]] (24-hour time)
      FATAL: UCM ClearCase failed. exit code=1
      FATAL: cleartool did not return the expected exit code. Command line="lshistory
      -r -since 8-juil.-09.12:24:34utc+0000 -fmt \"%Nd\" \"%u\" \"%En\" \"%Vn\" \"%e\"
      \"%o\" \"%[activity]p\" \n%c\n -branch brtype:SCORPIO_1.0_dev -nco
      vobs/scorpio/adpcm32k", actual exit code=1
      java.io.IOException: cleartool did not return the expected exit code. Command
      line="lshistory -r -since 8-juil.-09.12:24:34utc+0000 -fmt \"%Nd\" \"%u\"
      \"%En\" \"%Vn\" \"%e\" \"%o\" \"%[activity]p\" \n%c\n -branch
      brtype:SCORPIO_1.0_dev -nco vobs/scorpio/adpcm32k", actual exit code=1
      at
      hudson.plugins.clearcase.HudsonClearToolLauncher.run(HudsonClearToolLauncher.java:100)
      at hudson.plugins.clearcase.ClearToolExec.lshistory(ClearToolExec.java:89)
      at
      hudson.plugins.clearcase.history.AbstractHistoryAction.runLsHistory(AbstractHistoryAction.java:81)
      at
      hudson.plugins.clearcase.history.AbstractHistoryAction.getChanges(AbstractHistoryAction.java:67)
      at
      hudson.plugins.clearcase.AbstractClearCaseScm.checkout(AbstractClearCaseScm.java:296)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:830)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:314)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:266)
      at hudson.model.Run.run(Run.java:927)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:234)
      at hudson.model.ResourceController.execute(ResourceController.java:93)
      at hudson.model.Executor.run(Executor.java:119)

      The clearcase plugin should take the node's locale and not the default locale
      (of the master) if the checkout/lshistory will be run on a Hudson node.

      Attachments

        Activity

          abayer Andrew Bayer added a comment -

          From what I can tell, it looks like the date format passed to lshistory should
          always be US-formatted, regardless of the locale of the box it's running on.
          I'll change the plugin to force US locale on the date format.

          abayer Andrew Bayer added a comment - From what I can tell, it looks like the date format passed to lshistory should always be US-formatted, regardless of the locale of the box it's running on. I'll change the plugin to force US locale on the date format.

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolExec.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=19530
          Log:
          JENKINS-3994 - Forces US locale for SimpleDateFormat used in lshistory call. ClearCase always uses US month abbreviations, so this will make sure that the date is formatted correctly regardless of the locale of the node in question.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ClearToolExec.java http://fisheye4.cenqua.com/changelog/hudson/?cs=19530 Log: JENKINS-3994 - Forces US locale for SimpleDateFormat used in lshistory call. ClearCase always uses US month abbreviations, so this will make sure that the date is formatted correctly regardless of the locale of the node in question.

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/history/AbstractHistoryAction.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=19679
          Log:
          JENKINS-3994 Forces US Locale in all cases, since that's what ClearCase expects.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/history/AbstractHistoryAction.java http://fisheye4.cenqua.com/changelog/hudson/?cs=19679 Log: JENKINS-3994 Forces US Locale in all cases, since that's what ClearCase expects.
          abayer Andrew Bayer added a comment -

          Fixed in 0.9.1.

          abayer Andrew Bayer added a comment - Fixed in 0.9.1.

          People

            abayer Andrew Bayer
            juherr juherr
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: