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

Description setter is not not backwards compatible with particular regular expression

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            fct.java@gmail.com 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

            Show
            fct.java@gmail.com 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
            Hide
            fct.java@gmail.com fct.java@gmail.com added a comment -

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

            Show
            fct.java@gmail.com fct.java@gmail.com added a comment - And for your information the following regexp is working fine: Build info: [^\s] *
            Hide
            javadude 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.

            Show
            javadude 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.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            peter_schuetze 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

            Show
            peter_schuetze 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
            Hide
            troos troos added a comment -

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

            Show
            troos troos added a comment - I'm waiting on this fix aswell, is there a possibility that it can be released soon?
            Hide
            mindless Alan Harder added a comment -

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

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: