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

Description setter is not not backwards compatible with particular regular expression

      Console text to search upon:
      [echo] ........................
      [echo] Conflicts found in merge
      [echo] Merge prepared: r136300:136558
      [echo] Don't fail. This is a dropmerge
      [echo] done.
      [echo] ***********************

      Used regex:
      (Merge (done|prepared): r.*)

      Current result: \1
      Previous result (in this case): Merge prepared: r136300:136558

          [JENKINS-4980] Description setter is not not backwards compatible with particular regular expression

          fct.java@gmail.com added a comment -

          I have the same issue:

          The regexp is: ((Build|Release) info: [^\s]*)
          The console output examples:

          • [echo] Build info: 5.8.4.2407 is packaged in ...
          • [echo] Release info: 5.8.4.2407 is packaged in ...

          And the description set: \1

          fct.java@gmail.com added a comment - I have the same issue: The regexp is: ((Build|Release) info: [^\s] *) The console output examples: [echo] Build info: 5.8.4.2407 is packaged in ... [echo] Release info: 5.8.4.2407 is packaged in ... And the description set: \1

          fct.java@gmail.com added a comment -

          And for your information the following regexp is working fine:
          Build info: [^\s]*

          fct.java@gmail.com added a comment - And for your information the following regexp is working fine: Build info: [^\s] *

          Carl Quinn added a comment -

          Question for the bug reporters: do your descriptions that you are trying to set involve more than one group? e.g. \1, \2, etc.

          I have submitted a fix for multi-group replacement @25397, and that might also be a fix for this bug if I read it correctly.

          Carl Quinn added a comment - Question for the bug reporters: do your descriptions that you are trying to set involve more than one group? e.g. \1, \2, etc. I have submitted a fix for multi-group replacement @25397, and that might also be a fix for this bug if I read it correctly.

          Code changed in hudson
          User: : javadude
          Path:
          trunk/hudson/plugins/description-setter/src/main/java/hudson/plugins/descriptionsetter/DescriptionSetterPublisher.java
          trunk/hudson/plugins/description-setter/src/test/java/hudson/plugins/descriptionsetter/DescriptionSetterPublisherTest.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=25397
          Log:
          Fixed a problem with handling more than one match group substitution. The loop was terminating too early and only handling the last group. I also added a test to reproduce the problem and verify the fix. This might be the fix for JENKINS-4980, but it's not clear what regex that bug is using.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : javadude Path: trunk/hudson/plugins/description-setter/src/main/java/hudson/plugins/descriptionsetter/DescriptionSetterPublisher.java trunk/hudson/plugins/description-setter/src/test/java/hudson/plugins/descriptionsetter/DescriptionSetterPublisherTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=25397 Log: Fixed a problem with handling more than one match group substitution. The loop was terminating too early and only handling the last group. I also added a test to reproduce the problem and verify the fix. This might be the fix for JENKINS-4980 , but it's not clear what regex that bug is using.

          peter_schuetze added a comment - - edited

          I have the problem that only one of the of my groups will be set.

          My regex: Started by upstream project "(.*)" build number (.*)
          My new description: \1 #\2

          Only \2 will be replaced. Though I think that should be fixed by your bugfix. I have version 1.6 of the plugin. Is your fix already released?

          ------------

          After eading http://download.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#cg it turns out that cbos fct.java@gmail.com actually have two capturing groups.

          Example for cbos regex:
          Original: (Merge (done|prepared): r.*)
          1. group: (Merge (done|prepared): r.*)
          2. group: (done|prepared)


          So this issue should be fixed with your bugfix. So I need to ask again: Is your fix already released?

          _________
          EDIT: 12-15-2010
          Fixed typo in URL
          minor rewording

          peter_schuetze added a comment - - edited I have the problem that only one of the of my groups will be set. My regex: Started by upstream project "(.*)" build number (.*) My new description: \1 #\2 Only \2 will be replaced. Though I think that should be fixed by your bugfix. I have version 1.6 of the plugin. Is your fix already released? ------------ After eading http://download.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#cg it turns out that cbos fct.java@gmail.com actually have two capturing groups. Example for cbos regex: Original: (Merge (done|prepared): r.*) 1. group: (Merge (done|prepared): r.*) 2. group: (done|prepared) So this issue should be fixed with your bugfix. So I need to ask again: Is your fix already released? _________ EDIT : 12-15-2010 Fixed typo in URL minor rewording

          TRoos added a comment -

          I'm waiting on this fix aswell, is there a possibility that it can be released soon?

          TRoos added a comment - I'm waiting on this fix aswell, is there a possibility that it can be released soon?

          Alan Harder added a comment -

          I'll run a release later today.. closing issue; reopen if still not working in 1.7

          Alan Harder added a comment - I'll run a release later today.. closing issue; reopen if still not working in 1.7

            javadude Carl Quinn
            cbos Cees Bos
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: